-
Notifications
You must be signed in to change notification settings - Fork 5k
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
refactor: Use generic helper function to initiate signatures #26584
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Quality Gate passedIssues Measures |
Builds ready [3b784e4]
Page Load Metrics (75 ± 8 ms)
Bundle size diffs
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #26584 +/- ##
========================================
Coverage 70.01% 70.01%
========================================
Files 1410 1410
Lines 49130 49130
Branches 13739 13739
========================================
Hits 34398 34398
Misses 14732 14732 ☔ View full report in Codecov by Sentry. |
@@ -99,3 +113,13 @@ export async function assertPastedAddress(driver: Driver) { | |||
const formFieldEl = await driver.findElement('#eip747ContractAddress'); | |||
assert.equal(await formFieldEl.getAttribute('value'), WALLET_ADDRESS); | |||
} | |||
|
|||
export async function openDappAndTriggerSignature( |
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.
This is great and absolutely the best mentality!
But this is another example where the page object model (once adopted) would make this architecture even cleaner and more consistent.
await TestDApp.clickSignTypedData3Button();
await SignatureConfirmation.clickApprove();
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.
another idea is we could make this method even more generic. Possibly we could create test dapp helpers.
e.g. calling it from the code
openDappAndClick(driver, Signature.SignTypedData)
or
openDappAndClick(driver, Dapp.Signature.SignTypedData)
looks like the PR isn't connected to the issue tickets. I think we'd either need to:
|
Description
Refactor signature tests to use a helper function in order to load the test state.
Also fixes the flaky SIWE tests by adding an extra scroll to bottom
Related issues
Fixes:
#24468
#26445
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist