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: Expand interaction capabilities in test cases using fixtures #7057

Merged
merged 8 commits into from
Aug 29, 2023

Conversation

vinistevam
Copy link
Contributor

@vinistevam vinistevam commented Aug 24, 2023

Development & PR Process

  1. Follow MetaMask Mobile Coding Standards
  2. Add release-xx label to identify the PR slated for a upcoming release (will be used in release discussion)
  3. Add needs-dev-review label when work is completed
  4. Add the appropiate QA label when dev review is completed
    • needs-qa: PR requires manual QA.
    • No QA/E2E only: PR does not require any manual QA effort. Prior to merging, ensure that you have successful end-to-end test runs in Bitrise.
    • Spot check on release build: PR does not require feature QA but needs non-automated verification. In the description section, provide test scenarios. Add screenshots, and or recordings of what was tested.
  5. Add QA Passed label when QA has signed off (Only required if the PR was labeled with needs-qa)
  6. Add your team's label, i.e. label starting with team- (or external-contributor label if your not a MetaMask employee)

Description

When working on more complex flows using fixtures there was some limitation on overwriting some actions while the test ran. In order to improve and expand the fixture's capabilities the changes were applied:

  1. Included missing pieces of the default fixtures such as ApprovalController and remove PersonalMessageManager and TypedMessageManager.
  2. Inclusion of the withPermissionControllerConnectedToTestDapp to have the app connected to the test dapp.
  3. Preload an initial state when provided by fixtures in the createStore instead of overwriting the store's getState function.

Screenshots/Recordings

If applicable, add screenshots and/or recordings to visualize the before and after of your change

E2E
https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/64a4361e-c3ce-4ef9-b570-f878f6dee12e

Issue

fixes https://github.com/MetaMask/mobile-planning/issues/1217

Checklist

  • There is a related GitHub issue
  • Tests are included if applicable
  • Any added code is fully documented

@vinistevam vinistevam added the team-confirmations-system DEPRECATED: please use "team-confirmations" label instead label Aug 24, 2023
@github-actions
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.

@vinistevam vinistevam changed the title [DRAFT] Improve interactions in test cases with fixture [DRAFT] Expand interactions capabilities in test cases using fixtures Aug 25, 2023
@vinistevam vinistevam force-pushed the improve-interactions-in-test-cases-with-fixture branch from 20a4710 to 290bb5a Compare August 25, 2023 08:59
@vinistevam vinistevam marked this pull request as ready for review August 25, 2023 08:59
@vinistevam vinistevam requested a review from a team as a code owner August 25, 2023 08:59
@vinistevam vinistevam changed the title [DRAFT] Expand interactions capabilities in test cases using fixtures Expand interaction capabilities in test cases using fixtures Aug 25, 2023
@vinistevam vinistevam changed the title Expand interaction capabilities in test cases using fixtures test: Expand interaction capabilities in test cases using fixtures Aug 25, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2023

Codecov Report

Merging #7057 (b60e48f) into main (6b2d918) will decrease coverage by 0.01%.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##             main    #7057      +/-   ##
==========================================
- Coverage   32.83%   32.82%   -0.01%     
==========================================
  Files         998      998              
  Lines       26666    26671       +5     
  Branches     2091     2091              
==========================================
- Hits         8756     8755       -1     
- Misses      17492    17498       +6     
  Partials      418      418              
Files Changed Coverage Δ
app/components/UI/OnboardingWizard/index.js 12.19% <0.00%> (-2.10%) ⬇️
app/store/index.js 36.36% <100.00%> (-1.42%) ⬇️

cortisiko
cortisiko previously approved these changes Aug 25, 2023
Copy link
Member

@cortisiko cortisiko left a comment

Choose a reason for hiding this comment

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

PR is ✅

Andepande
Andepande previously approved these changes Aug 25, 2023
@vinistevam vinistevam dismissed stale reviews from Andepande and cortisiko via 4790b0b August 28, 2023 09:44
Copy link
Member

@OGPoyraz OGPoyraz left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarcloud
Copy link

sonarcloud bot commented Aug 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

18.8% 18.8% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

@vinistevam vinistevam merged commit bf2c1ff into main Aug 29, 2023
11 checks passed
@vinistevam vinistevam deleted the improve-interactions-in-test-cases-with-fixture branch August 29, 2023 04:36
@github-actions github-actions bot locked and limited conversation to collaborators Aug 29, 2023
@vinistevam vinistevam added the No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. label Aug 29, 2023
@metamaskbot metamaskbot added the release-7.7.0 Issue or pull request that will be included in release 7.7.0 label Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. release-7.7.0 Issue or pull request that will be included in release 7.7.0 team-confirmations-system DEPRECATED: please use "team-confirmations" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants