-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore: serialize email tests and use wc uri instead of deeplink #2590
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…email-tests-login-improvement
/* eslint-disable init-declarations */ | ||
let page: ModalWalletPage | ||
let validator: ModalWalletValidator | ||
let context: BrowserContext | ||
/* eslint-enable init-declarations */ | ||
|
||
// -- Setup -------------------------------------------------------------------- | ||
const emailTest = test.extend<{ library: string }>({ | ||
library: ['wagmi', { option: true }] | ||
}) | ||
|
||
emailTest.describe.configure({ mode: 'serial' }) |
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 if we wrap the tests with a describe
?
walletPage.page.on('console', msg => { | ||
if (msg.text().includes('set') && msg.text().includes('core/pairing/pairing')) { | ||
pairingCreatedTime = new Date() | ||
} | ||
if (msg.text().includes('resolving attestation')) { | ||
verificationStartedTime = new Date() | ||
} | ||
if (msg.text().includes('session_proposal') && msg.text().includes('verifyContext')) { | ||
// For some reason this log is emitted twice; so only recording the time once | ||
if (verificationStartedTime) { | ||
const verificationEndedTime = new Date() | ||
timingRecords.push({ | ||
item: 'sessionProposalVerification', | ||
timeMs: verificationEndedTime.getTime() - verificationStartedTime.getTime() | ||
}) | ||
verificationStartedTime = null |
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.
@chris13524 can you double check this?
Code seemed completely duplicated between solana and non-solana after the qr uri change so I merged it.
Only difference wat this event listener on the console that was only set on the non-solana side.
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.
The canary doesn't run Solana tests, so if this is just in the non-Solana variant that's fine
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.
There are no variants now, like this runs on every wallet test. If we need to scope it so that it doesnt add the event handler on solana I can add that check
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.
That's not a problem. This can run for Solana. It just measures time and adds to the array of time entries. The value is only read in the canary spec
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.
LGTM
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
- uses: actions/upload-artifact@v4 | ||
if: failure() |
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.
Upload the artifacts if the tests has been failed
@@ -35,6 +35,7 @@ export class WalletValidator { | |||
} | |||
|
|||
async expectDisconnected() { | |||
await this.page.reload() |
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.
Remove
Description
serial
mode, so that the login can be re-utilized, saving emails sent and inbox collisions between the workers testsw3m-wallet-fixture
behavior using wc uri fetching from the modal instead of a deeplink to fix a Playwright issue where it bugs out the connection when opening deeplinks in tests.Type of change
Checklist