@duckduckgo/autoconsent 1.0.5 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/autoconsent.cjs.js +105 -34
- package/dist/autoconsent.esm.js +105 -34
- package/dist/autoconsent.puppet.js +109 -11
- package/lib/cmps/all.js +2 -0
- package/lib/cmps/all.ts +2 -0
- package/lib/cmps/base.js +5 -1
- package/lib/cmps/base.ts +5 -1
- package/lib/cmps/cookiebot.js +6 -2
- package/lib/cmps/cookiebot.ts +8 -2
- package/lib/cmps/onetrust.js +34 -0
- package/lib/cmps/onetrust.ts +47 -0
- package/lib/cmps/trustarc.js +2 -2
- package/lib/cmps/trustarc.ts +2 -2
- package/lib/config.js +1 -0
- package/lib/config.ts +1 -0
- package/lib/detector.js +4 -0
- package/lib/detector.ts +4 -0
- package/lib/hider.js +1 -1
- package/lib/hider.ts +1 -1
- package/lib/messages.d.ts +3 -0
- package/lib/node.js +8 -3
- package/lib/node.ts +10 -5
- package/lib/puppet/tab.js +10 -3
- package/lib/puppet/tab.ts +13 -3
- package/lib/tabwrapper.js +6 -0
- package/lib/tabwrapper.ts +6 -0
- package/lib/types.d.ts +2 -2
- package/lib/web/content-utils.js +29 -0
- package/lib/web/content-utils.ts +31 -0
- package/lib/web/content.js +20 -22
- package/lib/web/content.ts +19 -22
- package/lib/web/tab.js +12 -6
- package/lib/web/tab.ts +13 -6
- package/lib/web.js +5 -0
- package/lib/web.ts +5 -0
- package/package.json +1 -1
- package/readme.md +1 -1
- package/rules/autoconsent/192.json +17 -0
- package/rules/autoconsent/ausopen.json +7 -0
- package/rules/autoconsent/aws-amazon.json +1 -1
- package/rules/autoconsent/bing.json +14 -0
- package/rules/autoconsent/bundesregierung-de.json +1 -1
- package/rules/autoconsent/dunelm.json +18 -0
- package/rules/autoconsent/etsy.json +13 -0
- package/rules/autoconsent/gov-uk.json +10 -0
- package/rules/autoconsent/marksandspencer.json +7 -0
- package/rules/autoconsent/{paypal-de.json → paypal.json} +6 -2
- package/rules/autoconsent/uswitch.json +8 -0
- package/rules/autoconsent/waitrose.json +28 -0
- package/rules/autoconsent/wetransfer.json +7 -0
- package/rules/rules.json +308 -50
- package/tests/192.spec.ts +7 -0
- package/tests/ausopen.spec.ts +7 -0
- package/tests/cookiebot.spec.ts +1 -0
- package/tests/dunelm.spec.ts +7 -0
- package/tests/etsy.spec.ts +7 -0
- package/tests/gov-uk.spec.ts +9 -0
- package/tests/marksandspencer.spec.ts +7 -0
- package/tests/onetrust.spec.ts +6 -0
- package/tests/paypal.spec.ts +7 -5
- package/tests/runner.ts +1 -1
- package/tests/trustarc.spec.ts +1 -0
- package/tests/uswitch.spec.ts +7 -0
- package/tests/waitrose.spec.ts +7 -0
- package/tests/wetransfer.spec.ts +7 -0
- package/rules/autoconsent/onetrust.json +0 -24
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dunelm.com",
|
|
3
|
+
"prehideSelectors": ["div[data-testid=cookie-consent-modal-backdrop]"],
|
|
4
|
+
"detectCmp": [{ "exists": "div[data-testid=cookie-consent-message-contents]"}],
|
|
5
|
+
"detectPopup": [{ "visible": "div[data-testid=cookie-consent-message-contents]" }],
|
|
6
|
+
"optIn": [{ "click": "" }],
|
|
7
|
+
"optOut": [
|
|
8
|
+
{
|
|
9
|
+
"click": "button[data-testid=cookie-consent-adjust-settings]"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"click": "button[data-testid=cookie-consent-preferences-save]"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"test": [
|
|
16
|
+
{"eval": "document.cookie.includes('cc_functional=0') && document.cookie.includes('cc_targeting=0')"}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "etsy",
|
|
3
|
+
"detectCmp": [{ "exists": "#gdpr-single-choice-overlay" }],
|
|
4
|
+
"detectPopup": [{ "visible": "#gdpr-single-choice-overlay" }],
|
|
5
|
+
"optOut": [
|
|
6
|
+
{"hide": ["#gdpr-single-choice-overlay", "#gdpr-privacy-settings"]},
|
|
7
|
+
{"click": "button[data-gdpr-open-full-settings]"},
|
|
8
|
+
{"wait": 500},
|
|
9
|
+
{"eval": "document.querySelectorAll('.gdpr-overlay-body input').forEach(toggle => { toggle.checked = false; }) || true"},
|
|
10
|
+
{"eval": "document.querySelector('.gdpr-overlay-view button[data-wt-overlay-close]').click() || true"}
|
|
11
|
+
],
|
|
12
|
+
"optIn": [{"click": "button[data-gdpr-single-choice-accept]"}]
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gov.uk",
|
|
3
|
+
"detectCmp": [{ "exists": "#global-cookie-message"}],
|
|
4
|
+
"detectPopup": [{ "exists": "#global-cookie-message" }],
|
|
5
|
+
"optIn": [{ "click": "button[data-accept-cookies=true]" }],
|
|
6
|
+
"optOut": [
|
|
7
|
+
{"click": "button[data-reject-cookies=true],#reject-cookies"},
|
|
8
|
+
{"click": "button[data-hide-cookie-banner=true],#hide-cookie-decision"}
|
|
9
|
+
]
|
|
10
|
+
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "paypal.
|
|
2
|
+
"name": "paypal.com",
|
|
3
3
|
"prehideSelectors": ["#gdprCookieBanner"],
|
|
4
4
|
"detectCmp": [{ "exists": "#gdprCookieBanner"}],
|
|
5
5
|
"detectPopup": [{ "visible": "#gdprCookieContent_wrapper" }],
|
|
6
6
|
"optIn": [{ "click": "#acceptAllButton" }],
|
|
7
7
|
"optOut": [
|
|
8
|
+
{
|
|
9
|
+
"wait": 200
|
|
10
|
+
},
|
|
8
11
|
{
|
|
9
12
|
"click": ".gdprCookieBanner_decline-button"
|
|
10
13
|
}
|
|
11
|
-
]
|
|
14
|
+
],
|
|
15
|
+
"test": [{"eval": "document.cookie.includes('cookie_prefs') === true"}]
|
|
12
16
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "uswitch.com",
|
|
3
|
+
"prehideSelectors": ["#cookie-banner-wrapper"],
|
|
4
|
+
"detectCmp": [{ "exists": "#cookie-banner-wrapper"}],
|
|
5
|
+
"detectPopup": [{ "visible": "#cookie-banner-wrapper" }],
|
|
6
|
+
"optIn": [{ "click": "#cookie_banner_accept_mobile" }],
|
|
7
|
+
"optOut": [{ "click": "#cookie_banner_save"}]
|
|
8
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "waitrose.com",
|
|
3
|
+
"prehideSelectors": [
|
|
4
|
+
"div[aria-labelledby=CookieAlertModalHeading]",
|
|
5
|
+
"section[data-test=initial-waitrose-cookie-consent-banner]",
|
|
6
|
+
"section[data-test=cookie-consent-modal]"
|
|
7
|
+
],
|
|
8
|
+
"detectCmp": [{ "exists": "section[data-test=initial-waitrose-cookie-consent-banner]"}],
|
|
9
|
+
"detectPopup": [{ "visible": "section[data-test=initial-waitrose-cookie-consent-banner]" }],
|
|
10
|
+
"optIn": [{ "click": "button[data-test=accept-all]" }],
|
|
11
|
+
"optOut": [
|
|
12
|
+
{
|
|
13
|
+
"click": "button[data-test=manage-cookies]"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"wait": 200
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"eval": "Array.from(document.querySelectorAll('label[id$=cookies-deny-label]')).forEach(e => e.click()) || true"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"click": "button[data-test=submit]"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"test": [
|
|
26
|
+
{"eval": "document.cookie.includes('wtr_cookies_advertising=0') && document.cookie.includes('wtr_cookies_analytics=0')"}
|
|
27
|
+
]
|
|
28
|
+
}
|
package/rules/rules.json
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"autoconsent": [
|
|
3
|
+
{
|
|
4
|
+
"name": "192.com",
|
|
5
|
+
"detectCmp": [
|
|
6
|
+
{
|
|
7
|
+
"exists": ".ont-cookies"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"detectPopup": [
|
|
11
|
+
{
|
|
12
|
+
"visible": ".ont-cookies"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"optIn": [
|
|
16
|
+
{
|
|
17
|
+
"click": ".ont-btn-main.ont-cookies-btn.js-ont-btn-ok2"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"optOut": [
|
|
21
|
+
{
|
|
22
|
+
"click": ".ont-cookes-btn-manage"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"click": ".ont-btn-main.ont-cookies-btn.js-ont-btn-choose"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"test": [
|
|
29
|
+
{
|
|
30
|
+
"eval": "document.cookie.includes('CC_ADVERTISING=NO') && document.cookie.includes('CC_ANALYTICS=NO')"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
3
34
|
{
|
|
4
35
|
"name": "arzt-auskunft.de",
|
|
5
36
|
"prehideSelectors": [
|
|
@@ -52,10 +83,33 @@
|
|
|
52
83
|
}
|
|
53
84
|
]
|
|
54
85
|
},
|
|
86
|
+
{
|
|
87
|
+
"name": "ausopen.com",
|
|
88
|
+
"isHidingRule": true,
|
|
89
|
+
"detectCmp": [
|
|
90
|
+
{
|
|
91
|
+
"exists": ".gdpr-popup__message"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"detectPopup": [
|
|
95
|
+
{
|
|
96
|
+
"visible": ".gdpr-popup__message"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"optOut": [
|
|
100
|
+
{
|
|
101
|
+
"hide": [
|
|
102
|
+
".gdpr-popup__message"
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
55
107
|
{
|
|
56
108
|
"name": "aws.amazon.com",
|
|
57
109
|
"prehideSelectors": [
|
|
58
110
|
"#awsccc-cb-content",
|
|
111
|
+
"#awsccc-cs-container",
|
|
112
|
+
"#awsccc-cs-modalOverlay",
|
|
59
113
|
"#awsccc-cs-container-inner"
|
|
60
114
|
],
|
|
61
115
|
"detectCmp": [
|
|
@@ -108,6 +162,40 @@
|
|
|
108
162
|
],
|
|
109
163
|
"optOut": []
|
|
110
164
|
},
|
|
165
|
+
{
|
|
166
|
+
"name": "bing.com",
|
|
167
|
+
"prehideSelectors": [
|
|
168
|
+
"#bnp_container"
|
|
169
|
+
],
|
|
170
|
+
"detectCmp": [
|
|
171
|
+
{
|
|
172
|
+
"exists": "#bnp_cookie_banner"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"detectPopup": [
|
|
176
|
+
{
|
|
177
|
+
"visible": "#bnp_cookie_banner"
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
"optIn": [
|
|
181
|
+
{
|
|
182
|
+
"click": "#bnp_btn_accept"
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"optOut": [
|
|
186
|
+
{
|
|
187
|
+
"click": "#bnp_btn_preference"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"click": "#mcp_savesettings"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"test": [
|
|
194
|
+
{
|
|
195
|
+
"eval": "document.cookie.includes('AL=0') && document.cookie.includes('AD=0') && document.cookie.includes('SM=0')"
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
},
|
|
111
199
|
{
|
|
112
200
|
"name": "borlabs",
|
|
113
201
|
"prehideSelectors": [
|
|
@@ -146,7 +234,7 @@
|
|
|
146
234
|
],
|
|
147
235
|
"detectPopup": [
|
|
148
236
|
{
|
|
149
|
-
"visible": ".bpa-module-full-hero"
|
|
237
|
+
"visible": ".bpa-cookie-banner .bpa-module-full-hero"
|
|
150
238
|
}
|
|
151
239
|
],
|
|
152
240
|
"optIn": [
|
|
@@ -392,6 +480,78 @@
|
|
|
392
480
|
}
|
|
393
481
|
]
|
|
394
482
|
},
|
|
483
|
+
{
|
|
484
|
+
"name": "dunelm.com",
|
|
485
|
+
"prehideSelectors": [
|
|
486
|
+
"div[data-testid=cookie-consent-modal-backdrop]"
|
|
487
|
+
],
|
|
488
|
+
"detectCmp": [
|
|
489
|
+
{
|
|
490
|
+
"exists": "div[data-testid=cookie-consent-message-contents]"
|
|
491
|
+
}
|
|
492
|
+
],
|
|
493
|
+
"detectPopup": [
|
|
494
|
+
{
|
|
495
|
+
"visible": "div[data-testid=cookie-consent-message-contents]"
|
|
496
|
+
}
|
|
497
|
+
],
|
|
498
|
+
"optIn": [
|
|
499
|
+
{
|
|
500
|
+
"click": ""
|
|
501
|
+
}
|
|
502
|
+
],
|
|
503
|
+
"optOut": [
|
|
504
|
+
{
|
|
505
|
+
"click": "button[data-testid=cookie-consent-adjust-settings]"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"click": "button[data-testid=cookie-consent-preferences-save]"
|
|
509
|
+
}
|
|
510
|
+
],
|
|
511
|
+
"test": [
|
|
512
|
+
{
|
|
513
|
+
"eval": "document.cookie.includes('cc_functional=0') && document.cookie.includes('cc_targeting=0')"
|
|
514
|
+
}
|
|
515
|
+
]
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "etsy",
|
|
519
|
+
"detectCmp": [
|
|
520
|
+
{
|
|
521
|
+
"exists": "#gdpr-single-choice-overlay"
|
|
522
|
+
}
|
|
523
|
+
],
|
|
524
|
+
"detectPopup": [
|
|
525
|
+
{
|
|
526
|
+
"visible": "#gdpr-single-choice-overlay"
|
|
527
|
+
}
|
|
528
|
+
],
|
|
529
|
+
"optOut": [
|
|
530
|
+
{
|
|
531
|
+
"hide": [
|
|
532
|
+
"#gdpr-single-choice-overlay",
|
|
533
|
+
"#gdpr-privacy-settings"
|
|
534
|
+
]
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"click": "button[data-gdpr-open-full-settings]"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"wait": 500
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"eval": "document.querySelectorAll('.gdpr-overlay-body input').forEach(toggle => { toggle.checked = false; }) || true"
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"eval": "document.querySelector('.gdpr-overlay-view button[data-wt-overlay-close]').click() || true"
|
|
547
|
+
}
|
|
548
|
+
],
|
|
549
|
+
"optIn": [
|
|
550
|
+
{
|
|
551
|
+
"click": "button[data-gdpr-single-choice-accept]"
|
|
552
|
+
}
|
|
553
|
+
]
|
|
554
|
+
},
|
|
395
555
|
{
|
|
396
556
|
"name": "eu-cookie-compliance-banner",
|
|
397
557
|
"isHidingRule": true,
|
|
@@ -463,6 +623,32 @@
|
|
|
463
623
|
}
|
|
464
624
|
]
|
|
465
625
|
},
|
|
626
|
+
{
|
|
627
|
+
"name": "gov.uk",
|
|
628
|
+
"detectCmp": [
|
|
629
|
+
{
|
|
630
|
+
"exists": "#global-cookie-message"
|
|
631
|
+
}
|
|
632
|
+
],
|
|
633
|
+
"detectPopup": [
|
|
634
|
+
{
|
|
635
|
+
"exists": "#global-cookie-message"
|
|
636
|
+
}
|
|
637
|
+
],
|
|
638
|
+
"optIn": [
|
|
639
|
+
{
|
|
640
|
+
"click": "button[data-accept-cookies=true]"
|
|
641
|
+
}
|
|
642
|
+
],
|
|
643
|
+
"optOut": [
|
|
644
|
+
{
|
|
645
|
+
"click": "button[data-reject-cookies=true],#reject-cookies"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
"click": "button[data-hide-cookie-banner=true],#hide-cookie-decision"
|
|
649
|
+
}
|
|
650
|
+
]
|
|
651
|
+
},
|
|
466
652
|
{
|
|
467
653
|
"name": "hl.co.uk",
|
|
468
654
|
"prehideSelectors": [
|
|
@@ -633,6 +819,27 @@
|
|
|
633
819
|
}
|
|
634
820
|
]
|
|
635
821
|
},
|
|
822
|
+
{
|
|
823
|
+
"name": "marksandspencer.com",
|
|
824
|
+
"isHidingRule": true,
|
|
825
|
+
"detectCmp": [
|
|
826
|
+
{
|
|
827
|
+
"exists": ".navigation-cookiebbanner"
|
|
828
|
+
}
|
|
829
|
+
],
|
|
830
|
+
"detectPopup": [
|
|
831
|
+
{
|
|
832
|
+
"visible": ".navigation-cookiebbanner"
|
|
833
|
+
}
|
|
834
|
+
],
|
|
835
|
+
"optOut": [
|
|
836
|
+
{
|
|
837
|
+
"hide": [
|
|
838
|
+
".navigation-cookiebbanner"
|
|
839
|
+
]
|
|
840
|
+
}
|
|
841
|
+
]
|
|
842
|
+
},
|
|
636
843
|
{
|
|
637
844
|
"name": "mediamarkt.de",
|
|
638
845
|
"prehideSelectors": [
|
|
@@ -909,54 +1116,6 @@
|
|
|
909
1116
|
}
|
|
910
1117
|
]
|
|
911
1118
|
},
|
|
912
|
-
{
|
|
913
|
-
"name": "Onetrust",
|
|
914
|
-
"prehideSelectors": [
|
|
915
|
-
"#onetrust-banner-sdk,#onetrust-consent-sdk,.optanon-alert-box-wrapper,.onetrust-pc-dark-filter,.js-consent-banner"
|
|
916
|
-
],
|
|
917
|
-
"isHidingRule": true,
|
|
918
|
-
"detectCmp": [
|
|
919
|
-
{
|
|
920
|
-
"exists": "#onetrust-banner-sdk,.optanon-alert-box-wrapper"
|
|
921
|
-
}
|
|
922
|
-
],
|
|
923
|
-
"detectPopup": [
|
|
924
|
-
{
|
|
925
|
-
"visible": "#onetrust-banner-sdk,.optanon-alert-box-wrapper"
|
|
926
|
-
}
|
|
927
|
-
],
|
|
928
|
-
"optOut": [
|
|
929
|
-
{
|
|
930
|
-
"click": "#onetrust-pc-btn-handler,.ot-sdk-show-settings,button.js-cookie-settings"
|
|
931
|
-
},
|
|
932
|
-
{
|
|
933
|
-
"waitFor": "#onetrust-consent-sdk",
|
|
934
|
-
"timeout": 2000
|
|
935
|
-
},
|
|
936
|
-
{
|
|
937
|
-
"wait": 1000
|
|
938
|
-
},
|
|
939
|
-
{
|
|
940
|
-
"click": "#onetrust-consent-sdk input.category-switch-handler:checked,.js-editor-toggle-state:checked",
|
|
941
|
-
"all": true,
|
|
942
|
-
"optional": true
|
|
943
|
-
},
|
|
944
|
-
{
|
|
945
|
-
"waitForThenClick": ".save-preference-btn-handler,.js-consent-save",
|
|
946
|
-
"timeout": 1000
|
|
947
|
-
}
|
|
948
|
-
],
|
|
949
|
-
"optIn": [
|
|
950
|
-
{
|
|
951
|
-
"click": "onetrust-accept-btn-handler,js-accept-cookies"
|
|
952
|
-
}
|
|
953
|
-
],
|
|
954
|
-
"test": [
|
|
955
|
-
{
|
|
956
|
-
"eval": "window.OnetrustActiveGroups.split(',').filter(s => s.length > 0).length <= 1"
|
|
957
|
-
}
|
|
958
|
-
]
|
|
959
|
-
},
|
|
960
1119
|
{
|
|
961
1120
|
"name": "osano",
|
|
962
1121
|
"prehideSelectors": [
|
|
@@ -1013,7 +1172,7 @@
|
|
|
1013
1172
|
]
|
|
1014
1173
|
},
|
|
1015
1174
|
{
|
|
1016
|
-
"name": "paypal.
|
|
1175
|
+
"name": "paypal.com",
|
|
1017
1176
|
"prehideSelectors": [
|
|
1018
1177
|
"#gdprCookieBanner"
|
|
1019
1178
|
],
|
|
@@ -1033,9 +1192,17 @@
|
|
|
1033
1192
|
}
|
|
1034
1193
|
],
|
|
1035
1194
|
"optOut": [
|
|
1195
|
+
{
|
|
1196
|
+
"wait": 200
|
|
1197
|
+
},
|
|
1036
1198
|
{
|
|
1037
1199
|
"click": ".gdprCookieBanner_decline-button"
|
|
1038
1200
|
}
|
|
1201
|
+
],
|
|
1202
|
+
"test": [
|
|
1203
|
+
{
|
|
1204
|
+
"eval": "document.cookie.includes('cookie_prefs') === true"
|
|
1205
|
+
}
|
|
1039
1206
|
]
|
|
1040
1207
|
},
|
|
1041
1208
|
{
|
|
@@ -1310,6 +1477,32 @@
|
|
|
1310
1477
|
}
|
|
1311
1478
|
]
|
|
1312
1479
|
},
|
|
1480
|
+
{
|
|
1481
|
+
"name": "uswitch.com",
|
|
1482
|
+
"prehideSelectors": [
|
|
1483
|
+
"#cookie-banner-wrapper"
|
|
1484
|
+
],
|
|
1485
|
+
"detectCmp": [
|
|
1486
|
+
{
|
|
1487
|
+
"exists": "#cookie-banner-wrapper"
|
|
1488
|
+
}
|
|
1489
|
+
],
|
|
1490
|
+
"detectPopup": [
|
|
1491
|
+
{
|
|
1492
|
+
"visible": "#cookie-banner-wrapper"
|
|
1493
|
+
}
|
|
1494
|
+
],
|
|
1495
|
+
"optIn": [
|
|
1496
|
+
{
|
|
1497
|
+
"click": "#cookie_banner_accept_mobile"
|
|
1498
|
+
}
|
|
1499
|
+
],
|
|
1500
|
+
"optOut": [
|
|
1501
|
+
{
|
|
1502
|
+
"click": "#cookie_banner_save"
|
|
1503
|
+
}
|
|
1504
|
+
]
|
|
1505
|
+
},
|
|
1313
1506
|
{
|
|
1314
1507
|
"name": "vodafone.de",
|
|
1315
1508
|
"prehideSelectors": [
|
|
@@ -1339,6 +1532,71 @@
|
|
|
1339
1532
|
}
|
|
1340
1533
|
]
|
|
1341
1534
|
},
|
|
1535
|
+
{
|
|
1536
|
+
"name": "waitrose.com",
|
|
1537
|
+
"prehideSelectors": [
|
|
1538
|
+
"div[aria-labelledby=CookieAlertModalHeading]",
|
|
1539
|
+
"section[data-test=initial-waitrose-cookie-consent-banner]",
|
|
1540
|
+
"section[data-test=cookie-consent-modal]"
|
|
1541
|
+
],
|
|
1542
|
+
"detectCmp": [
|
|
1543
|
+
{
|
|
1544
|
+
"exists": "section[data-test=initial-waitrose-cookie-consent-banner]"
|
|
1545
|
+
}
|
|
1546
|
+
],
|
|
1547
|
+
"detectPopup": [
|
|
1548
|
+
{
|
|
1549
|
+
"visible": "section[data-test=initial-waitrose-cookie-consent-banner]"
|
|
1550
|
+
}
|
|
1551
|
+
],
|
|
1552
|
+
"optIn": [
|
|
1553
|
+
{
|
|
1554
|
+
"click": "button[data-test=accept-all]"
|
|
1555
|
+
}
|
|
1556
|
+
],
|
|
1557
|
+
"optOut": [
|
|
1558
|
+
{
|
|
1559
|
+
"click": "button[data-test=manage-cookies]"
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
"wait": 200
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
"eval": "Array.from(document.querySelectorAll('label[id$=cookies-deny-label]')).forEach(e => e.click()) || true"
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
"click": "button[data-test=submit]"
|
|
1569
|
+
}
|
|
1570
|
+
],
|
|
1571
|
+
"test": [
|
|
1572
|
+
{
|
|
1573
|
+
"eval": "document.cookie.includes('wtr_cookies_advertising=0') && document.cookie.includes('wtr_cookies_analytics=0')"
|
|
1574
|
+
}
|
|
1575
|
+
]
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
"name": "wetransfer.com",
|
|
1579
|
+
"detectCmp": [
|
|
1580
|
+
{
|
|
1581
|
+
"exists": ".welcome__cookie-notice"
|
|
1582
|
+
}
|
|
1583
|
+
],
|
|
1584
|
+
"detectPopup": [
|
|
1585
|
+
{
|
|
1586
|
+
"visible": ".welcome__cookie-notice"
|
|
1587
|
+
}
|
|
1588
|
+
],
|
|
1589
|
+
"optIn": [
|
|
1590
|
+
{
|
|
1591
|
+
"click": ".welcome__button--accept"
|
|
1592
|
+
}
|
|
1593
|
+
],
|
|
1594
|
+
"optOut": [
|
|
1595
|
+
{
|
|
1596
|
+
"click": ".welcome__button--decline"
|
|
1597
|
+
}
|
|
1598
|
+
]
|
|
1599
|
+
},
|
|
1342
1600
|
{
|
|
1343
1601
|
"name": "xing.com",
|
|
1344
1602
|
"detectCmp": [
|
package/tests/cookiebot.spec.ts
CHANGED
package/tests/onetrust.spec.ts
CHANGED
package/tests/paypal.spec.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import generateCMPTests from "./runner";
|
|
2
2
|
|
|
3
|
-
generateCMPTests('paypal.
|
|
4
|
-
'https://paypal.de'
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
generateCMPTests('paypal.com', [
|
|
4
|
+
'https://paypal.de',
|
|
5
|
+
'https://paypal.com'
|
|
6
|
+
],{
|
|
7
|
+
skipRegions: ["US"],
|
|
8
|
+
testSelfTest: false
|
|
9
|
+
});
|
package/tests/runner.ts
CHANGED
|
@@ -39,7 +39,7 @@ export function generateTest(url: string, expectedCmp: string, options: TestOpti
|
|
|
39
39
|
}
|
|
40
40
|
await page.goto(url, { waitUntil: 'commit' });
|
|
41
41
|
|
|
42
|
-
const tab = autoconsent.attachToPage(page, url, rules, 20);
|
|
42
|
+
const tab = autoconsent.attachToPage(page, url, rules, 20, true);
|
|
43
43
|
await tab.checked;
|
|
44
44
|
expect(tab.getCMPName()).toBe(expectedCmp);
|
|
45
45
|
expect(await tab.isPopupOpen(50, 100)).toBeTruthy();
|
package/tests/trustarc.spec.ts
CHANGED