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

feat(ramp): add webview debug by env vars #7341

Merged
merged 8 commits into from
Sep 28, 2023

Conversation

wachunei
Copy link
Member

@wachunei wachunei commented Sep 26, 2023

Description

This PR enables WebView debugging in android when either RAMP_DEV_BUILD or RAMP_INTERNAL_BUILD environment variables are set.

Manual testing steps

  1. Create a production build in bitrise with RAMP_INTERNAL_BUILD set to true
  2. When using the generated APK staging Ramp API is be used and Checkout View WebView must be debuggable

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained:
    • What problem this PR is solving.
    • How this problem was solved.
    • How reviewers can test my changes.
  • I’ve indicated what issue this PR is linked to: Fixes #???
  • I’ve included tests if applicable.
  • I’ve documented any added code.
  • I’ve applied the right labels on the PR (see labeling guidelines).
  • 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.

@wachunei wachunei marked this pull request as ready for review September 26, 2023 23:00
@wachunei wachunei requested a review from a team as a code owner September 26, 2023 23:00
@wachunei wachunei added team-mobile-platform team-ramp issues related to Ramp features needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Sep 26, 2023
@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (c865d3c) 34.60% compared to head (80a0e2c) 34.60%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7341   +/-   ##
=======================================
  Coverage   34.60%   34.60%           
=======================================
  Files        1017     1017           
  Lines       27144    27144           
  Branches     2205     2205           
=======================================
  Hits         9393     9393           
  Misses      17262    17262           
  Partials      489      489           
Files Coverage Δ
app/components/UI/Ramp/sdk/index.tsx 19.11% <100.00%> (ø)

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

@wachunei
Copy link
Member Author

I confirm this build with RAMP_INTERNAL_BUILD set to true has the debugging mode on
image

@wachunei
Copy link
Member Author

I also confirm this build without the env var shows the debugging inspector 🤔
image

@wachunei
Copy link
Member Author

With latest changes I can confirm the changes are working as expected:

Copy link
Contributor

@sethkfman sethkfman left a comment

Choose a reason for hiding this comment

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

LGTM

@wachunei wachunei removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Sep 27, 2023
@wachunei
Copy link
Member Author

Blocked by #7345, will merge after resolution

@wachunei
Copy link
Member Author

Blocked by #7347, will merge after resolution

@sonarcloud
Copy link

sonarcloud bot commented Sep 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

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@wachunei wachunei merged commit 75e031e into main Sep 28, 2023
24 checks passed
@wachunei wachunei deleted the feat/ramp-debug-webview-uat-build branch September 28, 2023 14:33
@github-actions github-actions bot locked and limited conversation to collaborators Sep 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants