@@ -13,7 +13,6 @@ import {
1313 userTreatmentsEnvelopToProxyGetTreatmentsAnswerData ,
1414} from './libPure' ;
1515import type { GetTreatmentsRequestPayload } from './types' ;
16- import { GateType } from './types' ;
1716
1817describe ( 'buildGetTreatmentsRequestPayload' , ( ) => {
1918 it ( 'should return return the right payload' , ( ) => {
@@ -341,7 +340,7 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
341340 gateDisplayCount : 0 ,
342341 } ;
343342 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
344- expect ( gateType ) . toStrictEqual ( GateType . GuDismissible ) ;
343+ expect ( gateType ) . toStrictEqual ( ' GuDismissible' ) ;
345344 } ) ;
346345
347346 it ( 'test shouldServeDismissible and showDefaultGate:dismissible interacting together' , ( ) => {
@@ -364,7 +363,7 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
364363 gateDisplayCount : 0 ,
365364 } ;
366365 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
367- expect ( gateType ) . toStrictEqual ( GateType . GuDismissible ) ;
366+ expect ( gateType ) . toStrictEqual ( ' GuDismissible' ) ;
368367 } ) ;
369368
370369 it ( 'showDefaultGate:mandatory overrides any other behavior' , ( ) => {
@@ -387,7 +386,7 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
387386 gateDisplayCount : 0 ,
388387 } ;
389388 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
390- expect ( gateType ) . toStrictEqual ( GateType . GuMandatory ) ;
389+ expect ( gateType ) . toStrictEqual ( ' GuMandatory' ) ;
391390 } ) ;
392391
393392 it ( 'showDefaultGate:dismissible overrides any other behavior' , ( ) => {
@@ -410,7 +409,7 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
410409 gateDisplayCount : 0 ,
411410 } ;
412411 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
413- expect ( gateType ) . toStrictEqual ( GateType . GuDismissible ) ;
412+ expect ( gateType ) . toStrictEqual ( ' GuDismissible' ) ;
414413 } ) ;
415414
416415 it ( 'non consenting users in Ireland, low dailyArticleCount' , ( ) => {
@@ -433,7 +432,7 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
433432 gateDisplayCount : 0 ,
434433 } ;
435434 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
436- expect ( gateType ) . toStrictEqual ( GateType . AuxiaAnalyticThenNone ) ;
435+ expect ( gateType ) . toStrictEqual ( ' AuxiaAnalyticThenNone' ) ;
437436 } ) ;
438437
439438 it ( 'non consenting users in Ireland, low dailyArticleCount=3 (start of gate showing)' , ( ) => {
@@ -456,7 +455,7 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
456455 gateDisplayCount : 0 ,
457456 } ;
458457 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
459- expect ( gateType ) . toStrictEqual ( GateType . GuDismissible ) ;
458+ expect ( gateType ) . toStrictEqual ( ' GuDismissible' ) ;
460459 } ) ;
461460
462461 it ( 'non consenting users in Ireland, low gateDisplayCount: 1 (still dismissible)' , ( ) => {
@@ -479,7 +478,7 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
479478 gateDisplayCount : 1 ,
480479 } ;
481480 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
482- expect ( gateType ) . toStrictEqual ( GateType . AuxiaAnalyticThenGuDismissible ) ;
481+ expect ( gateType ) . toStrictEqual ( ' AuxiaAnalyticThenGuDismissible' ) ;
483482 } ) ;
484483
485484 it ( 'non consenting users in Ireland, low gateDisplayCount: 3 (mandatory from now on)' , ( ) => {
@@ -502,7 +501,7 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
502501 gateDisplayCount : 3 ,
503502 } ;
504503 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
505- expect ( gateType ) . toStrictEqual ( GateType . AuxiaAnalyticThenGuMandatory ) ;
504+ expect ( gateType ) . toStrictEqual ( ' AuxiaAnalyticThenGuMandatory' ) ;
506505 } ) ;
507506
508507 it ( 'non consenting users in Ireland, low gateDisplayCount: 4 (mandatory from now on)' , ( ) => {
@@ -525,7 +524,7 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
525524 gateDisplayCount : 4 ,
526525 } ;
527526 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
528- expect ( gateType ) . toStrictEqual ( GateType . AuxiaAnalyticThenGuMandatory ) ;
527+ expect ( gateType ) . toStrictEqual ( ' AuxiaAnalyticThenGuMandatory' ) ;
529528 } ) ;
530529
531530 it ( 'invalid attribute: contentType' , ( ) => {
@@ -548,7 +547,7 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
548547 gateDisplayCount : 0 ,
549548 } ;
550549 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
551- expect ( gateType ) . toStrictEqual ( GateType . None ) ;
550+ expect ( gateType ) . toStrictEqual ( ' None' ) ;
552551 } ) ;
553552
554553 it ( 'invalid attribute: sectionId' , ( ) => {
@@ -571,7 +570,7 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
571570 gateDisplayCount : 0 ,
572571 } ;
573572 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
574- expect ( gateType ) . toStrictEqual ( GateType . None ) ;
573+ expect ( gateType ) . toStrictEqual ( ' None' ) ;
575574 } ) ;
576575
577576 it ( 'invalid attribute: tagIds' , ( ) => {
@@ -594,7 +593,7 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
594593 gateDisplayCount : 0 ,
595594 } ;
596595 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
597- expect ( gateType ) . toStrictEqual ( GateType . None ) ;
596+ expect ( gateType ) . toStrictEqual ( ' None' ) ;
598597 } ) ;
599598
600599 it ( 'invalid attribute: articleIdentifier' , ( ) => {
@@ -617,7 +616,7 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
617616 gateDisplayCount : 0 ,
618617 } ;
619618 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
620- expect ( gateType ) . toStrictEqual ( GateType . None ) ;
619+ expect ( gateType ) . toStrictEqual ( ' None' ) ;
621620 } ) ;
622621
623622 it ( 'should return a gate in the case of the Giulia experiment' , ( ) => {
@@ -640,6 +639,6 @@ describe('decideGateTypeFromGetTreatmentsRequestPayload', () => {
640639 gateDisplayCount : 0 ,
641640 } ;
642641 const gateType = getTreatmentsRequestPayloadToGateType ( body ) ;
643- expect ( gateType ) . toStrictEqual ( GateType . GuDismissible ) ;
642+ expect ( gateType ) . toStrictEqual ( ' GuDismissible' ) ;
644643 } ) ;
645644} ) ;
0 commit comments