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: Removing test selector strings within app code #7967

Merged
merged 4 commits into from
Dec 1, 2023

Conversation

cortisiko
Copy link
Member

@cortisiko cortisiko commented Nov 30, 2023

Description

We have instances where testIDs are not consistently stored in variables. This lack of uniformity can lead to redundant testID declarations throughout the codebase, resulting in code that is harder to maintain and prone to errors.

A more effective and best-practice approach is to store the testID value as a variable and then reference that variable when defining the testID property. By doing so, we centralize the testID values, reducing redundancy and making it easier to manage and maintain these identifiers throughout the codebase. This approach enhances code consistency and reduces the likelihood of introducing errors, ultimately contributing to a more robust and maintainable codebase.

Related issues

Fixes: #

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Passing Smoke tests: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/370a245b-4b4a-4b60-846d-2f8954da58b2

Passing Regression tests: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/4c9a6f33-680f-49e4-bf4a-aae67865492c

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@cortisiko cortisiko added No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. team-mobile-client labels Nov 30, 2023
@cortisiko cortisiko requested a review from a team as a code owner November 30, 2023 22:48
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (bbe9eeb) 36.66% compared to head (21c4ab2) 36.66%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7967   +/-   ##
=======================================
  Coverage   36.66%   36.66%           
=======================================
  Files        1090     1090           
  Lines       29115    29115           
  Branches     2668     2668           
=======================================
  Hits        10674    10674           
  Misses      17835    17835           
  Partials      606      606           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cortisiko cortisiko added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Nov 30, 2023
@cortisiko cortisiko linked an issue Nov 30, 2023 that may be closed by this pull request
2 tasks
@metamaskbot metamaskbot added in-progress and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Nov 30, 2023
@cortisiko cortisiko added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) Run Smoke E2E and removed in-progress labels Nov 30, 2023
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/370a245b-4b4a-4b60-846d-2f8954da58b2
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

Copy link

sonarcloud bot commented Nov 30, 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 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@chrisleewilcox chrisleewilcox left a comment

Choose a reason for hiding this comment

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

LGTM

@cortisiko cortisiko removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Dec 1, 2023
@cortisiko cortisiko merged commit 195a534 into main Dec 1, 2023
29 checks passed
@cortisiko cortisiko deleted the updating-testIds branch December 1, 2023 00:35
@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2023
@metamaskbot metamaskbot added the release-7.14.0 Issue or pull request that will be included in release 7.14.0 label Dec 1, 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.14.0 Issue or pull request that will be included in release 7.14.0 team-mobile-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Batch 3/7] Remove all instances of strings in TestID property in the app code
5 participants