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

[Android] Implement Estimated Earnings indicator 2.0 #30352

Closed
2 tasks done
Miyayes opened this issue May 16, 2023 · 2 comments · Fixed by brave/brave-core#18652
Closed
2 tasks done

[Android] Implement Estimated Earnings indicator 2.0 #30352

Miyayes opened this issue May 16, 2023 · 2 comments · Fixed by brave/brave-core#18652
Assignees
Labels
feature/rewards OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass - Android ARM QA Pass - Android Tab QA/Test-All-Platforms QA/Yes release-notes/include

Comments

@Miyayes
Copy link
Collaborator

Miyayes commented May 16, 2023

Description

Tasks

Note: Change font to default Android font in this PR. Also, remove the USD values from the Rewards summary table. @sujitacharya2005

@Miyayes for spec.

@Miyayes Miyayes added feature/rewards QA/Yes release-notes/include OS/Android Fixes related to Android browser functionality labels May 16, 2023
@Miyayes Miyayes added this to New Issues in Brave Rewards via automation May 16, 2023
@Miyayes Miyayes added the priority/P2 A bad problem. We might uplift this to the next planned release. label May 17, 2023
@Miyayes Miyayes moved this from New Issues to Backlog in Brave Rewards May 17, 2023
@Miyayes Miyayes moved this from Backlog to On deck in Brave Rewards May 19, 2023
@Miyayes Miyayes moved this from On deck to In progress in Brave Rewards May 26, 2023
Brave Rewards automation moved this from In progress to Done Jun 1, 2023
@brave-builds brave-builds added this to the 1.54.x - Nightly milestone Jun 1, 2023
@GeetaSarvadnya GeetaSarvadnya added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Jul 24, 2023
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Jul 24, 2023

Verification PASSED on Vivo X70 Pro version 12 running Bravemonoarm64.apk_1.57.19

New users

Case 1: Verify default estimated earnings value_PASSED
  1. Clean profile 1.57.x
  2. Enable rewards and connect a custodian
  3. Verify the default Estimated earnings value
  4. Confirmed that the Estimated earnings value is 0.000 BAT in the brave://rewrads and BR panel
Brave://rewards BR panel
Screenshot_20230724_191644 Screenshot_20230724_191651
Case 2: Verify the estimated earnings range when a regular or default ad is viewed_PASSED
  1. Clean profile 1.57.x
  2. Enable rewards and connect a custodian
  3. View a Ad
  4. Verify the Estimated earning on the UI
  5. Confirmed that the Estimated earning range is 0.008 - 0.010 BAT in the brave://rewrads and BR panel
  6. Confirm that the lower bound is multiplied by 0.8x hence the lower bound value is 0.008
Brave://rewards BR panel
Screenshot_20230724_173323 Screenshot_20230724_173334
Case 3: Verify the estimated earnings range when two regular ads are viewed_PASSED
  1. Clean profile 1.57.x
  2. Enable rewards and connect a custodian
  3. View two Ads
  4. Verify the Estimated earning on the UI
  5. Confirmed that the Estimated earning range is 0.016 - 0.020 BAT in the brave://rewrads and BR panel
  6. Confirm that the lower bound is multiplied by 0.8x for each ad
Brave://rewards BR panel
Screenshot_20230724_173835 Screenshot_20230724_173847
Case 4: Verify the estimated earnings range in the payout pending status message_PASSED
  1. Clean profile 1.57.x
  2. Enable rewards and connect a custodian
  3. View a Ad
  4. Confirmed that ad is successfully redeemed with the server
  5. Close the browser
  6. Set the sys date to begining of the next month but before the payout date (8th Aug is payout date for IN, the payout date varies for different regions), I have set the sys date to 4th Aug in my case
  7. Confirmed that the Estimated earning range is 0.008 - 0.010 BAT is shown in the payout pending status message in the brave://rewrads page

Screenshot_20230804_210416

Case 5: Verify the estimated earnings range in the payout processing status message_PASSED
  1. Continuation of case 3
  2. Confirmed that ads are redeemed/cashed in with the server for the July month
  3. Close the browser
  4. Advance the system date to 9th Aug (day after the payout date)
  5. Have a Charles Proxy rules set up to return "processing"
  6. Relaunch the browser
  7. Confirmed that the Estimated earning range is 0.008 - 0.010 BAT is shown in the payout processing status message in the brave://rewrads page

Screenshot_20230809_213224

Case 6: Verify estimated earnings range when a NTPSI is viewed_PASSED
  1. Clean profile 1.57.x
  2. Enable reward in the production environmnet, select Cayman island from the country dropdown
  3. View a NTP SI
  4. Connect Cayman island production uphold account (account details are taken from 1Password)
  5. Confirmed that the estimated earnings range 0.000 - 0.005 BAT shown in the brave://rewrads and BR panel
  6. Confirmed that the lower bound is NOT multiplied by 0.8x for NTPSI view
  7. Confirmed that max bound value = lower bound + NTPSI earning (i.e 0.000 + 0.005)
Example Example Example
Screenshot_20230726_163544 Screenshot_20230726_163549 Screenshot_20230726_163555
Case 7: Verify estimated earnings range when two NTPSI's viewed_PASSED
  1. Clean profile 1.57.x
  2. Enable reward in the production environmnet, select Cayman island from the country dropdown
  3. View a NTP SI
  4. Connect Cayman island production uphold account (account details are taken from 1Password)
  5. Confirmed that estimated earnings range 0.000 - 0.005 BAT shown in the brave://rewrads, BR panel and NTP
  6. View 2nd NTP SI (Note: you may need to advanceset the sys clock ahead by one day to view 2nd NTPSI, currently there is only one NTPSI is configured in prod env)
  7. Confirmed that estimated earnings range 0.000 - 0.010 BAT shown in the brave://rewrads, BR panel and NTP
  8. Confirmed that the lower bound is NOT multiplied by 0.8x for NTPSI view
  9. Confirmed that max bound value = lower bound + NTPSI earning (i.e 0.000 + 0.010)
Case 8: Verify estimated earnings range when NTPSI + regular ad is viewed_PASSED
  1. Clean profile 1.57.x enable rewrads and connect Cayman Island uphold production account
  2. View a NTPSI
  3. View a regular Ad
  4. Verify that the lower bound should be multiplied by 0.8x for the regular ad notification
  5. Confirmed that the lower bound is NOT multiplied by 0.8x for the NTPSI view
  6. Confirmed that NTP SI and Regular ad view earnings are combined in the max bound value hence the max bound value is 0.055 BAT (0.005 + 0.05 = 0.055 BAT)
  7. Verified that the estimated earning range 0.040 - 0.055 BAT is shown in the brave://rewrads and BR panel as expected
Example Example Example
Screenshot_20230726_163637 Screenshot_20230726_163642 Screenshot_20230726_163649

Logs:

2023-07-26 16:35:25.385 6866-6866/? V/chromium: [VERBOSE3:account.cc(248)] Successfully processed deposit for new_tab_page_ad with creative instance id 9165d3d8-f62e-4eb2-87a0-5f0f2bf3089d and view valued at 0.005

2023-07-26 16:36:03.989 6866-6866/? V/chromium: [VERBOSE3:account.cc(248)] Successfully processed deposit for ad_notification with creative instance id c83aa8f6-1da9-491f-be8f-e1453500c19a and view valued at 0.05

Existing users

Grandfathered unconnected state_view regular ads_PASSED
  1. Clean profile 1.47.119 beta build
  2. Enable rewards
  3. Confirmed that the estimated earnings is 0.000 BAT

1.47.119

Example Example Example
Screenshot_20230725_200918 Screenshot_20230725_200923 Screenshot_20230725_200928
  1. Upgrade the profile to 1.57.x
  2. Estimated earning is displayed as -- Learn more
  3. View an Ad (ad notification count is 1 but the estimated earnings is still -- Learn more
  4. Connect a custodian
  5. The estimated earnings range is displayed as 0.080 - 0.100 BAT as expected

1.57.x

Example Example Example Example Example Example
Screenshot_20230725_201027 Screenshot_20230725_201032 Screenshot_20230725_201038 Screenshot_20230725_201159 Screenshot_20230725_201453 Screenshot_20230725_201459
Grandfathered connected state_view regular ads_PASSED
  1. Clean profile 1.47.119 beta build
  2. Enable rewards and connect a custodian
  3. Confirmed that the estimated earnings is 0.000 BAT

1.47.119

Example Example Example
Screenshot_20230725_200918 Screenshot_20230725_200923 Screenshot_20230725_200928
  1. Upgrade the profile to 1.57.x
  2. Confirmed that the estimated earnings is 0.000 BAT
  3. View a regular ad
  4. Confirmed that the estimated earnings range is displayed as 0.008 - 0.010 BAT as expected
  5. The lower bound is multiplied by 0.8x

1.57.6

Example Example Example Example Example Example
Screenshot_20230725_201027 Screenshot_20230725_201032 Screenshot_20230725_201038 Screenshot_20230725_201159 Screenshot_20230725_201453 Screenshot_20230725_201459
Connected state_view regular ads and then upgrade_PASSED
  1. Install 1.53.100 beta build
  2. Enable rewards and connect a uphold custodian
  3. View couple of ads (I have viewed 3 ads )
  4. Confirmed that the estimated earnings 0.030 BAT is displayed on the brave://rewrads, BR panel and NTP widget

1.53.100

Example Example Example
Screenshot_20230725_215844 Screenshot_20230725_215850 Screenshot_20230725_215857
  1. Upgrade the profile to 1.57.x beta build
  2. Confirmed that the ads estimated earning 0.030 BAT in converted into estimated earning range of 0.024 - 0.030 BAT
  3. I have got one more ad when I upgrade the profile (no got ad in Android)
  4. So total no of ads viewed are 2
  5. Confirmed that the Estimated earning range is displayed as 0.016 - 0.020 BAT in the brave://rewrads and BR panel
  6. Confirmed that the lower bound is multiplied by 0.8x for each ad (i.e 2 ads * 0.08 = 0.016)

1.57.x

Example Example Example
Screenshot_20230725_220117 Screenshot_20230725_220122 Screenshot_20230725_220129
  1. Confirmed that few ads are redeemed/cashed in with the server (1 ads is redeemed with server in my case)
  2. Close the browser
  3. Advanvce the sys clock to begining of the next month (before payout date), I have set it to 3rd Aug
  4. Relaunch the browser
  5. Confirmed that the estimated earning range is shown correctly in the payout pending message

Screenshot_20230803_220830

Connected state_view regular ads +NTPSI's and then upgrade_PASSED
  1. Install 1.53.100 beta build
  2. Enable rewards in production env, select Cayman Island from the country dropdown
  3. View a NTPSI
  4. Connect to production uphold account
  5. View 1st regular ad
  6. View 2nd regular ad
  7. Total no of ads viewed are 3 (1 NTPSI + 2 regular ad)
  8. Confirmed that the estimated earnings 0.025 BAT is displayed on the brave://rewrads and BR panel
  9. Upgrade the profile to 1.57.x
  10. Open brave://rewards page
  11. Total no of ads viewed are 3 (1 NTP SI + 2 Regular ads)
  12. Estimated earnings range is 0.016 - 0.025 BAT
  13. max bound value is 0.025 (estimated earnings for NTPSI and regular ad 0.005+0.01+0.01)
  14. The lower bound value is also correct, 0.8x is multiplied for each regular ad

1.57.x

Example Example Example
Screenshot_20230727_172733 Screenshot_20230727_172738 Screenshot_20230727_172744
Connected state_view NTPSI's and then upgrade_PASSED
  1. Install 1.53.100 beta build
  2. Enable rewards in production env, select Cayman Island from the country dropdown
  3. View a NTPSI
  4. Connect to production uphold account
  5. Upgrade the profile to 1.57.x (sceenshots not taken for 1.57.x)
  6. Confirmed that the estimated earnings range is shown as expected 0.000 - 0.005 BAT
  7. Lower bound is 0.000 BAT which is expected as 0.8x is not multiplied for the NTPSI ad
  8. Max bound is 0.005 BAT is as expected

1.53.x

Example Example Example
Screenshot_20230726_173859 Screenshot_20230726_173903 Screenshot_20230726_173908

1.57.x

Example Example Example
Screenshot_20230726_173953 Screenshot_20230726_173959 Screenshot_20230726_174004

UI checks

Confirmed that the estimated earnings range indicator is shown correctly in brave://rewards, BR panel and NTP

Light theme

brave://rewards BR panel
Screenshot_20230726_174439 Screenshot_20230726_174449

Dark theme

brave://rewards BR panel
Screenshot_20230726_174511 Screenshot_20230726_174525

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Jul 31, 2023

Verification PASSED on Samsung Tab A7 version 12 running Bravemonoarm64.apk_1.57.32

UI checks_Estimated earnings Indicator_PASSED

Light theme

brave://rewards BR panel BR panel estimated earnings indicator
Screenshot_20230801-173143_Brave - Beta Screenshot_20230801-173152_Brave - Beta Screenshot_20230801-173206_Brave - Beta

Dark theme

brave://rewards BR panel BR panel estimated earnings indicator
Screenshot_20230801-173052_Brave - Beta Screenshot_20230801-173103_Brave - Beta Screenshot_20230801-173109_Brave - Beta
Case 2: Verify the estimated earnings range when a regular or default ad is viewed_PASSED
  1. Clean profile 1.57.x
  2. Enable rewards and connect a custodian
  3. View a Ad
  4. Verify the Estimated earning on the UI
  5. Confirmed that the Estimated earning range is 0.008 - 0.010 BAT in the brave://rewrads and BR panel
  6. Confirm that the lower bound is multiplied by 0.8x hence the lower bound value is 0.008
Brave://rewards BR panel
Screenshot_20230801-173143_Brave - Beta Screenshot_20230801-173152_Brave - Beta

@GeetaSarvadnya GeetaSarvadnya added QA/In-Progress Indicates that QA is currently in progress for that particular issue QA Pass - Android Tab and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/rewards OS/Android Fixes related to Android browser functionality priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass - Android ARM QA Pass - Android Tab QA/Test-All-Platforms QA/Yes release-notes/include
Projects
Brave Rewards
  
Done
Development

Successfully merging a pull request may close this issue.

5 participants