Follow these steps, for both desktop Chrome and Firefox and at least one android build before releasing, and commit a refinement!
As we currently have little to no automated tests (or even a specification) when you fix an issue, add a step to the testing checklist for each feature/bug added, with a link to the issue/PR.
When releasing, we can copy this markdown into the PR for a release.
-
Make sure the manifest version was bumped (TODO: versions may be skipped, due to bad builds)
-
Update the apktool.yml versionCode/versionName and commit it to the repository.
-
Update the CHANGELOG.md
- You can compare with latest commit before tagging via something like:
https://github.com/coilhq/web-monetization-projects/compare/coil-extension@0.0.56...main
(substitute release branch name for "main")
- You can compare with latest commit before tagging via something like:
-
Zip the source code for the extension
- Some web stores will require the submission of source files.
- So far, zipping the
coil-extension
folder (instead of zipping at the project root) has given us the least trouble with passing review.- For example,
zip -r coil-extension.zip coil-extension/
- For example,
node_modules
should be deleted prior to zipping the source files.
Copy below for each platform/browser/version tested, filtering steps where it makes sense.
-
Build for prod with release settings
- e.g.
pnpm build-prod chrome -p --run-prod --devtool=none
- as per package.sh
- e.g.
-
Import unpacked/temporary extension/add-on
- For Firefox, go to
about:debugging
- Enable add-on debugging
- Load Temporary Add-on...
- For Chrome or MS Edge, go to
chrome://extensions
(oredge://extensions
) andLoad Unpacked
- Use
adb
to install Samsung Internet Extensions- be sure to kill the browser and delete shared settings to be sure correct addon is tested
- see code in
scripts/reinstall-six.sh
- For Firefox, go to
-
Ensure that you are logged in with a user with valid subscription
-
example.com should say "Streaming not enabled"
-
xrptipbot.com should monetize
-
twitch.tv works
-
Coil welcome and welcome to explore pages
-
Check the monetization animation works properly
- Only required on desktop browsers
- Should animate when monetized and packets received
- Should stop animation when network disconnected
- Note that on Firefox/MacOS the popup automatically closes when the
tab loses focus so can use something like this in terminal:
sudo sleep 10 && sudo ifconfig en0 down && sleep 10 && sudo ifconfig en0 up
- Note that on Firefox/MacOS the popup automatically closes when the
tab loses focus so can use something like this in terminal:
-
Check monetization works consistently
- In the same tab, go to http://www.travisvcrist.com/gatehub
- refresh and make sure streaming works 10 times in a row
- should not get 'stuck' in 'setting up payment' state
- refresh and make sure streaming works 10 times in a row
- Issue: coil/coilhq#3038
- Fix PRs: #242
- In the same tab, go to http://www.travisvcrist.com/gatehub
-
Will route to $coildomain.com/login rather than open popup if logged out
-
Run the puppeteer tests (look at the circle jobs)
- export BROWSER_TYPE='chrome' # or 'firefox'
-
Go to a youtube video, manually skip to near end of video, and when autoplay of a video from another channel starts, check that monetization has stopped.
-
Go to xrptipbot.com and as page is loading very quickly open the popup. It should show "Thank you" even before streaming starts. The animation should play when the streaming starts and the outlined circle should become solid green in the toolbar icon. #120
-
Open the reloading-every-15s.html file:
- Use a localhost server so WM works (e.g. with
pnpm serve:fixtures
) - Open the developer tools console undocked so can view while PAGE IS BACKGROUNDED
- Note the
Reloading page
logging
- Note the
- Open the extension background page developer tools and look at the stream logging
- SHOULD NOT initiate a stream or SPSP request #144
- Use a localhost server so WM works (e.g. with
-
Open the event-logger.html file:
-
Check started event fires when quickly switching between tabs
- Open the event-logger.html file
- Switch to another (non-monetized) tab. The payments stop. Quickly switch back to the first tab.
- The payments restart. Make sure there is a monetizationstart event
- Issue: #105
- Fix PR: #117
-
Check stopped event fires with correct requestId
- Open the event-logger.html file
- Induce a stop/start in same js 'tick' (tack on #induce to end of url)
- Check that the stopped event has the correct requestId
- Issue: #127
- Fix PR: #128
-
Check tip event fires when clicked on in the popup
- Open the event-logger.html file
- Open the extension popup and click on "Send $1!" in the tipping tab
- Check that the tip event occurs
-
Run a local web server (with
pnpm run serve:dist
) serving the dist folder, then open static/popup.html in a normal tab and check the popup rendering in various states. -
If the browser is running on android, check that the "popup" browser action simply opens settings.
- Install android-sdk on PC and Firefox on android
- Enable developer mode on android and enable usb debugging
- Plug in android to PC via usb
adb devices # make note of device id
adb shell pm grant org.mozilla.firefox android.permission.READ_EXTERNAL_STORAGE
adb shell pm grant org.mozilla.firefox android.permission.WRITE_EXTERNAL_STORAGE
- Build the extension
pnpm web-ext run -s $PWD/dist --target=firefox-android --android-device=WUJ01PNSVY # from adb devices step
- Issue: coil/coilhq#2084
- Fix PRs: #166 #295
-
On MacOS Chromium browsers (Chrome/Edge) check that the monetized animation is working on non primary monitors.
-
Check that popup closes when another window is focused
-
Check extension doesn't attempt to stream when unsubscribed
-
Check can stream immediately after subscribing
- Likely best to test this with staging where can use a test card
- Log in with coil user that doesn't have active subscription
- Add a subscription (can use testing card 4242 4242 4242 4242 )
- Go to a monetized page and check that streaming works immediately
-
Check no stop event is fired when logged out
-
When built for mv3, check that resumeWebMonetization works after killing worker (use chrome://serviceworker-internals)
- Fix PR: [#3286][np3286]
-
Check that the polyfill is injected properly in incognito tabs
-
- Open a terminal
-
- Start server (via
pnpm serve:fixtures-iframes
)
- Start server (via
-
- Open http://localhost:4000/top-nested-allowed-iframe.html in browser
- Open developer tools and look at the structure of the dom
-
- With the console set
localStorage.WM_DEBUG = true
- With the console set
- Load the page
-
- Look for 4 monetizationpending events and 4 corresponding (same requestId) monetizationstart events logged in the console.
-
- [re]load the page
-
turn "on" monetization via editing allow attribute of top level iframes
- As above but while the tab is backgrounded, after turning on each top level iframe a sequence of pending -> stopped events should be fired:
- As per test 2
- Turn off one top level and then turn off the nested frames in top level that is allowed
- allow one nested iframe and check for indications of monetization