Requirement
Scope: ReadingLists instrumentation (desktop + mobile).
- Implement and validate full event instrumentation for the Reading List experiment.
- All user interactions with the Reading List UI (toolbar, sticky header, popup, and list page) must trigger distinct click or page load events with appropriate attributes.
- Each event must include consistent contextual data (session, platform, namespace, skin, user state).
- Instrumentation events must follow the Reading List instrumentation specification as defined in the parent experiment task (T397532).
BDD
Feature: Click tracking for Reading List interactions
Scenario: Page load event tracking
Given I am a user in the Reading List experiment
When I load a page
Then a `page_load` event is sent with the correct contextual attributes
And the `action_source` reflects internal or external referer
Scenario: Save and remove clicks
Given I am viewing an article in the experiment
When I click the bookmark icon in the toolbar or sticky header
Then a `click` event is sent
And the event includes `action_subtype` and `action_source` matching the UI element clicked
And the `action_context` contains the current `article_count`
Scenario: Viewing reading list from top-right icon
Given I am on an article page
When I click the top-right reading list icon
Then a `click` event is sent with `action_subtype: view_reading_list` and `action_source: top_right`
Scenario: Viewing reading list from article saved popup
Given I have just saved an article
When I click “view list” in the saved popup
Then a `click` event is sent with `action_source: article_saved_popup`
Scenario: Viewing article from reading list
Given I am on the Reading List page
When I click an article link in the list
Then a `click` event is sent with `action_subtype: view_article`
And `action_context` includes the total number of saved articlesTest Plan
Test Case 1: Page load event
- Log in and enable Reading List experiment.
- Load an article page.
- Inspect network requests for the instrumentation endpoint.
- AC1: action: page_load event is logged.
- AC2: action_source is correctly set to internal_referer or external_referer.
- AC3: Common contextual attributes are included.
Test Case 2: Save/remove clicks
- Click the bookmark icon in the toolbar.
- AC4: A click event logs action_subtype: save_to_reading_list and action_source: toolbar.
- Click again to remove the article.
- AC5: A click event logs action_subtype: remove_from_reading_list and action_source: toolbar.
- AC6: action_context includes {article_count: <INT>}.
Test Case 3: View Reading List from top-right
- Click the Reading List icon in the top-right corner.
- AC7: click event logs action_subtype: view_reading_list and action_source: top_right.
Test Case 4: View Reading List from article saved popup
- Save an article, then click “view list” in the popup.
- AC8: click event logs action_subtype: view_reading_list and action_source: article_saved_popup.
Test Case 5: View article from Reading List
- Navigate to Special:ReadingLists.
- Click an article title from the list.
- AC9: click event logs action_subtype: view_article and action_source: reading_list.
- AC10: action_context contains the total number of saved articles.
QA Results - Prod
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T406930#11361756 |
| 2 | ✅ | T406930#11361756 |
| 3 | ✅ | T406930#11361756 |
| 4 | ❓ | T406930#11361756 |
| 5 | ✅ | T406930#11361756 |
| 6 | ✅ | T406930#11361756 |
| 7 | ✅ | T406930#11361756 |
| 8 | ✅ | T406930#11361756 |
| 9 | ✅ | T406930#11361756 |
| 10 | ✅ | T406930#11361756 |









