Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Ledger Refactor Test Cases - MacOS #11214

Closed
50 of 56 tasks
LaurenWags opened this issue Sep 29, 2017 · 0 comments
Closed
50 of 56 tasks

Ledger Refactor Test Cases - MacOS #11214

LaurenWags opened this issue Sep 29, 2017 · 0 comments

Comments

@LaurenWags
Copy link
Member

LaurenWags commented Sep 29, 2017

Backup Wallet

  • Verify you are able to select ‘Backup your wallet’ button in Advanced Settings.
  • Verify copy button for Key 1 copies key individually exactly as shown on screen.
  • Verify copy button for Key 2 copies key individually exactly as shown on screen.
  • Verify when you select ‘Print keys’ button, a new tab is opened which shows both keys exactly as shown in Brave.
  • Verify when you select ‘Save recovery file…’ button, you are prompted to download the recovery file. Download the recovery file, open, and verify both keys are exactly as shown in Brave.

Recover Wallet

  • Verify you are able to select ‘Recover your wallet’ button in Advanced Settings.
  • Start with a clean profile. Verify you are able to manually enter valid key values into Recovery Key 1 and Recovery Key 2 fields. Select Recover button. Verify the expected wallet is recovered successfully. Navigate back to Backup Wallet. Verify both Keys are displayed exactly as expected in Brave.
  • Start with a clean profile. Verify you are able to select the ‘Import recovery keys’ button and a file navigation window is displayed. Navigate to your wallet backup file. Verify the expected wallet is recovered successfully. Navigate back to Backup Wallet. Verify both Keys are displayed exactly as per the imported file in Brave.
  • Navigate to ‘Recover your Brave wallet’. Verify you are not able to recover a Brave wallet with only 1 key.

Show only included sites toggle

  • Have data in your ledger table that is a mix of included and not-included sites. Toggle ‘Show only included sites’ to on. Verify only those sites which are marked as ‘include’ in your table are displayed. Toggle ‘Show only included sites’ off. Verify sites which are not marked as ‘include’ are visible.

General ledger table

  • Visit a verified publisher (brianbondy.com, clifton.io, alexwykoff.com, etc). Test that verified publisher icon displays.
  • Visit a non-verified publisher (nytimes.com, etc). Test that the verified publisher icon is not displayed.
  • Verify the ‘Site’ column displays the site and favicon (if applicable).
  • Verify you are able to modify the ‘Include’ toggle for any site as long as the site is not ‘pinned’.
  • Verify any sites which are marked as ‘Include’ (via the toggle in the table) display at the top of the list, sites that are not marked as ‘Include’ display at the bottom. (note, this only applies with default sorting)
  • Verify Views displays the number of views.
  • Verify Time Spent displays the amount of time spent. (Note, per discussions time is calculated from when you leave a page to open a new tab, click on a link (sometimes), etc).
  • Verify % displays the calculated or entered percentage (when site is pinned).
  • Verify you are able to sort by Site, Include, Views, Time Spent, and %.
  • Verify you are able to pin a site.
  • Verify pinned sites are displayed at the top of the table.
  • Verify when you pin a site, you are able to modify the %. When you modify the site’s %, other percentages update to compensate so that overall % does not exceed 100.
  • Verify that if you enter 0 for a pinned site, it will change to 1.
  • Verify that if you have more than one pinned site and you enter 100 for the % for a single site, the percentages for the other sites are dynamic. (ex. If you have 3 pinned sites and change one to be 100%, you will actually see 98% for the site you changed and 1% each for the remaining pinned sites).
  • Visit a bunch of sites (10-15 different ones). Verify not all are displayed, you are able to view all by selecting the ‘Show all’ button. (note, sites that are shown should amount to approximately 90% from the % column, but not exceed 90%). Verify once the entire list is shown, you are able to show less by selecting the ‘Hide lower’ button which will return you to the previous display.
  • Verify that you can remove individual websites from the ledger table using the “bin” icon
  • Ensure that websites that have been removed from the ledger table are appearing under “Saved Site Exceptions” via about:preferences#shields
  • Verify that removed websites that are displayed under “Saved Site Exceptions” via about:preferences#shields are not being re-added into the ledger table
  • Verify that revisiting a website that has been removed from “Saved Site Exceptions” via about:preferences#shields re-appears in the ledger table when revisited

Auto-include toggle

  • Verify ‘auto-include’ toggle is on by default.
  • Verify when you visit a site which has met the default criteria from Advanced Settings, the site is added to the table with the ‘Include’ toggle enabled.
  • Verify you can turn off the auto-include toggle.
  • Verify when you visit a site which has met the default criteria from Advanced Settings, the site is added to the table with the ‘Include’ toggle disabled.

URL Icon

  • Turn off ‘Include’ for a site in your table. Visit this site. Verify that the publisher icon in the URL bar is gray. Click on the icon. Verify the icon is now yellow. Go back to the ledger table. Verify the site is now ‘included’.
  • Navigate to a site that has the ‘include’ toggle enabled in your table. Verify that the publisher icon in the URL bar is yellow. Click on the icon, it will now be gray. Go back to the ledger table. Verify the site is no longer ‘included’.
  • Turn off ‘Include’ for a verified publisher site in your table. Visit this site. Verify that the publisher icon in the URL bar is gray, but a green checkmark is displayed on the icon. Click on the icon. Verify the icon is yellow and retains the green checkmark. Go back to the ledger table. Verify this site is now ‘included’.
  • Navigate to a verified publisher site that has the ‘include’ toggle enabled in your table. Verify that the publisher icon in the URL bar is yellow with the green checkmark. Click on the icon, it will now be gray with the green checkmark. GO back to the ledger table. Verify the site is no longer ‘included’.

Advanced Settings

  • Navigate to Advanced Settings. Verify the default settings are 8s for minimum page time and 1 visit for minimum page visit. Close this window and navigate to a new site for less than 8s. Verify it is not added to the table. Open a new tab and navigate to another site for 8s. Verify this site is added to the table.
  • Navigate back to Advanced Settings. Modify both drop lists to be something other than the default values. Close this window. Visit a site that does not meet the criteria (ex. If you selected 1 minute and 5 visits, make sure you visit a page for less than a minute less than 5 times). Verify site is not added to the table.
  • Navigate to Advanced Settings. Toggle ‘Allow contributions to non-verified sites’ to be off. Verify that any sites which are not verified publishers are no longer displayed in your table. Verify your % updated accordingly.

Notifications and Payment History

(note, the following test cases can only be run as stated when building from source)

  • Be sure you have a wallet created and ‘Show notifications’ is on in Advanced Settings. Close Brave. Run npm run add-simulated-payment-history 50. Reopen Brave. Verify a payment notification is displayed when you go back into about:preferences#payments.
  • Be sure you have a wallet created and ‘Show notifications’ is off in Advanced Settings. Close Brave. Run npm run add-simulated-payment-history 50. Reopen Brave. Verify a payment notification is not displayed when you go back into about:preferences#payments.
  • Click on the Payment History icon. Verify a popup with the simulated contribution history is displayed. Verify you can click on a line in the popup and a new tab opens with your selected Contribution Statement. Verify you are able to save the Contribution Statement locally.

Update

  • Have a ledger set up in current release and update to next version. Verify ledger data is maintained when you update.

Enabling Brave Payments

  • Verify that you can create a wallet by turning on Brave Payments under about:preferences#payments
  • Verify that ledger-state.json is being created inside the Brave directory once the wallet has been created
  • Verify that the “?” button next to the Off/On switch opens a new tab and loads the Payment FAQ’s
  • Verify that you can enabled/disable Brave Payments using the “Off/On” switch
  • Close Brave and remove ledger-state.json and ledger-synopsis.json from the Brave directory. Re-launch Brave and verify that enabling Brave Payments recreates a new wallet

Keeping Payment State

  • Ensure Brave Payments is enabled and restart the browser, ensure that the correct state is kept
  • Ensure Brave Payments is disabled and restart the browser, ensure that the correct state is kept
  • Change several settings under about:preferences#payments and restart the browser, ensure that the correct state is kept
  • Using the DEBUG menu, crash the browser several and ensure that data is not being lost and the correct state is kept (open Brave using BRAVE_ENABLE_DEBUG_MENU=true for the Debug Menu)

Clearing Publisher History

  • Verify that clearing Brave’s history doesn’t clear the publisher table when payments are enabled
  • Verify that clearing Brave’s history clears the publisher table when payments are disabled
  • Verify that visiting websites that have were previously being listed under the publisher table are not retaining old data when they’re cleared from the table (Example, Time Spent should start from the beginning again and not retain old data)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants