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

Support Tips for new Twitter site #2943

Merged
merged 5 commits into from
Jul 23, 2019
Merged

Support Tips for new Twitter site #2943

merged 5 commits into from
Jul 23, 2019

Conversation

emerick
Copy link
Contributor

@emerick emerick commented Jul 17, 2019

Fix brave/brave-browser#4548

Submitter Checklist:

Test Plan:

All tests must be run on the old Twitter site and the new Twitter site. All functionality should work when logged in to Twitter and when logged out of Twitter.

Note: You can create a verified Twitter publisher by visiting this special link and following the Twitter flow:

https://publishers-staging.basicattentiontoken.org/publishers/home?twitter=true

Enabling/disabling the Brave Tip icon

  • Launch Brave on a new profile and keep Brave Rewards disabled
  • Visit twitter.com.
  • Ensure that the BAT tip icon doesn't appear in the action section of any tweets.
  • Enable Brave Rewards.
  • Ensure that Brave tip icons dynamically appear in Twitter feed within a few seconds.
  • Visit brave://rewards and uncheck "Twitter" in Tips Settings
  • Ensure that the Brave tip icons dynamically disappear from the Twitter feed within a few seconds.
  • Reenable Brave Rewards and the tip icons should appear again.
  • Scroll far enough into the Twitter feed that new tweets dynamically load (infinite scroll) and ensure that the tip icons appear in the newly loaded tweets.
  • Click on a tweet and ensure that the tip icons load in the new overlay window that appears.

Tipping a Twitter user

  • Click on a Tip icon for a Twitter user and ensure that the tip overlay dialog shows the appropriate "compliment" message, the relevant tweet/date, and the full name and screen name of the Twitter user. The dialog should respect all of the privacy standards for verified/unverified users as with the standard Tip dialog, so please test with both verified and unverified Twitter users.
  • The tip dialog should respect custom tip amounts, if any are set.
  • Upon sending the tip, you should receive a thank you message and an offer to tweet your tip.
  • Clicking the "Tweet Now" button should populate a new tab with a message and the relevant quoted tweet.
  • The quoted tweet shouldn't contain any clickable links.
  • Posting the tweet should work as expected, but please delete the tweet afterward for now.

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@emerick emerick self-assigned this Jul 17, 2019
@emerick emerick force-pushed the twitter-tips-new-twitter branch 2 times, most recently from 9162bdf to d140792 Compare July 19, 2019 17:17
@emerick emerick marked this pull request as ready for review July 19, 2019 21:17
Copy link
Member

@petemill petemill left a comment

Choose a reason for hiding this comment

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

LGTM Great team work 🎆

@petemill
Copy link
Member

Fixing conflict due to #2723 having just landed...

Copy link
Member

@petemill petemill left a comment

Choose a reason for hiding this comment

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

Needs rebase, doing now...

petemill
petemill previously approved these changes Jul 22, 2019
Copy link
Member

@petemill petemill left a comment

Choose a reason for hiding this comment

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

I pushed the rebase and added functionality to now show the Tip button if we cannot get the tweetId (some Promoted tweets in new twitter).

Since I pushed some code myself, may want to review that too @emerick

petemill
petemill previously approved these changes Jul 22, 2019
NejcZdovc
NejcZdovc previously approved these changes Jul 23, 2019
@NejcZdovc NejcZdovc added this to the 0.69.x - Nightly milestone Jul 23, 2019
@emerick emerick merged commit 9258a23 into master Jul 23, 2019
@emerick emerick deleted the twitter-tips-new-twitter branch July 23, 2019 12:05
emerick added a commit that referenced this pull request Jul 23, 2019
emerick added a commit that referenced this pull request Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Tips for new Twitter site
3 participants