@@ -7,7 +7,6 @@ describe('getTreatmentsRequestPayloadToGateType (ireland)', () => {
77 //
88 // prerequisites:
99 // - Ireland
10- // - Is Auxia share of the audience
1110 // - user has consented
1211 //
1312 // effects:
@@ -37,129 +36,11 @@ describe('getTreatmentsRequestPayloadToGateType (ireland)', () => {
3736 expect ( gateType ) . toStrictEqual ( 'AuxiaAPI' ) ;
3837 } ) ;
3938
40- it ( 'logic.md [08], first 3 page views' , ( ) => {
41- // [08] (copy from logic.md)
42- //
43- // prerequisites:
44- // - Ireland
45- // - Is Guardian share of the audience
46- // - user has consented
47- //
48- // effects:
49- // - No Auxia notification
50- // - Guardian drives the gate:
51- // - No gate for 30 days after a single contribution event (gu_hide_support_messaging; hideSupportMessagingTimestamp)
52- // - No gate display the first 3 page views
53- // - Dismissible gates then no gate after 5 dismisses
54-
55- const payload : GetTreatmentsRequestPayload = {
56- browserId : 'sample' ,
57- isSupporter : false ,
58- dailyArticleCount : 2 ,
59- articleIdentifier : 'sample: article identifier' ,
60- editionId : 'GB' ,
61- contentType : 'Article' ,
62- sectionId : 'uk-news' ,
63- tagIds : [ 'type/article' ] ,
64- gateDismissCount : 4 ,
65- countryCode : 'IE' , // <- [Ireland]
66- mvtId : 450_000 , // <- [Guardian]
67- should_show_legacy_gate_tmp : true ,
68- hasConsented : true , // <- [consented]
69- shouldServeDismissible : false ,
70- showDefaultGate : undefined ,
71- gateDisplayCount : 4 ,
72- hideSupportMessagingTimestamp : undefined ,
73- } ;
74- const now = 1756568322187 ; // current time in milliseconds since epoch
75- const gateType = getTreatmentsRequestPayloadToGateType ( payload , now ) ;
76- expect ( gateType ) . toStrictEqual ( 'None' ) ;
77- } ) ;
78-
79- it ( 'logic.md [08], first first gate displays' , ( ) => {
80- // [08] (copy from logic.md)
81- //
82- // prerequisites:
83- // - Ireland
84- // - Is Guardian share of the audience
85- // - user has consented
86- //
87- // effects:
88- // - No Auxia notification
89- // - Guardian drives the gate:
90- // - No gate for 30 days after a single contribution event (gu_hide_support_messaging; hideSupportMessagingTimestamp)
91- // - No gate display the first 3 page views
92- // - Dismissible gates then no gate after 5 dismisses
93-
94- const payload : GetTreatmentsRequestPayload = {
95- browserId : 'sample' ,
96- isSupporter : false ,
97- dailyArticleCount : 6 ,
98- articleIdentifier : 'sample: article identifier' ,
99- editionId : 'GB' ,
100- contentType : 'Article' ,
101- sectionId : 'uk-news' ,
102- tagIds : [ 'type/article' ] ,
103- gateDismissCount : 2 ,
104- countryCode : 'IE' , // <- [Ireland]
105- mvtId : 450_000 , // <- [Guardian]
106- should_show_legacy_gate_tmp : true ,
107- hasConsented : true , // <- [consented]
108- shouldServeDismissible : false ,
109- showDefaultGate : undefined ,
110- gateDisplayCount : 4 ,
111- hideSupportMessagingTimestamp : undefined ,
112- } ;
113- const now = 1756568322187 ; // current time in milliseconds since epoch
114- const gateType = getTreatmentsRequestPayloadToGateType ( payload , now ) ;
115- expect ( gateType ) . toStrictEqual ( 'GuDismissible' ) ;
116- } ) ;
117-
118- it ( 'logic.md [08], high dismiss count' , ( ) => {
119- // [08] (copy from logic.md)
120- //
121- // prerequisites:
122- // - Ireland
123- // - Is Guardian share of the audience
124- // - user has consented
125- //
126- // effects:
127- // - No Auxia notification
128- // - Guardian drives the gate:
129- // - No gate for 30 days after a single contribution event (gu_hide_support_messaging; hideSupportMessagingTimestamp)
130- // - No gate display the first 3 page views
131- // - Dismissible gates then no gate after 5 dismisses
132-
133- const payload : GetTreatmentsRequestPayload = {
134- browserId : 'sample' ,
135- isSupporter : false ,
136- dailyArticleCount : 6 ,
137- articleIdentifier : 'sample: article identifier' ,
138- editionId : 'GB' ,
139- contentType : 'Article' ,
140- sectionId : 'uk-news' ,
141- tagIds : [ 'type/article' ] ,
142- gateDismissCount : 7 ,
143- countryCode : 'IE' , // <- [Ireland]
144- mvtId : 450_000 , // <- [Guardian]
145- should_show_legacy_gate_tmp : true ,
146- hasConsented : true , // <- [consented]
147- shouldServeDismissible : false ,
148- showDefaultGate : undefined ,
149- gateDisplayCount : 8 ,
150- hideSupportMessagingTimestamp : undefined ,
151- } ;
152- const now = 1756568322187 ; // current time in milliseconds since epoch
153- const gateType = getTreatmentsRequestPayloadToGateType ( payload , now ) ;
154- expect ( gateType ) . toStrictEqual ( 'None' ) ;
155- } ) ;
156-
15739 it ( 'logic.md [05], low page views' , ( ) => {
15840 // [05] (copy from logic.md)
15941 //
16042 // prerequisites:
16143 // - Ireland
162- // - Is Auxia share of the audience
16344 // - user has NOT consented
16445 //
16546 // effects:
@@ -198,7 +79,6 @@ describe('getTreatmentsRequestPayloadToGateType (ireland)', () => {
19879 //
19980 // prerequisites:
20081 // - Ireland
201- // - Is Auxia share of the audience
20282 // - user has NOT consented
20383 //
20484 // effects:
@@ -237,7 +117,6 @@ describe('getTreatmentsRequestPayloadToGateType (ireland)', () => {
237117 //
238118 // prerequisites:
239119 // - Ireland
240- // - Is Auxia share of the audience
241120 // - user has NOT consented
242121 //
243122 // effects:
0 commit comments