@@ -10,7 +10,8 @@ test.describe('Protections screenshots', { tag: ['@screenshots'] }, () => {
1010 const ntp = NewtabPage . create ( page , workerInfo ) ;
1111 await ntp . reducedMotion ( ) ;
1212 const protections = new ProtectionsPage ( ntp ) ;
13- await ntp . openPage ( { additional : { 'protections.feed' : 'privacy-stats' } } ) ;
13+ // Use cpm: 'true' to enable new UI (non-legacy)
14+ await ntp . openPage ( { additional : { 'protections.feed' : 'privacy-stats' , cpm : 'true' } } ) ;
1415 await protections . ready ( ) ;
1516
1617 await expect ( protections . context ( ) ) . toHaveScreenshot ( 'protections-stats.png' , { maxDiffPixels } ) ;
@@ -19,7 +20,8 @@ test.describe('Protections screenshots', { tag: ['@screenshots'] }, () => {
1920 const ntp = NewtabPage . create ( page , workerInfo ) ;
2021 await ntp . reducedMotion ( ) ;
2122 const protections = new ProtectionsPage ( ntp ) ;
22- await ntp . openPage ( { additional : { 'protections.feed' : 'privacy-stats' , activity : 'empty' } } ) ;
23+ // Use cpm: 'true' to enable new UI (non-legacy)
24+ await ntp . openPage ( { additional : { 'protections.feed' : 'privacy-stats' , activity : 'empty' , cpm : 'true' } } ) ;
2325 await protections . ready ( ) ;
2426 await expect ( protections . context ( ) ) . toHaveScreenshot ( 'protections-stats-empty.png' , { maxDiffPixels } ) ;
2527 } ) ;
@@ -28,7 +30,8 @@ test.describe('Protections screenshots', { tag: ['@screenshots'] }, () => {
2830 await ntp . reducedMotion ( ) ;
2931 await ntp . darkMode ( ) ;
3032 const protections = new ProtectionsPage ( ntp ) ;
31- await ntp . openPage ( { additional : { 'protections.feed' : 'privacy-stats' } } ) ;
33+ // Use cpm: 'true' to enable new UI (non-legacy)
34+ await ntp . openPage ( { additional : { 'protections.feed' : 'privacy-stats' , cpm : 'true' } } ) ;
3235 await protections . ready ( ) ;
3336
3437 await expect ( protections . context ( ) ) . toHaveScreenshot ( 'protections-stats-dark.png' , { maxDiffPixels } ) ;
@@ -38,7 +41,8 @@ test.describe('Protections screenshots', { tag: ['@screenshots'] }, () => {
3841 const ntp = NewtabPage . create ( page , workerInfo ) ;
3942 await ntp . reducedMotion ( ) ;
4043 const protections = new ProtectionsPage ( ntp ) ;
41- await ntp . openPage ( { additional : { 'protections.feed' : 'activity' } } ) ;
44+ // Use cpm: 'null' to enable new UI (non-legacy) with feature disabled
45+ await ntp . openPage ( { additional : { 'protections.feed' : 'activity' , cpm : 'null' } } ) ;
4246 await protections . ready ( ) ;
4347
4448 await expect ( protections . context ( ) ) . toHaveScreenshot ( 'protections-activity.png' , { maxDiffPixels } ) ;
0 commit comments