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: update input raw locator in account watcher e2e to use element ID #26950

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

k-g-j
Copy link
Contributor

@k-g-j k-g-j commented Sep 5, 2024

Description

This PR addresses the issue of flaky account watcher tests on develop. I updated the input selector used in these tests to be more reliable, moving away from using the placeholder text as a locator since the placeholder text may vary depending on the network and using 'input#address-input[type="text"]'. This change should improve the stability of our test suite and reduce the occurrence of false negatives in our CI pipeline.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/accounts-planning/issues/584#issue-2508418003

Manual testing steps

  1. Build for test yarn build:test or yarn build:test:fask
  2. Run the test suite
  • Chrome: yarn test:e2e:single test/e2e/accounts/create-watch-account.spec.ts --browser=chrome --leave-running
  • Firefox: yarn test:e2e:single test/e2e/accounts/create-watch-account.spec.ts --browser=firefox --leave-running
  1. Verify that the tests pass consistently across multiple runs
  2. Check that the new selector correctly identifies the input field in different browser environments

Screenshots/Recordings

NA

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

github-actions bot commented Sep 5, 2024

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.

@k-g-j k-g-j added e2e-test End to end test for the MetaMask extension flaky tests labels Sep 5, 2024
Copy link

sonarcloud bot commented Sep 5, 2024

@k-g-j k-g-j marked this pull request as ready for review September 5, 2024 21:05
@k-g-j k-g-j requested a review from a team as a code owner September 5, 2024 21:05
@metamaskbot
Copy link
Collaborator

Builds ready [2791ebd]
Page Load Metrics (1966 ± 162 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22628661873504242
domContentLoaded163428551939319153
load164328701966338162
domInteractive229043178
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

codecov bot commented Sep 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.17%. Comparing base (2455440) to head (2791ebd).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #26950      +/-   ##
===========================================
- Coverage    70.17%   70.17%   -0.00%     
===========================================
  Files         1425     1425              
  Lines        49644    49647       +3     
  Branches     13889    13889              
===========================================
+ Hits         34835    34836       +1     
- Misses       14809    14811       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@plasmacorral
Copy link
Contributor

Using Codespaces, was able to observe the flake in create-watch-account.spec.ts. With these changes (commit 2791ebd) the updated spec passes in Codespaces on a flask build.

Copy link
Contributor

@plasmacorral plasmacorral left a comment

Choose a reason for hiding this comment

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

LGTM and passes in Codespaces with this change.

@k-g-j k-g-j merged commit c7e2b6e into develop Sep 6, 2024
97 checks passed
@k-g-j k-g-j deleted the fix/account-watcher-flaky-e2e branch September 6, 2024 16:40
@github-actions github-actions bot locked and limited conversation to collaborators Sep 6, 2024
@metamaskbot metamaskbot added the release-12.6.0 Issue or pull request that will be included in release 12.6.0 label Sep 6, 2024
@gauthierpetetin gauthierpetetin added release-12.5.0 Issue or pull request that will be included in release 12.5.0 and removed release-12.6.0 Issue or pull request that will be included in release 12.6.0 labels Sep 11, 2024
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e2e-test End to end test for the MetaMask extension flaky tests release-12.5.0 Issue or pull request that will be included in release 12.5.0 team-accounts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants