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: [POM] create ResetPasswordPage for e2e tests and migrate 2 test files to POM #27244

Merged
merged 6 commits into from
Sep 20, 2024

Conversation

devin-ai-integration[bot]
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Sep 18, 2024

Description

This pull request creates the ResetPasswordPage class for the E2E tests page object model and migrates 2 test files in test/e2e/tests/account to POM and TypeScript, with enhanced log messages.

I have placed the test test/e2e/tests/account/metamask-responsive-ui.spec.js outside the account folder because these tests don't test account functionality. They are for testing the extension UI in small viewports.

Open in GitHub Codespaces

Related issues

Fixes: #27245

Manual testing steps

Check code readability, make sure tests pass.

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.

@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner September 18, 2024 10:26
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.

@chloeYue chloeYue marked this pull request as draft September 18, 2024 11:23
@chloeYue chloeYue self-assigned this Sep 18, 2024
@chloeYue chloeYue added team-extension-platform team-ai AI team (for the Devin AI bot) labels Sep 18, 2024
@chloeYue chloeYue changed the title MetaMask Extension Password Page Tests Migration test: MetaMask Extension Password Page Tests Migration Sep 18, 2024
Copy link

sonarcloud bot commented Sep 18, 2024

@chloeYue chloeYue changed the title test: MetaMask Extension Password Page Tests Migration test: [POM] create ResetPasswordPage for e2e tests and migrate 2 test files to POM Sep 18, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [4618b4a]
Page Load Metrics (1810 ± 98 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint21320821560542260
domContentLoaded14712406177920598
load14872416181020598
domInteractive22112522512
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@chloeYue chloeYue marked this pull request as ready for review September 18, 2024 12:20
DDDDDanica
DDDDDanica previously approved these changes Sep 18, 2024
@DDDDDanica
Copy link
Contributor

LGTM !

@@ -33,6 +33,19 @@ class AccountListPage {
'.multichain-account-menu-popover__list--menu-item-hidden-account [data-testid="account-list-item-menu-button"]';
}

async check_pageIsLoaded(): Promise<void> {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe to follow the same as what we did in the other PR, I would suggest to place the checks at the end

Copy link
Contributor

Choose a reason for hiding this comment

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

oh or maybe is it better to order everything alphabetically? As I see that in other places it is ordered alphabetically including the checks. In that case we can leave this as it is, but we can modify the order of the other page (linked PR above), in another PR

Copy link
Contributor

@chloeYue chloeYue Sep 18, 2024

Choose a reason for hiding this comment

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

Thanks for pointing out @seaona ! What I'm thinking for the order is: check_pageIsLoaded() first, followed by action methods ordered alphabetically, and then all check_ methods ordered alphabetically(as they all start with check_).
The reason for placing check_pageIsLoaded() first is that all page classes will have this specific method, and when we create an object for the page, we usually need to call it before performing other actions. Thus, putting this specific method at the beginning will make it easier to find.
What do you think about this approach? If you agree, we can make it a standard.

seaona
seaona previously approved these changes Sep 18, 2024
…wed by action and check methods alphabetically
Copy link

sonarcloud bot commented Sep 18, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [c541f90]
Page Load Metrics (1763 ± 54 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint21219281547565271
domContentLoaded15061887174110651
load15171928176311254
domInteractive1590412010
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@chloeYue chloeYue merged commit a1962dc into develop Sep 20, 2024
77 checks passed
@chloeYue chloeYue deleted the devin-password-page-tests-migration branch September 20, 2024 07:53
@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 2024
@metamaskbot metamaskbot added the release-12.6.0 Issue or pull request that will be included in release 12.6.0 label Sep 20, 2024
@metamaskbot metamaskbot 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 29, 2024
@metamaskbot
Copy link
Collaborator

Missing release label release-12.5.0 on PR. Adding release label release-12.5.0 on PR and removing other release labels(release-12.6.0), as PR was added to branch 12.5.0 when release was cut.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.5.0 Issue or pull request that will be included in release 12.5.0 team-ai AI team (for the Devin AI bot) team-extension-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[POM][Devin] Create page classes for ResetPasswordPage and provide more e2e tests migration examples
4 participants