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] improve homepage class implementation #28797

Merged
merged 14 commits into from
Dec 3, 2024
Merged

Conversation

chloeYue
Copy link
Contributor

@chloeYue chloeYue commented Nov 28, 2024

Description

The current homepage class contains methods for asset, NFT, and activity lists, resulting in a long file that can make it challenging to locate specific methods. To improve organization and maintainability, I have refactored the homepage into four separate class files:

  • homepage
  • asset_list
  • nft_list
  • activity_list

Changes:
Refactoring: Split the methods into respective class files to streamline the structure and make the codebase more modular.
Method update: Removed the waitUntilAssetListHasItems method, as it duplicates the functionality of the existing check_tokenListItem method.

I added the skip-e2e-quality-gatelabel, as this PR involves many import line changes in test specs. However, there are no functional changes for tests and methods in this PR, i have only splitted original functions in different files.

Open in GitHub Codespaces

Related issues

Fixes:

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.

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 November 28, 2024 17:44
@chloeYue chloeYue changed the title test: migrate tests test: DRAFT migrate tests Nov 28, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [5195efb]
Page Load Metrics (1897 ± 143 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint152623891903301145
domContentLoaded151923381858292140
load152723881897298143
domInteractive24107452512
backgroundConnect875362411
firstReactRender155529157
getState44122832411
initialActions01000
loadScripts110718541434252121
setupStore617831
uiStartup175726252139332159
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@chloeYue chloeYue removed request for a team and kumavis December 2, 2024 10:04
@chloeYue chloeYue changed the title test: DRAFT migrate tests test: [POM] improve homepage page classes implementation Dec 2, 2024
@chloeYue chloeYue changed the title test: [POM] improve homepage page classes implementation test: [POM] improve homepage class implementation Dec 2, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [2cffd27]
Page Load Metrics (1841 ± 112 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint152424541847235113
domContentLoaded150524411819231111
load152224601841234112
domInteractive235931105
backgroundConnect67622199
firstReactRender149129199
getState46184933015
initialActions01000
loadScripts11191827137918991
setupStore6391073
uiStartup174128352113279134
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 December 2, 2024 11:14
seaona
seaona previously approved these changes Dec 2, 2024
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.

I really like this refactor! thanks @chloeYue 🙌 Skipping the quality gate also makes sense to me

@metamaskbot
Copy link
Collaborator

Builds ready [2f63212]
Page Load Metrics (1985 ± 155 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint39724951705606291
domContentLoaded148025471959318153
load149825701985324155
domInteractive24182443617
backgroundConnect882282110
firstReactRender1586322411
getState471911044120
initialActions01000
loadScripts103419881491278134
setupStore68014178
uiStartup171430422333324155
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@hjetpoluru hjetpoluru self-requested a review December 2, 2024 17:54
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.

Thanks @chloeYue for breaking down the pages to make them modular, clear and maintainable. I noted some observations in the other files, which will be addressed later as mentioned by you.

@chloeYue chloeYue requested a review from seaona December 2, 2024 21:56
@chloeYue chloeYue added this pull request to the merge queue Dec 3, 2024
Merged via the queue into main with commit af68fe5 Dec 3, 2024
75 checks passed
@chloeYue chloeYue deleted the migrate-homepage branch December 3, 2024 10:56
@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2024
@metamaskbot metamaskbot added the release-12.10.0 Issue or pull request that will be included in release 12.10.0 label Dec 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.10.0 Issue or pull request that will be included in release 12.10.0 skip-e2e-quality-gate team-extension-platform
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants