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

Implement Tip / Contribution Banner 3.0 #28148

Closed
5 tasks done
Miyayes opened this issue Jan 30, 2023 · 4 comments · Fixed by brave/brave-core#17647
Closed
5 tasks done

Implement Tip / Contribution Banner 3.0 #28148

Miyayes opened this issue Jan 30, 2023 · 4 comments · Fixed by brave/brave-core#17647

Comments

@Miyayes
Copy link
Collaborator

Miyayes commented Jan 30, 2023

Description

Tasks

Preview Give feedback

@Miyayes For Figma.

@LaurenWags
Copy link
Member

LaurenWags commented May 5, 2023

@brave/qa-team will do full testing on Windows and macOS, with reduced cases on Linux.

In particular, please pay attention to the rounded corner display on the tip banner on the various platforms.

On Linux please test

  • User State 3: Connected
  • Keep a close eye on the rounded corners of the tip banner
  • Confirm all screens from the appropriate "Figma" sections are observed as expected

@LaurenWags
Copy link
Member

LaurenWags commented May 11, 2023

Verified with

Brave | 1.52.94 Chromium: 113.0.5672.92 (Official Build) beta (x86_64)
-- | --
Revision | b6f521170062a1fa8a82c33fb223b06fec566da1-refs/branch-heads/5672_63@{#10}
OS | macOS Version 13.3.1 (a) (Build 22E772610a)

Verified test plan from brave/brave-core#17647.

Encountered the following issues while testing:

Pulled "Web3" test cases out of the test plan and logged them under #30414 for tracking as this button is not ready for QA at the moment due to some server side items which need to be implemented.

User State 1: Rewards not enabled - PASSED
  • Verified when an in-page tip icon is clicked,
    • The Rewards panel is opened
brave://version GitHub Twitter Reddit
1 2 3 4
User State 2: Unconnected - PASSED
  • Verified when an in-page tip icon is clicked and a wallet provider is available,
    • A message should be displayed about contributions
    • A connect button is displayed
    • Confirmed the "Connect" button opens brave://rewards/#verify and shows the modal to select a wallet provider
Country Selection Rewards enabled GitHub Twitter Reddit
1 2 3 - GH 4 - Twitter 5 - Reddit
  • Verified when an in-page tip icon is clicked and a wallet provider is not available,
    • An alternate message should be displayed about contributions,
    • The connect button is not displayed.
    • Confirmed "Learn more" navigates to https://support.brave.com/hc/en-us/articles/6539887971469
Country Selection Rewards enabled GitHub Twitter Reddit
1 2 3 - GH 4 - Twitter 5 - GH
User State 3: Connected - PASSED
  • When the tip panel is opened,
    • The user's BAT balance for their provider should be displayed.
Dark Light
1 2
  • When the tip panel is opened and the user is logged out from their wallet provider,
    • A login message should be displayed,
    • And a "Log In" button should be displayed that will take the user to the wallet provider's authorization URL.
Uphold Dark Uphold Light Gemini Dark Gemini Light bitFlyer Dark bitFlyer Light
1 2 3 4 5 6
  • When the tip panel is opened and the publisher does not have the same wallet provider as the user,
    • A "mismatch" message should be displayed.
Uphold Dark Uphold Light Gemini Dark Gemini Light bitFlyer Dark bitFlyer Light
1 2 3 4 5 6
  • When "Send" is clicked with a valid amount,
    • The tip should be sent and the success UI should be displayed,
    • And the "Share" button should open Twitter with a "new post" prompt.
Success Dark UI Tweet from Dark UI Success Light UI Tweet from Light UI
1 2 3 4
  • When "Send" is clicked and the monthly toggle is set,
    • A one-time tip should be sent,
    • And the success UI should be displayed
    • And a monthly contribution should be added to the "Monthly Contributions" list visible on the Rewards page.
Example Example Example Example Example Example
1 2 3 4 5 6
  • When the tip panel is opened and a monthly contribution is already set for the publisher,
    • The tip panel should display a message indicating that a monthly contribution is already set.
Dark UI panel Dark UI banner Light UI panel Light UI banner
7 8 9 10
  • Advanced my computer clock to next monthly contribution date (Jun 12 per Monthly Contributions section of brave://rewards
    • Confirmed monthly tip was sent as expected
    • Confirmed next monthly tip was scheduled per Monthly Contributions section of brave://rewards)
Example Example Example Example
a1 a2 a3 a4
  • When the Rewards panel is opened for an unverified publisher,
    • A message should be displayed stating that the publisher is not verified,
    • And the "Send Contribution" button should be disabled.
Dark Light
1 2
  • When the Rewards panel is opened for a verified publisher,
    • The "Send Contribution" button should be enabled.
Dark Light
3 4
  • When an in-line tip icon is clicked for an unverified publisher,
    • The Rewards panel should be opened with a message indicating the publisher is not verified,
    • And the "Send Contribution" button should be disabled.
Dark Light
1 2
  • When an in-line tip icon is clicked for a verified publisher,
    • The tip panel should be opened.
Dark Light
1 2
  • When an error is encountered when creating a transaction with the wallet provider.
    • An error message should be displayed,
    • And a "Try Again" button should be displayed.
Uphold Dark Uphold Light Gemini Dark Gemini Light bitFlyer Dark bitFlyer Light
uphold dk uphold lt gemini dk gemini lt bf failed tip dk bf failed tip lt
User State 4: Grandfathered Unconnected - PASSED
  • When the tip panel is opened,
    • The user's vBAT balance should be displayed.
Dark Light
dk lt
  • When the tip panel is opened and the publisher is verified for Uphold, Gemini, or bitFlyer,
    • No "mismatch" message should be displayed.
Dark - Uphold Light - Uphold Dark - Gemini Light - Gemini Dark - bitFlyer Light - bitFlyer
1 2 3 4 5 6
  • When "Send" is clicked with a valid amount,
    • The tip should be sent and the success UI should be displayed,
    • And the "Share" button should open Twitter with a "new post" prompt.
Success Dark UI Tweet from Dark UI Success Light UI Tweet from Light UI
1 2 3 4
  • When "Send" is clicked and the monthly toggle is set,
    • A one-time tip should be sent,
    • And the success UI should be displayed
    • And a monthly contribution should be added to the "Monthly Contributions" list visible on the Rewards page.
Example Example Example Example Example Example
1 2 3 4 5 6
  • When the tip panel is opened and a monthly contribution is already set for the publisher,
    • The tip panel should display a message indicating that a monthly contribution is already set.
Dark UI panel Dark UI banner Light UI panel Light UI banner
1 2 3 4
  • Advanced my computer clock to next monthly contribution date (Jun 14 per Monthly Contributions section of brave://rewards
    • Confirmed monthly tip was sent as expected
    • Confirmed next monthly tip was scheduled per Monthly Contributions section of brave://rewards)
Example Example Example Example
1 2 3 4
  • When the Rewards panel is opened for an unverified publisher,
    • A message should be displayed stating that the publisher is not verified,
    • And the "Send Contribution" button should be disabled.
Dark Light
1 2
  • When the Rewards panel is opened for a verified publisher,
    • The "Send Contribution" button should be enabled.
Dark Light
1 2
  • When an in-line tip icon is clicked for an unverified publisher,
    • The Rewards panel should be opened with a message indicating the publisher is not verified,
    • And the "Send Contribution" button should be disabled.
Dark Light
1 2
  • When an in-line tip icon is clicked for a verified publisher,
    • The tip panel should be opened.
Dark Light
3 4
  • When an error is encountered when creating a transaction,
    • An error message should be displayed,
    • And a "Try Again" button should be displayed.

Note - error message is not displayed and was logged via #30431

Dark Light
1 2
Brave | 1.52.103 Chromium: 113.0.5672.126 (Official Build) beta (x86_64)
-- | --
Revision | c541687b21a73452ab403e2dced7033ddc97ee9d-refs/branch-heads/5672@{#1202}
OS | macOS Version 13.3.1 (a) (Build 22E772610a)
Additional tests - PASSED
  1. Confirm when a monthly tip is configured for a creator, a one time tip can still be sent:
  • Fresh profile, close and relaunch to pull griffin
  • Join rewards, connect a custodian
  • Navigate to a creator who is verified with your same custodian
  • Set up a monthly tip
  • Confirm tip is sent immediately and one is scheduled for next month
  • Open tip banner for that same creator, see message about monthly contribution
  • Send another tip
  • Confirm tip is sent
Example Example Example Example Example Example Example
1 2 3 4 5 6 7
  1. Confirm no more hover text on panel:
  • Fresh profile, close and relaunch to pull griffin
  • Join rewards, connect a custodian
  • Navigate to a creator who is verified with a different custodian than you
  • Example, I have an Uphold wallet and navigated to a Gemini creator
  • Confirm on the panel, there is no hover text when you hover over "Verified creator"
  • Confirm when you select "Send Contribution" button, the contribution/tip banner shows a message about this creator and you are unable to tip them
Example Example
1 2
  1. Rounded corners
  • Confirm tip banner has rounded corners

Sometimes tip banner has corners that are both rounded and square, see logged issue #30282

  1. Confirm when clicking in-line tip button on twitter for a verified creator, that the tip banner no longer quotes the tweet
1.51.x 1.52.x
1 51 1 52
  1. Pending Contributions - not tested, will be covered in future issues when Pending Contributions code is removed
Figma - PASSED
  1. From the "Contribution Banner/Desktop" section
  • The following from Figma were generally covered during testing of "User State 3 - Connected" and "User State 4 - Grandfathered Unconnected" with various sites:

    • Custom vs Standard/default images
    • Click away from banner to close it
    • Contribution sent icon/message
    • Light and dark modes
    • Custom amount entry
  • The following from this section of Figma are shown below:

    • Verified creator icon hover text
    • switch between BAT and USD
    • Monthly Contribution tooltip
Creator icon hover (dark) Creator icon hover (light) BAT/USD switch BAT/USD switch Monthly tooltip (dark) Monthly tooltip (light)
1 2 3 4 5 6
  1. From the "Contribution Banner Error/Info States, User can continue" section - all of these were verified under "User State 3 - Connected" and/or "User State 4 - Grandfathered Unconnected" section:
  • User is already sending monthly tips
Dark UI banner Light UI banner
8 10
  • Creator has different custodian than user
Uphold Dark Uphold Light Gemini Dark Gemini Light bitFlyer Dark bitFlyer Light
1 2 3 4 5 6
  • Creator verified - custodian but no web3 wallet (wording of this is incorrect on the figma)
Dark Light
dk lt
  • User is logged out of their custodian account
Uphold Dark Uphold Light Gemini Dark Gemini Light bitFlyer Dark bitFlyer Light
1 2 3 4 5 6
  • Contribution failure
Uphold Dark Uphold Light Gemini Dark Gemini Light bitFlyer Dark bitFlyer Light
uphold dk uphold lt gemini dk gemini lt bf failed tip dk bf failed tip lt
  1. From the "Contribution Banner Error/Info States, user dead end" section
  • The following from Figma were generally covered during testing of the various user states (1-4):
    - Creator not registered (panel)
Dark Light
1 2
  - Custodian is not connected to Rewards (panel)
Dark Light
1 2
  - No custodian available in region (panel)
Dark Light
3 4
  - User doesn't have enough tokens for transaction
Dark Light
5 6

@LaurenWags LaurenWags added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label May 11, 2023
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented May 15, 2023

Verification PASSED on

Brave | 1.52.94 Chromium: 113.0.5672.92 (Official Build) beta (64-bit)
-- | --
Revision | b6f521170062a1fa8a82c33fb223b06fec566da1-refs/branch-heads/5672_63@{#10}
OS | Windows 10 Version 21H2 (Build 19044.2965)
User State 1: Rewards not enabled - PASSED
  • Verified when an in-page tip icon is clicked,
    • The Rewards panel is opened
brave://version GitHub Twitter Reddit
image image image image
User State 2: Unconnected - PASSED
  • Verified when an in-page tip icon is clicked and a wallet provider is available,
    • A message should be displayed about contributions
    • A connect button is displayed
    • Confirmed the "Connect" button opens brave://rewards/#verify and shows the modal to select a wallet provider
Country Selection Rewards enabled GitHub Twitter Reddit
image image image image image
  • Verified when an in-page tip icon is clicked and a wallet provider is not available,
    • An alternate message should be displayed about contributions,
    • The connect button is not displayed.
    • Confirmed "Learn more" navigates to https://support.brave.com/hc/en-us/articles/6539887971469
Country Selection Rewards enabled GitHub Twitter Reddit
image image image image image
User State 3: Connected - PASSED
  • When the tip panel is opened,
    • The user's BAT balance for their provider should be displayed.
Dark Light
image image
  • When the tip panel is opened and the user is logged out from their wallet provider,
    • A login message should be displayed,
    • And a "Log In" button should be displayed that will take the user to the wallet provider's authorization URL.
Uphold Dark Uphold Light Gemini Dark Gemini Light bitFlyer Dark bitFlyer Light
image image image image image image
  • When the tip panel is opened and the publisher does not have the same wallet provider as the user,
    • A "mismatch" message should be displayed.
Uphold Dark Uphold Light Gemini Dark Gemini Light bitFlyer Dark bitFlyer Light
image image image image
  • When "Send" is clicked with a valid amount,
    • The tip should be sent and the success UI should be displayed,
    • And the "Share" button should open Twitter with a "new post" prompt.
Success Dark UI Tweet from Dark UI Success Light UI Tweet from Light UI
image image image image
  • When "Send" is clicked and the monthly toggle is set,
    • A one-time tip should be sent,
    • And the success UI should be displayed
    • And a monthly contribution should be added to the "Monthly Contributions" list visible on the Rewards page.
Example Example Example Example Example Example
image image image image image image
  • When the tip panel is opened and a monthly contribution is already set for the publisher,
    • The tip panel should display a message indicating that a monthly contribution is already set.
Dark UI panel Dark UI banner Light UI panel Light UI banner
image image image image
  • Advanced my computer clock to next monthly contribution date (June 15 per Monthly Contributions section of brave://rewards
    • Confirmed monthly tip was sent as expected
    • Confirmed next monthly tip was scheduled per Monthly Contributions section of brave://rewards)
Example Example Example Example
image image image image
  • When the Rewards panel is opened for an unverified publisher,
    • A message should be displayed stating that the publisher is not verified,
    • And the "Send Contribution" button should be disabled.
Dark Light
image image
  • When the Rewards panel is opened for a verified publisher,
    • The "Send Contribution" button should be enabled.
Dark Light
image image
  • When an in-line tip icon is clicked for an unverified publisher,
    • The Rewards panel should be opened with a message indicating the publisher is not verified,
    • And the "Send Contribution" button should be disabled.
Dark Light
image image
  • When an in-line tip icon is clicked for a verified publisher,
    • The tip panel should be opened.
Dark Light
image image
  • When an error is encountered when creating a transaction with the wallet provider.
    • An error message should be displayed,
    • And a "Try Again" button should be displayed.
Uphold Dark Uphold Light Gemini Dark Gemini Light bitFlyer Dark bitFlyer Light
image image image image image (4) image (3)
User State 4: Grandfathered Unconnected - PASSED
  • When the tip panel is opened,
    • The user's vBAT balance should be displayed.
Dark Light
image image
  • When the tip panel is opened and the publisher is verified for Uphold, Gemini, or bitFlyer,
    • No "mismatch" message should be displayed.
Dark - Uphold Light - Uphold Dark - Gemini Light - Gemini Dark - bitFlyer Light - bitFlyer
image image image image image image
  • When "Send" is clicked with a valid amount,
    • The tip should be sent and the success UI should be displayed,
    • And the "Share" button should open Twitter with a "new post" prompt.
Success Dark UI Tweet from Dark UI Success Light UI Tweet from Light UI
image image image image
  • When "Send" is clicked and the monthly toggle is set,
    • A one-time tip should be sent,
    • And the success UI should be displayed
    • And a monthly contribution should be added to the "Monthly Contributions" list visible on the Rewards page.
Example Example Example Example Example Example
image image image image image image
  • When the tip panel is opened and a monthly contribution is already set for the publisher,
    • The tip panel should display a message indicating that a monthly contribution is already set.
Dark UI panel Dark UI banner Light UI panel Light UI banner
image image image image
  • Advanced my computer clock to next monthly contribution date (Jun 17 per Monthly Contributions section of brave://rewards
    • Confirmed monthly tip was sent as expected
    • Confirmed next monthly tip was scheduled per Monthly Contributions section of brave://rewards)
Example Example Example Example
image image image image
  • When the Rewards panel is opened for an unverified publisher,
    • A message should be displayed stating that the publisher is not verified,
    • And the "Send Contribution" button should be disabled.
Dark Light
image image
  • When the Rewards panel is opened for a verified publisher,
    • The "Send Contribution" button should be enabled.
Dark Light
image image
  • When an in-line tip icon is clicked for an unverified publisher,
    • The Rewards panel should be opened with a message indicating the publisher is not verified,
    • And the "Send Contribution" button should be disabled.
Dark Light
image image
  • When an in-line tip icon is clicked for a verified publisher,
    • The tip panel should be opened.
Dark Light
image image
  • When an error is encountered when creating a transaction,
    • An error message should be displayed,
    • And a "Try Again" button should be displayed.
Dark Light
image image

Additional tests - PASSED
  1. Confirm when a monthly tip is configured for a creator, a one time tip can still be sent:
  • Fresh profile, close and relaunch to pull griffin
  • Join rewards, connect a custodian
  • Navigate to a creator who is verified with your same custodian
  • Set up a monthly tip
  • Confirm tip is sent immediately and one is scheduled for next month
  • Open tip banner for that same creator, see message about monthly contribution
  • Send another tip
  • Confirm tip is sent
Example Example Example Example Example Example
image image image image image image
  1. Confirm no more hover text on panel:
  • Fresh profile, close and relaunch to pull griffin
  • Join rewards, connect a custodian
  • Navigate to a creator who is verified with a different custodian than you
  • Example, I have an Uphold wallet and navigated to a Gemini creator
  • Confirm on the panel, there is no hover text when you hover over "Verified creator"
  • Confirm when you select "Send Contribution" button, the contribution/tip banner shows a message about this creator and you are unable to tip them
Example Example
image image
  1. Rounded corners
  • Confirm tip banner has rounded corners

Sometimes tip banner has corners that are both rounded and square, see encountered the issue #30282

  1. Confirm when clicking in-line tip button on twitter for a verified creator, that the tip banner no longer quotes the tweet
1.51.x 1.52.x
image image
  1. Pending Contributions - not tested, will be covered in future issues when Pending Contributions code is removed
Figma - PASSED
  1. From the "Contribution Banner/Desktop" section
  • The following from Figma were generally covered during testing of "User State 3 - Connected" and "User State 4 - Grandfathered Unconnected" with various sites:

    • Custom vs Standard/default images
    • Click away from banner to close it
    • Contribution sent icon/message
    • Light and dark modes
    • Custom amount entry
  • The following from this section of Figma are shown below:

    • Verified creator icon hover text
    • switch between BAT and USD
    • Monthly Contribution tooltip
Creator icon hover (dark) Creator icon hover (light) BAT/USD switch BAT/USD switch Monthly tooltip (dark) Monthly tooltip (light)
image image image image image image
  1. From the "Contribution Banner Error/Info States, User can continue" section - all of these were verified under "User State 3 - Connected" and/or "User State 4 - Grandfathered Unconnected" section:
  • User is already sending monthly tips
Dark UI banner Light UI banner
image image
  • Creator has different custodian than user
Uphold Dark Uphold Light Gemini Dark Gemini Light bitFlyer Dark bitFlyer Light
image image image image image image
  • Creator verified - custodian but no web3 wallet (wording of this is incorrect on the figma)
Dark Light
image image
  • User is logged out of their custodian account
Uphold Dark Uphold Light Gemini Dark Gemini Light bitFlyer Dark bitFlyer Light
image image image image image image (1)
  • Contribution failure
Uphold Dark Uphold Light Gemini Dark Gemini Light bitFlyer Dark bitFlyer Light
image image image (4) image (3) image (2) image
  1. From the "Contribution Banner Error/Info States, user dead end" section
  • The following from Figma were generally covered during testing of the various user states (1-4):
    - Creator not registered (panel)
Dark Light
image image
  - Custodian is not connected to Rewards (panel), click on inline tip
Dark Light
image image
  - No custodian available in region (panel), click on inline tip
Dark Light
image image
  - User doesn't have enough tokens for transaction
Dark Light
image image

@btlechowski
Copy link

btlechowski commented May 31, 2023

Verification passed on

Brave 1.52.113 Chromium: 114.0.5735.53 (Official Build) (64-bit)
Revision c499d7ea22c8b2dba278465a5df7b86a8efa4e64-refs/branch-heads/5735@{#970}
OS Ubuntu 18.04 LTS
User State 3: Connected - PASSED
  • When the tip panel is opened,
    • The user's BAT balance for their provider should be displayed.
Dark Light
image image
  • When the tip panel is opened and the user is logged out from their wallet provider,
    • A login message should be displayed,
    • And a "Log In" button should be displayed that will take the user to the wallet provider's authorization URL.

Gemini:

image image

bitflyer

  • When the tip panel is opened and the publisher does not have the same wallet provider as the user,
    • A "mismatch" message should be displayed.

Gemini:

image image

BitFlyer

image image
  • When "Send" is clicked with a valid amount,
    • The tip should be sent and the success UI should be displayed,
    • And the "Share" button should open Twitter with a "new post" prompt.
Success Dark UI Tweet from Dark UI Success Light UI Tweet from Light UI
image image image image
  • When "Send" is clicked and the monthly toggle is set,
    • A one-time tip should be sent,
    • And the success UI should be displayed
    • And a monthly contribution should be added to the "Monthly Contributions" list visible on the Rewards page.
image image image
  • When the tip panel is opened and a monthly contribution is already set for the publisher,
    • The tip panel should display a message indicating that a monthly contribution is already set.
image image image image
  • Advanced my computer clock to next monthly contribution date (Jun 12 per Monthly Contributions section of brave://rewards

    • Confirmed monthly tip was sent as expected
    • Confirmed next monthly tip was scheduled per Monthly Contributions section of brave://rewards)
  • When the Rewards panel is opened for an unverified publisher,

    • A message should be displayed stating that the publisher is not verified,
    • And the "Send Contribution" button should be disabled.
Dark Light
image image
  • When the Rewards panel is opened for a verified publisher,
    • The "Send Contribution" button should be enabled.
Dark Light
image image
  • When an in-line tip icon is clicked for an unverified publisher,
    • The Rewards panel should be opened with a message indicating the publisher is not verified,
    • And the "Send Contribution" button should be disabled.
Dark Light
image image
  • When an in-line tip icon is clicked for a verified publisher,
    • The tip panel should be opened.
Dark Light
image image
  • When an error is encountered when creating a transaction with the wallet provider.
    • An error message should be displayed,
    • And a "Try Again" button should be displayed.

Gemini:

image image

bitFlyer

image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants