Skip to content
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

fix: improve reliability of E2E tests #1182

Merged
merged 3 commits into from
Nov 17, 2022
Merged

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Nov 16, 2022

What it solves

Unreliable transaction creation test.

How this PR fixes it

  • The timeout for E2E wallet connection has been increased
  • Tests relevant to the estimation/proposal/safe-apps endpoint incerceptions have been moved inside the intercept callback

How to test it

Observe the test passes in the E2E job.

@iamacook iamacook self-assigned this Nov 16, 2022
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Nov 16, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7c39833
Status: ✅  Deploy successful!
Preview URL: https://61b28bb5.web-core.pages.dev
Branch Preview URL: https://improve-tx-creation-test.web-core.pages.dev

View logs

@github-actions
Copy link

github-actions bot commented Nov 16, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@iamacook iamacook marked this pull request as draft November 16, 2022 19:40
@iamacook iamacook changed the title test: fix: improve reliability of trasaction creation test fix: improve reliability of E2E tests Nov 17, 2022
@iamacook iamacook marked this pull request as ready for review November 17, 2022 10:18
@@ -15,8 +15,13 @@ describe('Queue a transaction on 1/N', () => {
})

it('should create and queue a transaction', () => {
// Assert that "New transaction" button is visible
cy.contains('New transaction', {
timeout: 60_000, // `lastWallet` takes a while initialize in CI
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is horribly long but 30s was sometimes too short. It doesn't seem to need this long but I'd sooner have it longer than necessary. As soon as the button is present, it continues.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the long timeout in this assertion? There is no request before this modal opens.
If this is a bottleneck disregard my comment -> I thought the timeout would come only with the /estimations request

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -15,8 +15,13 @@ describe('Queue a transaction on 1/N', () => {
})

it('should create and queue a transaction', () => {
// Assert that "New transaction" button is visible
cy.contains('New transaction', {
timeout: 60_000, // `lastWallet` takes a while initialize in CI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the long timeout in this assertion? There is no request before this modal opens.
If this is a bottleneck disregard my comment -> I thought the timeout would come only with the /estimations request

cypress/e2e/smoke/create_tx.cy.js Show resolved Hide resolved
@iamacook
Copy link
Member Author

I can't reply to the comment directly for some reason so I will here.

Why the long timeout in this assertion? There is no request before this modal opens.

The test was primarily failing because the last used wallet wasn't connecting in time as the logic "flow" is very long:

  1. Onboard is initialised
  2. Chain-specific wallet modules are intialised
  3. Wallet "unlock" status is checked
  4. Last wallet connects <--

The timeout I added does not explicitly wait for 60s. If the wallet connects before then, the tests continue.

Copy link
Member

@DiogoSoaress DiogoSoaress left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@iamacook iamacook merged commit faaf743 into dev Nov 17, 2022
@iamacook iamacook deleted the improve-tx-creation-test branch November 17, 2022 13:54
@katspaugh katspaugh mentioned this pull request Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants