Skip to content

Commit 9a1f32a

Browse files
committed
Fix no message for zero trackers
Bug: Tracker Status UI: No Message for Zero Trackers. The TrackerStatus function computes totalTrackersPillText for the zero-trackers case but never displays it. When totalTrackersBlocked === 0, the condition {totalTrackersBlocked > 0 && <TickPill .../>} prevents rendering any tracker status message. The legacy TrackerStatusLegacy displays "No trackers blocked" or "No trackers found" in this scenario, but the new implementation shows nothing, breaking the expected UI behavior for sites with no blocked trackers. #2039 (comment)
1 parent 4e26764 commit 9a1f32a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

special-pages/pages/new-tab/app/activity/integration-tests/activity.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,14 @@ test.describe('activity widget', () => {
159159
await ap.didRender();
160160
await ap.hidesCookiePopupIndicatorWhenNotBlocked();
161161
});
162+
test('shows zero-tracker messages with new component when CPM enabled', async ({ page }, workerInfo) => {
163+
const ntp = NewtabPage.create(page, workerInfo);
164+
const ap = new ActivityPage(page, ntp);
165+
await ntp.reducedMotion();
166+
await ntp.openPage({ additional: { ...defaultPageParams, cpm: 'true' } });
167+
await ap.didRender();
168+
await ap.showsZeroTrackerMessagesWithCpm();
169+
});
162170
test('after rendering and navigating to a new tab, data is re-requested on return', async ({ page }, workerInfo) => {
163171
const ntp = NewtabPage.create(page, workerInfo);
164172
const ap = new ActivityPage(page, ntp);

0 commit comments

Comments
 (0)