Skip to content

Commit

Permalink
fix: wrong window names
Browse files Browse the repository at this point in the history
  • Loading branch information
maximgeerinck committed May 2, 2023
1 parent 40b6743 commit 817519d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
16 changes: 8 additions & 8 deletions commands/metamask.js
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ const metamask = {
const notificationPage = await playwright.switchToNotification(PROVIDER);
if (
await playwright
.notificationwindows(PROVIDER)
.windows(PROVIDER)
.locator(signaturePageElements.signatureRequestScrollDownButton)
.isVisible()
) {
Expand Down Expand Up @@ -760,7 +760,7 @@ const metamask = {
const notificationPage = await playwright.switchToNotification(PROVIDER);
if (
await playwright
.notificationwindows(PROVIDER)
.windows(PROVIDER)
.locator(signaturePageElements.signatureRequestScrollDownButton)
.isVisible()
) {
Expand Down Expand Up @@ -880,7 +880,7 @@ const metamask = {
// experimental mode on
if (
await playwright
.notificationwindows(PROVIDER)
.windows(PROVIDER)
.locator(notificationPageElements.customSpendingLimitInput)
.isVisible()
) {
Expand Down Expand Up @@ -955,7 +955,7 @@ const metamask = {
);
if (
await playwright
.notificationwindows(PROVIDER)
.windows(PROVIDER)
.locator(confirmPageElements.editGasFeeLegacyButton)
.isVisible()
) {
Expand All @@ -969,7 +969,7 @@ const metamask = {
);
if (
await playwright
.notificationwindows(PROVIDER)
.windows(PROVIDER)
.locator(confirmPageElements.editGasFeeLegacyOverrideAckButton)
.isVisible()
) {
Expand Down Expand Up @@ -1092,7 +1092,7 @@ const metamask = {
log('[confirmTransaction] Checking if recipient address is present..');
if (
await playwright
.notificationwindows(PROVIDER)
.windows(PROVIDER)
.locator(confirmPageElements.recipientButton)
.isVisible()
) {
Expand All @@ -1116,7 +1116,7 @@ const metamask = {
log('[confirmTransaction] Checking if network name is present..');
if (
await playwright
.notificationwindows(PROVIDER)
.windows(PROVIDER)
.locator(confirmPageElements.networkLabel)
.isVisible()
) {
Expand All @@ -1138,7 +1138,7 @@ const metamask = {
// log('[confirmTransaction] Checking if tx data is present..');
// if (
// await playwright
// .notificationwindows(PROVIDER)
// .windows(PROVIDER)
// .locator(confirmPageElements.dataButton)
// .isVisible()
// ) {
Expand Down
13 changes: 6 additions & 7 deletions helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,12 @@ module.exports = {
log(
`Trying to download and extract file from: ${url} to following path: ${destination}`,
);

if (provider === 'phantom') {
// phantom doesnt support downloading yet.
return;
}

if (process.env.GH_USERNAME && process.env.GH_PAT) {
await download(url, destination, {
extract: true,
Expand All @@ -227,13 +233,6 @@ module.exports = {
Accept: 'application/octet-stream',
},
});

/**
* Some extensions will zip their dist folder
*/
if (provider === 'phantom') {
await moveFiles(`${destination}/dist`, destination);
}
} else {
await download(url, destination, {
extract: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@phantom/synpress",
"version": "4.0.0-alpha.16",
"version": "4.0.0-alpha.18",
"description": "Synpress is e2e testing framework based around Cypress.io & playwright with included MetaMask support. Test your dapps with ease.",
"keywords": [
"Synpress",
Expand Down

0 comments on commit 817519d

Please sign in to comment.