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

Deprecate bap modal android #7817

Merged
merged 5 commits into from
Feb 4, 2021
Merged

Deprecate bap modal android #7817

merged 5 commits into from
Feb 4, 2021

Conversation

deeppandya
Copy link
Contributor

Resolves brave/brave-browser#13798

Submitter Checklist:

  • There is a ticket for my issue.
  • Used Github auto-closing keywords in the commit message.
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed).
  • Requested a security/privacy review as needed.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

@deeppandya deeppandya added CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 CI/skip-ios Do not run CI builds for iOS labels Feb 4, 2021
@deeppandya deeppandya added this to the 1.22.x - Nightly milestone Feb 4, 2021
@deeppandya deeppandya self-assigned this Feb 4, 2021
@@ -372,6 +389,67 @@ public void finishNativeInitialization() {
calender.getTimeInMillis());
}
checkSetDefaultBrowserModal();
if (mBraveRewardsNativeWorker != null) {
mBraveRewardsNativeWorker.StartProcess();
Copy link
Member

@SergeyZhukovsky SergeyZhukovsky Feb 4, 2021

Choose a reason for hiding this comment

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

Maybe we shouldn't start it where rewards are not available, x86 devices? The same related to an observer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. updating it.

Copy link
Member

@SergeyZhukovsky SergeyZhukovsky left a comment

Choose a reason for hiding this comment

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

++

@LaurenWags
Copy link
Member

Verified using LG Nexus 5 with Android 5.1 running 1.22.22 Bravearm.apk

Verified test plan from brave/brave-browser#13798

Scenario 1: Non-JP Regions

Checked with US/English

Confirmed able to claim staging promotion:

Example Example Example
US1 US2 US3

Confirmed BAP popup does not appear.
Confirmed BAP alert does not display on NTP when system date is set to 2021-03-06.
Confirmed wallet balance is not zero when system date is set to 2021-03-13:

Example Example
US4 US5
Scenario 2: JP Region

Checked with Japan/Japanese (unable to check with Japan/English on my device). Note, issue encountered where Japanese translations are missing, logged with brave/brave-browser#14117.

Open NTP with zero BAP balance. Confirmed no BAP popup.

Confirmed able to claim UGP grant, balance is now non-zero (30 BAP)

Example Example Example
1 2 3

Confirmed BAP popup displays when there is a non-zero BAP balance:

Portrait Landscape
tooltip-portrait tooltip-landscape

Confirmed tapping outside of the BAP popup closes the popup (there is no "x" to close).
Confirmed clicking on "Learn More" shows the BAP alert:

Portrait Landscape
modal-portrait modal-landscape

Confirmed able to close the BAP alert via "OK".
Confirmed opening a NTP did not show the BAP popup again.
Confirmed in 3 days the BAP popup shows on NTP again (advanced device clock per test plan).

Confirmed when computer date is 2021-03-06 and Brave is opened, the BAP alert is displayed and the BAP popup is not.
Confirmed able to close the BAP alert via "OK".
Confirmed opening a NTP did not show the BAP popup again if it had been dismissed.
Confirmed in 3 days the BAP popup shows on NTP again (advanced device clock per test plan).

Confirmed when computer date is 2021-03-13 and Brave is opened, the BAP popup and alert are not displayed.
Confirmed that the BAP balance is now zero on the panel and brave://rewards:

Example Example
4 5

Encountered the following while testing Scenario 2

@srirambv
Copy link
Contributor

Verification passed on OnePlus 6T with Android 10 running 1.22.24 x64 Nightly build

Scenario 1: Non-JP region
  • Verified able to claim promotions
  • Verified no BAP modal is shown
  • Verified no BAP alert is shown when device date is set to 3 Mar 2021
  • Verified no BAP alert is shown when device date is set to 14 Mar 2021
  • Verified wallet balance doesn't change or resets to zero when device date is set to 14 Mar 2021
image image image
Scenario 2: JP region
  • Verified setting device locale to JP shows and clean install with 0 BAP balance doesn't show any BAP deprecation modal
  • Verified able to claim grant and wallet balance updates
  • Verified upgrading to 1.22.41 with a wallet balance shows the deprecation modal upon launch
  • Verified modal shows up again when the device date is moved ahead by 3 days
  • Verified clicking on learn more brings up a bigger modal with details
  • Verified tapping outside the modal closes it
  • Verified clicking only on OK closes the BAP info modal and not tapping outside the modal
  • Verified moving device date to 6 Mar shows only the BAP alert not the tooltip on Rewards
  • Verified moving device date to 13 Mar doesn't show BAP alert or tooltip and wallet balance is reset to 0
  • Verified when device date/time is set to Mar 12 11.59PM, keeping the browser active with a wallet balance is reset to 0 without having to restart the browser
image image image image

deeppandya added a commit that referenced this pull request Feb 18, 2021
deeppandya added a commit that referenced this pull request Feb 18, 2021
deeppandya added a commit that referenced this pull request Feb 18, 2021
This was referenced Feb 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/skip-ios Do not run CI builds for iOS CI/skip-macos-x64 Do not run CI builds for macOS x64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate BAP modal
4 participants