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

test: allow more simple findElement by data-testid #28065

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Conversation

HowardBraham
Copy link
Contributor

@HowardBraham HowardBraham commented Oct 24, 2024

Description

Allows you to convert code like

await driver.findElement({
  css: '[data-testid="aaa"]',
  text: 'bbb',
});

into

await driver.findElement({
  testId: 'aaa',
  text: 'bbb',
});

It cannot handle these two more complex cases, so just leave them as is:

  1. '[data-testid="aaa"] input'
  2. 'button[data-testid="aaa"]'

Open in GitHub Codespaces

Related issues

Manual testing steps

Try some conversions in spec files

Screenshots/Recordings

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.

@HowardBraham HowardBraham added the team-tiger Tiger team (for tech debt reduction + performance improvements) label Oct 24, 2024
@HowardBraham HowardBraham self-assigned this Oct 24, 2024
@HowardBraham HowardBraham requested a review from a team as a code owner October 24, 2024 09:02
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.

@github-actions github-actions bot added the team-contributor-experience MetaMask Contributor Experience Group label Oct 24, 2024
@HowardBraham HowardBraham removed the team-contributor-experience MetaMask Contributor Experience Group label Oct 24, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [79119ff]
Page Load Metrics (2103 ± 86 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint17772431209817885
domContentLoaded17242374205317484
load17752435210317886
domInteractive308756178
backgroundConnect1499462713
firstReactRender5112497157
getState95324168
initialActions01000
loadScripts12871815152413565
setupStore136929199
uiStartup19312650231519594
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Contributor

@seaona seaona left a comment

Choose a reason for hiding this comment

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

nice addition 🔥

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.

Wow this helps a lot..

@HowardBraham HowardBraham added this pull request to the merge queue Oct 25, 2024
Merged via the queue into develop with commit 32a3b07 Oct 25, 2024
83 checks passed
@HowardBraham HowardBraham deleted the data-testid branch October 25, 2024 19:32
@github-actions github-actions bot locked and limited conversation to collaborators Oct 25, 2024
@metamaskbot metamaskbot added the release-12.7.0 Issue or pull request that will be included in release 12.7.0 label Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.7.0 Issue or pull request that will be included in release 12.7.0 team-tiger Tiger team (for tech debt reduction + performance improvements)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants