Background
In T377757 we created a spec for how the terms-of-service pop for the chrome extension should look and work.
The goal of this task is to implement the behaviours associated with reminding users to accept the terms-of-service if they ignore the popup during extension installation or update.
User story
As an experiment participant, I need to explicitly opt-in to the experiment before participating in it.
Requirements
The following behaviour should only occur when someone has installed the browser extension, then, they have not accepted or rejected the terms of service.
Popup reminder behaviour:
- Show the popup when someone visits *.wikipedia.org (the popup should not appear automatically on any other domains)
- Only show the popup once per browser session (a session ends when the browser is closed, and starts when it's opened again).
- Stop showing the popup if the terms have been accepted.
- Stop showing the popup if the terms have been rejected.
BDD
Feature: Terms-of-Service Popup Reminder for Browser Extension Scenario: Show terms-of-service popup when conditions are met Given the browser extension is installed And the user has not accepted or declined the terms of service And the user visits any `*.wikipedia.org` domain When the browser session starts Then the terms-of-service popup appears once per session And no experiment runs until the terms of service are agreed to or declined Scenario: Stop showing terms-of-service popup after acceptance Given the terms-of-service popup is displayed And the user agrees to the terms When the page reloads Then the experiments start And the popup no longer appears in subsequent visits Scenario: Stop showing terms-of-service popup after rejection Given the terms-of-service popup is displayed And the user declines the terms When the user revisits the site Then the popup no longer appears And no experiments are run
Test Steps
Test Case 1: Verify Terms-of-Service Popup Behavior
- Install the browser extension.
- Visit any *.wikipedia.org domain without accepting or rejecting the terms of service.
- AC1: Confirm that the terms-of-service popup appears on the page.
- Close the browser and reopen it. Revisit any *.wikipedia.org domain.
- AC2: Confirm the popup appears only once during the new session.
- Accept the terms of service when the popup appears.
- Reload the page.
- AC3: Confirm that the experiments are enabled, and the popup no longer appears.
- Decline the terms of service on the popup (in a new browser session).
- AC4: Confirm that the popup no longer appears and no experiments are run.
Acceptance criteria
- The terms-of-service popup appears if someone installs the popup, does not accept or decline the terms of service, and then visits en.wikipedia.org
- The terms-of-service popup appears in those conditions only once per browser session.
- The terms-of-service popup stops appearing once the terms are accepted or declined.
- No experiment is running before the terms-of-service are agreed to or rejected.
- An experiment appears after the terms-of-service have been agreed to (after a page reload)
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T379096#10342799 |
2 | ✅ | T379096#10342799 |
3 | ✅ | T379096#10342799 |
4 | ✅ | T379096#10342799 |
This task was created by Version 1.2.0 of the Web team task template using phabulous