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: flaky anti-pattern getText + assert 2 #28043

Merged
merged 3 commits into from
Oct 24, 2024
Merged

Conversation

seaona
Copy link
Contributor

@seaona seaona commented Oct 23, 2024

Description

Continuing the work of removing the e2e anti-pattern of finding the element and then asserting its text.
There are more occurrences, but this work is split in several PRs, for an easy review and a faster ci.
Once all occurrences have been fixed, we'll be able to merge @HowardBraham 's PR for adding a lint rule which prevents introducing it again.

Open in GitHub Codespaces

Related issues

Fixes: (but doesn't yet closes) #19870

Manual testing steps

  1. Check ci

Screenshots/Recordings

Before

After

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.

@seaona seaona self-assigned this Oct 23, 2024
@seaona seaona added flaky tests area-qa Relating to QA work (Quality Assurance) labels Oct 23, 2024
Copy link
Contributor

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.

@seaona seaona marked this pull request as ready for review October 23, 2024 14:45
@seaona seaona requested a review from a team as a code owner October 23, 2024 14:45
vthomas13
vthomas13 previously approved these changes Oct 23, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [1e12317]
Page Load Metrics (1992 ± 105 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint176127252001209100
domContentLoaded17122705195320397
load172427261992219105
domInteractive19118492512
backgroundConnect8175404120
firstReactRender552071083617
getState459222110
initialActions01000
loadScripts12632193146619292
setupStore1184392612
uiStartup191629762255269129
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

let navigationElement = await driver.findElement(
'.confirm-page-container-navigation',
await driver.waitForSelector(
By.xpath("//div[normalize-space(.)='1 of 2']"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice job!

@hjetpoluru hjetpoluru self-requested a review October 23, 2024 18:55
hjetpoluru
hjetpoluru previously approved these changes Oct 23, 2024
Copy link
Contributor

@hjetpoluru hjetpoluru left a comment

Choose a reason for hiding this comment

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

LGTM

HowardBraham
HowardBraham previously approved these changes Oct 23, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [b8d31c8]
Page Load Metrics (1641 ± 70 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint27922041510427205
domContentLoaded14622087160812259
load14992218164114570
domInteractive208246178
backgroundConnect7133333215
firstReactRender44196912914
getState37515189
initialActions00000
loadScripts10591567119010048
setupStore1090232412
uiStartup16492637183720599
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@chloeYue chloeYue left a comment

Choose a reason for hiding this comment

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

LGTM ! Thanks for the refacto !

@seaona seaona added this pull request to the merge queue Oct 24, 2024
Merged via the queue into develop with commit b7a79d0 Oct 24, 2024
76 checks passed
@seaona seaona deleted the anti-pattern-get-text-2 branch October 24, 2024 09:29
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2024
@metamaskbot metamaskbot added the release-12.7.0 Issue or pull request that will be included in release 12.7.0 label Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-qa Relating to QA work (Quality Assurance) flaky tests release-12.7.0 Issue or pull request that will be included in release 12.7.0 team-extension-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants