@@ -43,3 +43,35 @@ describe('classifyConsent', () => {
43
43
assert . strictEqual ( consent . target , undefined ) ;
44
44
} ) ;
45
45
} ) ;
46
+
47
+ describe ( 'Tealium/Didomi consent' , ( ) => {
48
+ it ( 'should identify accept action' , ( ) => {
49
+ const consent = classifyConsent ( '#didomi-notice-agree-button' ) ;
50
+ assert . strictEqual ( consent . vendor , 'tealium' ) ;
51
+ assert . strictEqual ( consent . target , 'accept' ) ;
52
+ } ) ;
53
+
54
+ it ( 'should identify reject action' , ( ) => {
55
+ const consent = classifyConsent ( '#didomi-notice-disagree-button' ) ;
56
+ assert . strictEqual ( consent . vendor , 'tealium' ) ;
57
+ assert . strictEqual ( consent . target , 'reject' ) ;
58
+ } ) ;
59
+
60
+ it ( 'should identify dismiss action for close button' , ( ) => {
61
+ const consent = classifyConsent ( '#didomi-popup-closeBtn-icon' ) ;
62
+ assert . strictEqual ( consent . vendor , 'tealium' ) ;
63
+ assert . strictEqual ( consent . target , 'dismiss' ) ;
64
+ } ) ;
65
+
66
+ it ( 'should identify dismiss action for popup close link' , ( ) => {
67
+ const consent = classifyConsent ( '#didomi-host .didomi-popup-close' ) ;
68
+ assert . strictEqual ( consent . vendor , 'tealium' ) ;
69
+ assert . strictEqual ( consent . target , 'dismiss' ) ;
70
+ } ) ;
71
+
72
+ it ( 'should identify dismiss action for continue without agreeing' , ( ) => {
73
+ const consent = classifyConsent ( '#didomi-host .didomi-continue-without-agreeing' ) ;
74
+ assert . strictEqual ( consent . vendor , 'tealium' ) ;
75
+ assert . strictEqual ( consent . target , 'dismiss' ) ;
76
+ } ) ;
77
+ } ) ;
0 commit comments