-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ feat: MetaMask setup in Cypress #1157
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Few things to note here: Since we are doing some cacheless setup from what I can tell in your PR, and we're doing the same thing for Playwright in my current WIP PR. It might make sense to create a shared folder of functions for cypress/playwright. Also have you run into any problems trying to run things using Cache in Cypress? |
d75027f
to
953c425
Compare
You forgot to git ignore the download directory |
wallets/metamask/src/cypress/support/pages/OnboardingPage/importWallet.ts
Fixed
Show fixed
Hide fixed
wallets/metamask/src/cypress/support/pages/OnboardingPage/importWallet.ts
Fixed
Show fixed
Hide fixed
wallets/metamask/src/cypress/support/pages/OnboardingPage/importWallet.ts
Fixed
Show fixed
Hide fixed
I've created a dev branch for v4 beta, I would appreciate if you could merge into there as we prep for V4 beta release, since we've been working on structural changes, leaving prs open for weeks, and dealing with conflicts can get very time consuming. |
How is it better to use different branch? There will be the same conflicts here and there right? |
The reason I am pushing for us using the new-dawn-dev branch is so that we don't have to hold off on merging our work together, for example:
I know it's a bit of a pace change but I'd really appreciate if we can adopt this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if there's a way for us to shift to using better relative imports, the ../../
pattern is pretty ugly and confusing, but it's not critical
But how the new branch will resolve the conflicts? |
I explained it ^ TLDR:
It's like having a dev branch, have you ever used a dev branch? Because you're not the only one pushing code now we need to find a way to keep in sync. |
But it's not helping with the conflicts. It's not a solution if we will have another, not synchronised branch. Lets try to make the way we have better aligned :) |
You're being pedantic, dev branches are a well defined, useful standard that is popular and widely adopted for a reason. For example, I already got things working on Windows, so if you're working off the latest branch you can just adopt the solution so I don't have to jump in and clean after you, or get my work blocked for another x time because windows works in 1 wallet and not another. There are people using new-dawn |
I am not saying about dev branch approach but about conflicts. You said you want to avoid them. I am just saying another branch will not resolve any conflict. Furthermore how merging this branch somewhere else will help you will the conflicts in the future? |
.gitignore
Outdated
@@ -37,6 +37,9 @@ test-results | |||
playwright-report | |||
playwright/.cache | |||
|
|||
### Cypress | |||
wallets/metamask/downloads |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use wallets/**/downloads
wallets/metamask/cypress.config.ts
Outdated
supportFile: 'src/cypress/support/e2e.{js,jsx,ts,tsx}', | ||
testIsolation: false, | ||
async setupNodeEvents(on, config) { | ||
return installSynpress(on, config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is installSynpress
a good name here?
maybe configureSynpress
would be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think about "configureBeforeSynpress"?
"build:cache": "synpress-cache test/wallet-setup", | ||
"build:cache:headless": "synpress-cache test/wallet-setup --headless", | ||
"build:cache:headless:force": "synpress-cache test/wallet-setup --headless --force", | ||
"build:cache": "synpress-cache test/playwright/wallet-setup", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build:playwright:cache
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
end goal will be to use it for both: Playwright and Cypress
outputDir = ensureCacheDirExists() | ||
} else { | ||
outputDir = path.resolve('./', 'downloads') | ||
outputDir = process.platform === 'win32' ? `file:\\\\\\${outputDir}` : outputDir |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why making it complicated, instead of doing
outputDir = process.platform === 'win32' ? `file:\\\\\\${outputDir}` : path.resolve('./', 'downloads')
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure it will work?
@@ -10,7 +10,7 @@ export default defineConfig({ | |||
fixturesFolder: 'src/cypress/fixtures', | |||
testIsolation: false, | |||
async setupNodeEvents(on, config) { | |||
return installSynpress(on, config) | |||
return configureBeforeSynpress(on, config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configureBeforeSynpress
?
why not
configureSynpress
?
Motivation and context
Install MetaMask in Cypress.
Does it fix any issue?
https://linear.app/synpress/issue/SYN-124/setup-metamask-extension-for-cypress
Other useful info
Quality checklist