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

Move Twitch rewards processing to Greaselion #7019

Merged
merged 1 commit into from
Nov 18, 2020
Merged

Conversation

zenparsing
Copy link
Collaborator

@zenparsing zenparsing commented Nov 2, 2020

Resolves brave/brave-browser#11466

Related PR brave/brave-site-specific-scripts#26

Submitter Checklist:

Test Plan:

Desktop

Twitch user URL

  • Clean profile
  • Run browser
  • Install Twitch Greaselion script
  • Restart browser
  • Open rewards panel to start rewards extension
  • Visit a Twitch user URL (e.g., https://www.twitch.tv/laurenwags)
  • Verify that correct publisher information appears in Rewards panel
  • Verify that tipping works as expected
  • Verify that verified checkmark appears in Rewards icon for verified publishers

Twitch video URL

  • Clean profile
  • Run browser
  • Install Twitch Greaselion script
  • Restart browser
  • Open rewards panel to start rewards extension
  • Visit a Twitch video URL (e.g., https://www.twitch.tv/videos/577831096)
  • Verify that correct publisher information appears in Rewards panel
  • Verify that tipping works as expected
  • Verify that verified checkmark appears in Rewards icon for verified publishers

Excluded URLs

  • Clean profile
  • Run browser
  • Install Twitch Greaselion script
  • Restart browser
  • Open rewards panel to start rewards extension
  • Visit an excluded Twitch URL (e.g., https://www.twitch.tv/directory/game/Music)
  • Verify that correct publisher information appears in Rewards panel (www.twitch.tv)
  • Verify that tipping works as expected

History

  • Navigate to various Twitch URLs in the same tab
  • Verify that appropriate publisher information appears in the panel
  • Verify that back/forward navigation updates the panel with correct publisher info

Tab Activation

  • Navigate to various Twitch URLs in multiple tabs
  • Verify that appropriate publisher information appears in the panel
  • Verify that switching between tabs updates the panel with correct publisher info

Tipping non-Twitch Publishers

  • Verify that tipping works as expected on non-Twitch publishers (we only made changes to Twitch and only on desktop)
  • Verify that the panel looks as expected on non-Twitch publishers

Mobile

No changes were made to mobile platforms, so verify that Twitch navigation / tipping / Rewards panel continue to work as expected on those platforms.

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.

@zenparsing zenparsing self-assigned this Nov 2, 2020
@zenparsing zenparsing force-pushed the ksmith-gl-twitch branch 2 times, most recently from 7ff6e20 to 065fa69 Compare November 3, 2020 04:57
@zenparsing zenparsing marked this pull request as ready for review November 3, 2020 14:29
@zenparsing zenparsing requested review from iefremov and a team as code owners November 3, 2020 14:29
@zenparsing zenparsing removed the request for review from iefremov November 3, 2020 14:30
Comment on lines 24 to +26
return media_type == "github" || media_type == "reddit" ||
media_type == "twitter" || media_type == "vimeo" ||
media_type == "youtube";
media_type == "twitch" || media_type == "twitter" ||
media_type == "vimeo" || media_type == "youtube";
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this can just return true for desktop, now that all of the supported publishers use Greaselion.

@emerick
Copy link
Contributor

emerick commented Nov 3, 2020

@zenparsing You can probably remove the twitch.tv entry from the permissions key in the Rewards extension's manifest.

@zenparsing zenparsing force-pushed the ksmith-gl-twitch branch 4 times, most recently from 7ba20a4 to a578903 Compare November 12, 2020 16:59
Copy link
Contributor

@emerick emerick left a comment

Choose a reason for hiding this comment

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

LGTM

@zenparsing
Copy link
Collaborator Author

CI failed on known test-browser issues, and passed on previous pushes.

@zenparsing zenparsing merged commit d5c2adf into master Nov 18, 2020
@zenparsing zenparsing deleted the ksmith-gl-twitch branch November 18, 2020 15:35
@zenparsing zenparsing added this to the 1.19.x - Nightly milestone Nov 18, 2020
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.

Use Greaselion for Twitch publishers
2 participants