Skip to content

Commit cff35b8

Browse files
authored
Merge pull request #495 from Synthetixio/dev
promote dev to master
2 parents 3acdc40 + 764e4c1 commit cff35b8

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

.github/workflows/audit_and_lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125125

126126
- name: Archive e2e artifacts
127-
uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 # pin@v2
127+
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # pin@v2
128128
if: always()
129129
with:
130130
name: e2e-artifacts

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,12 @@ To see in which direction Synpress is headed to, take a look at
6363
- etherscan API helpers in place which for ex. allows to compare your
6464
transaction results with etherscan and check tx status
6565
- synthetix helpers in place which allows to interact with synthetix protocol
66-
programatically ...
66+
programatically
67+
- supports codespaces
68+
- run your tests in docker
69+
- get your feedback remotely thanks to ngrok
70+
- use mpeg-4 preview plugin to watch videos from inside codespaces :)
71+
...
6772

6873
## 👷 Example setup for eslint and tsconfig
6974

@@ -255,10 +260,11 @@ Docker is awesome for CI and local development. Give it a try.
255260
All examples of setup are present in this repository. Just take a look around.
256261

257262
**Warning: M2 is not supported with docker.**
263+
As a workaround - you can use codespaces, they're fully supported! :)
258264

259265
## CI tips & tricks
260266

261-
- use [docker-e2e](https://github.com/Synthetixio/docker-e2e)
267+
- use [docker-e2e](https://github.com/Synthetixio/docker-e2e)
262268
- stick to bigger resolutions (to make sure that whole extension is visible on
263269
screen when opened)
264270
- synpress is tested on 1920x1080

commands/metamask.js

+24-4
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ module.exports = {
519519
waitForEvent: 'navi',
520520
},
521521
);
522-
await playwright.waitFor(mainPageElements.walletOverview);
522+
// await playwright.waitFor(mainPageElements.walletOverview);
523523

524524
await switchToCypressIfNotActive();
525525
return true;
@@ -756,9 +756,11 @@ module.exports = {
756756
await playwright.init();
757757
await playwright.assignWindows();
758758
await playwright.assignActiveTabName('metamask');
759+
await module.exports.fixBlankPage();
759760
if (
760-
(await playwright.metamaskWindow().$(unlockPageElements.unlockPage)) ===
761-
null
761+
(await playwright
762+
.metamaskWindow()
763+
.$(welcomePageElements.confirmButton)) !== null
762764
) {
763765
await module.exports.confirmWelcomePage();
764766
if (secretWordsOrPrivateKey.includes(' ')) {
@@ -777,11 +779,29 @@ module.exports = {
777779
walletAddress = await module.exports.getWalletAddress();
778780
await playwright.switchToCypressWindow();
779781
return true;
780-
} else {
782+
} else if (
783+
(await playwright
784+
.metamaskWindow()
785+
.$(unlockPageElements.passwordInput)) !== null
786+
) {
781787
await module.exports.unlock(password);
782788
walletAddress = await module.exports.getWalletAddress();
783789
await playwright.switchToCypressWindow();
784790
return true;
791+
} else {
792+
if (
793+
(await playwright
794+
.metamaskWindow()
795+
.$(mainPageElements.walletOverview)) !== null &&
796+
!process.env.RESET_METAMASK
797+
) {
798+
await playwright.switchToMetamaskWindow();
799+
walletAddress = await module.exports.getWalletAddress();
800+
await playwright.switchToCypressWindow();
801+
return true;
802+
} else {
803+
// todo: reset metamask state
804+
}
785805
}
786806
},
787807
};

0 commit comments

Comments
 (0)