@duckduckgo/autoconsent 3.0.4 → 4.0.0

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.
Files changed (125) hide show
  1. package/.eslintrc +21 -0
  2. package/.github/dependabot.yml +6 -0
  3. package/.github/workflows/checks.yml +19 -0
  4. package/.prettierrc +4 -0
  5. package/CHANGELOG.md +38 -0
  6. package/Jenkinsfile +2 -2
  7. package/dist/addon-firefox/content.bundle.js +1 -1
  8. package/dist/addon-firefox/manifest.json +1 -1
  9. package/dist/addon-firefox/rules.json +49 -4
  10. package/dist/addon-mv3/content.bundle.js +1 -1
  11. package/dist/addon-mv3/manifest.json +1 -1
  12. package/dist/addon-mv3/rules.json +49 -4
  13. package/dist/autoconsent.cjs.js +1 -1
  14. package/dist/autoconsent.esm.js +1 -1
  15. package/dist/autoconsent.playwright.js +1 -1
  16. package/lib/cmps/sourcepoint-frame.ts +31 -7
  17. package/lib/consentomatic/index.ts +12 -12
  18. package/lib/consentomatic/tools.ts +13 -13
  19. package/lib/rule-executors.ts +8 -3
  20. package/package.json +10 -8
  21. package/rules/autoconsent/affinity-serif-com.json +1 -4
  22. package/rules/autoconsent/cookiealert.json +48 -0
  23. package/rules/rules.json +49 -4
  24. package/tests/192.spec.ts +3 -3
  25. package/tests/adroll.spec.ts +7 -7
  26. package/tests/affinity-serif-com.spec.ts +1 -1
  27. package/tests/airbnb.spec.ts +3 -3
  28. package/tests/amazon.spec.ts +8 -8
  29. package/tests/arzt-auskunft.spec.ts +3 -3
  30. package/tests/ausopen.spec.ts +2 -2
  31. package/tests/aws.amazon.spec.ts +3 -3
  32. package/tests/axeptio.spec.ts +3 -3
  33. package/tests/baden-wuerttemberg.spec.ts +3 -3
  34. package/tests/borlabs.spec.ts +4 -4
  35. package/tests/bundesregierung.spec.ts +6 -6
  36. package/tests/ccbanner.spec.ts +4 -4
  37. package/tests/clickio.spec.ts +5 -5
  38. package/tests/complianz-banner.spec.ts +2 -2
  39. package/tests/complianz-categories.spec.ts +5 -5
  40. package/tests/complianz-notice.spec.ts +3 -3
  41. package/tests/complianz-optin.spec.ts +1 -1
  42. package/tests/consentmanager.spec.ts +8 -8
  43. package/tests/conversant.spec.ts +5 -5
  44. package/tests/cookie-notice.spec.ts +2 -2
  45. package/tests/cookiealert.spec.ts +9 -0
  46. package/tests/cookiebot.spec.ts +9 -9
  47. package/tests/cookieinformation.spec.ts +5 -5
  48. package/tests/cookielawinfo.spec.ts +3 -3
  49. package/tests/corona-in-zahlen.spec.ts +3 -3
  50. package/tests/dailymotion.spec.ts +5 -5
  51. package/tests/deepl.spec.ts +3 -3
  52. package/tests/didomi.spec.ts +8 -8
  53. package/tests/dmgmedia.spec.ts +7 -7
  54. package/tests/drupal.spec.ts +3 -3
  55. package/tests/dunelm.spec.ts +3 -3
  56. package/tests/etsy.spec.ts +2 -2
  57. package/tests/eu-cookie-compliance-banner.spec.ts +2 -2
  58. package/tests/eu-cookie-law.spec.ts +2 -2
  59. package/tests/evidon.spec.ts +3 -3
  60. package/tests/ezoic.spec.ts +3 -3
  61. package/tests/facebook.spec.ts +5 -5
  62. package/tests/fundingchoices.spec.ts +6 -6
  63. package/tests/google.spec.ts +2 -2
  64. package/tests/gov-uk.spec.ts +4 -4
  65. package/tests/hl-co-uk.spec.ts +3 -3
  66. package/tests/hubspot.spec.ts +2 -2
  67. package/tests/ionos.spec.ts +3 -3
  68. package/tests/iubenda.spec.ts +3 -3
  69. package/tests/johnlewis.spec.ts +3 -3
  70. package/tests/jquery-cookiebar.spec.ts +2 -2
  71. package/tests/klaro.spec.ts +5 -5
  72. package/tests/linkedin.spec.ts +2 -2
  73. package/tests/marksandspencer.spec.ts +2 -2
  74. package/tests/mediamarkt.spec.ts +3 -3
  75. package/tests/mediavine.spec.ts +3 -3
  76. package/tests/metoffice-gov-uk.spec.ts +3 -3
  77. package/tests/microsoft.spec.ts +4 -4
  78. package/tests/moneysavingexpert.spec.ts +3 -3
  79. package/tests/monzo-com.spec.ts +1 -1
  80. package/tests/moove.spec.ts +6 -6
  81. package/tests/motor-talk.spec.ts +3 -3
  82. package/tests/national-lottery.spec.ts +3 -3
  83. package/tests/netflix.spec.ts +3 -3
  84. package/tests/nhs.spec.ts +3 -3
  85. package/tests/notice-cookie.spec.ts +2 -2
  86. package/tests/obi.spec.ts +3 -3
  87. package/tests/oil.spec.ts +6 -6
  88. package/tests/onetrust.spec.ts +24 -24
  89. package/tests/osano.spec.ts +1 -1
  90. package/tests/otto.spec.ts +3 -3
  91. package/tests/paypal.spec.ts +4 -4
  92. package/tests/primebox.spec.ts +2 -2
  93. package/tests/privacymanager.spec.ts +3 -3
  94. package/tests/pubtech.spec.ts +9 -9
  95. package/tests/quantcast.spec.ts +10 -10
  96. package/tests/reddit.spec.ts +3 -3
  97. package/tests/sibbo.spec.ts +10 -10
  98. package/tests/sirdata.spec.ts +3 -3
  99. package/tests/snigel.spec.ts +3 -3
  100. package/tests/sourcepoint.spec.ts +17 -17
  101. package/tests/springer.spec.ts +6 -6
  102. package/tests/steampowered.spec.ts +3 -3
  103. package/tests/tarteaucitron.spec.ts +4 -4
  104. package/tests/tealium.spec.ts +2 -2
  105. package/tests/termly.spec.ts +4 -4
  106. package/tests/testcmp.spec.ts +1 -1
  107. package/tests/thalia.spec.ts +3 -3
  108. package/tests/thefreedictionary.spec.ts +3 -3
  109. package/tests/tiktok.spec.ts +5 -5
  110. package/tests/trustarc.spec.ts +15 -15
  111. package/tests/twitter.spec.ts +7 -7
  112. package/tests/uk-cookie-consent.spec.ts +3 -3
  113. package/tests/uniconsent.spec.ts +4 -4
  114. package/tests/usercentrics-api.spec.ts +5 -5
  115. package/tests/usercentrics-button.spec.ts +3 -3
  116. package/tests/uswitch.spec.ts +3 -3
  117. package/tests/vodafone.spec.ts +3 -3
  118. package/tests/waitrose.spec.ts +3 -3
  119. package/tests/wetransfer.spec.ts +3 -3
  120. package/tests/wordpressgdpr.spec.ts +3 -3
  121. package/tests/wp-cookie-notice.spec.ts +3 -3
  122. package/tests/xing.spec.ts +4 -4
  123. package/tests/youtube-desktop.spec.ts +2 -4
  124. package/tests/youtube-mobile.spec.ts +3 -3
  125. package/.eslintrc.cjs +0 -14
@@ -5,9 +5,10 @@ import { waitFor } from "../utils";
5
5
  import AutoConsentCMPBase from "./base";
6
6
 
7
7
  export default class SourcePoint extends AutoConsentCMPBase {
8
- prehideSelectors = ["div[id^='sp_message_container_'],.message-overlay"]
8
+ prehideSelectors = ["div[id^='sp_message_container_'],.message-overlay",'#sp_privacy_manager_container']
9
9
 
10
- ccpaMode = false;
10
+ ccpaNotice = false;
11
+ ccpaPopup = false;
11
12
 
12
13
  runContext: RunContext = {
13
14
  main: false,
@@ -29,7 +30,11 @@ export default class SourcePoint extends AutoConsentCMPBase {
29
30
  async detectCmp() {
30
31
  const url = new URL(location.href);
31
32
  if (url.searchParams.has('message_id') && url.hostname === 'ccpa-notice.sp-prod.net') {
32
- this.ccpaMode = true;
33
+ this.ccpaNotice = true;
34
+ return true;
35
+ }
36
+ if (url.hostname === 'ccpa-pm.sp-prod.net') {
37
+ this.ccpaPopup = true;
33
38
  return true;
34
39
  }
35
40
  return (url.pathname === '/index.html' || url.pathname === '/privacy-manager/index.html')
@@ -37,6 +42,12 @@ export default class SourcePoint extends AutoConsentCMPBase {
37
42
  }
38
43
 
39
44
  async detectPopup() {
45
+ if (this.ccpaNotice) {
46
+ return true;
47
+ }
48
+ if (this.ccpaPopup) {
49
+ return await waitForElement('.priv-save-btn', 2000);
50
+ }
40
51
  // check for the paywall button, and bail if it exists to prevent broken opt out
41
52
  await waitForElement(".sp_choice_type_11,.sp_choice_type_12,.sp_choice_type_13,.sp_choice_type_ACCEPT_ALL", 2000);
42
53
  return !elementExists('.sp_choice_type_9');
@@ -55,10 +66,23 @@ export default class SourcePoint extends AutoConsentCMPBase {
55
66
  }
56
67
 
57
68
  isManagerOpen() {
58
- return (new URL(location.href)).pathname === "/privacy-manager/index.html";
69
+ return location.pathname === "/privacy-manager/index.html";
59
70
  }
60
71
 
61
72
  async optOut() {
73
+ if (this.ccpaPopup) {
74
+ // toggles with 2 buttons
75
+ const toggles = document.querySelectorAll('.priv-purpose-container .sp-switch-arrow-block a.neutral.on .right') as NodeListOf<HTMLElement>;
76
+ for (const t of toggles) {
77
+ click([t]);
78
+ }
79
+ // switch toggles
80
+ const switches = document.querySelectorAll('.priv-purpose-container .sp-switch-arrow-block a.switch-bg.on') as NodeListOf<HTMLElement>;
81
+ for (const t of switches) {
82
+ click([t]);
83
+ }
84
+ return click('.priv-save-btn');
85
+ }
62
86
  if (!this.isManagerOpen()) {
63
87
  const actionable = await waitForElement('.sp_choice_type_12,.sp_choice_type_13');
64
88
  if (!actionable) {
@@ -72,7 +96,7 @@ export default class SourcePoint extends AutoConsentCMPBase {
72
96
  click(".sp_choice_type_12");
73
97
  // the page may navigate at this point but that's okay
74
98
  await waitFor(
75
- () => location.pathname === "/privacy-manager/index.html",
99
+ () => this.isManagerOpen(),
76
100
  200,
77
101
  100
78
102
  );
@@ -102,7 +126,7 @@ export default class SourcePoint extends AutoConsentCMPBase {
102
126
  } catch (e) {
103
127
  enableLogs && console.warn(e);
104
128
  }
105
- click('.sp_choice_type_SAVE_AND_EXIT');
106
- return true;
129
+ // TODO: race condition: the popup disappears very quickly, so the background script may not receive a success report.
130
+ return click('.sp_choice_type_SAVE_AND_EXIT');
107
131
  }
108
132
  }
@@ -28,7 +28,7 @@ export async function executeAction(config: any, param?: any): Promise<boolean |
28
28
  case "slide":
29
29
  return slideAction(config);
30
30
  case "close":
31
- return closeAction(config);
31
+ return closeAction();
32
32
  case "wait":
33
33
  return waitAction(config);
34
34
  case "eval":
@@ -57,7 +57,7 @@ async function clickAction(config: any) {
57
57
  }
58
58
 
59
59
  async function listAction(config: any, param: any) {
60
- for (let action of config.actions) {
60
+ for (const action of config.actions) {
61
61
  await executeAction(action, param);
62
62
  }
63
63
  }
@@ -141,8 +141,8 @@ async function slideAction(config: any) {
141
141
  const result = Tools.find(config);
142
142
  const dragResult = Tools.find(config.dragTarget);
143
143
  if (result.target) {
144
- let targetBounds = result.target.getBoundingClientRect();
145
- let dragTargetBounds = dragResult.target.getBoundingClientRect();
144
+ const targetBounds = result.target.getBoundingClientRect();
145
+ const dragTargetBounds = dragResult.target.getBoundingClientRect();
146
146
 
147
147
  let yDiff = dragTargetBounds.top - targetBounds.top;
148
148
  let xDiff = dragTargetBounds.left - targetBounds.left;
@@ -154,12 +154,12 @@ async function slideAction(config: any) {
154
154
  yDiff = 0;
155
155
  }
156
156
 
157
- let screenX = window.screenX + targetBounds.left + targetBounds.width / 2.0;
158
- let screenY = window.screenY + targetBounds.top + targetBounds.height / 2.0;
159
- let clientX = targetBounds.left + targetBounds.width / 2.0;
160
- let clientY = targetBounds.top + targetBounds.height / 2.0;
157
+ const screenX = window.screenX + targetBounds.left + targetBounds.width / 2.0;
158
+ const screenY = window.screenY + targetBounds.top + targetBounds.height / 2.0;
159
+ const clientX = targetBounds.left + targetBounds.width / 2.0;
160
+ const clientY = targetBounds.top + targetBounds.height / 2.0;
161
161
 
162
- let mouseDown = document.createEvent("MouseEvents");
162
+ const mouseDown = document.createEvent("MouseEvents");
163
163
  mouseDown.initMouseEvent(
164
164
  "mousedown",
165
165
  true,
@@ -177,7 +177,7 @@ async function slideAction(config: any) {
177
177
  0,
178
178
  result.target
179
179
  );
180
- let mouseMove = document.createEvent("MouseEvents");
180
+ const mouseMove = document.createEvent("MouseEvents");
181
181
  mouseMove.initMouseEvent(
182
182
  "mousemove",
183
183
  true,
@@ -195,7 +195,7 @@ async function slideAction(config: any) {
195
195
  0,
196
196
  result.target
197
197
  );
198
- let mouseUp = document.createEvent("MouseEvents");
198
+ const mouseUp = document.createEvent("MouseEvents");
199
199
  mouseUp.initMouseEvent(
200
200
  "mouseup",
201
201
  true,
@@ -225,7 +225,7 @@ async function waitAction(config: any) {
225
225
  await waitTimeout(config.waitTime);
226
226
  }
227
227
 
228
- async function closeAction(config: any) {
228
+ async function closeAction() {
229
229
  window.close();
230
230
  }
231
231
 
@@ -28,12 +28,12 @@ export default class Tools {
28
28
 
29
29
  if (options.textFilter != null) {
30
30
  possibleTargets = possibleTargets.filter(possibleTarget => {
31
- let textContent = possibleTarget.textContent.toLowerCase();
31
+ const textContent = possibleTarget.textContent.toLowerCase();
32
32
 
33
33
  if (Array.isArray(options.textFilter)) {
34
34
  let foundText = false;
35
35
 
36
- for (let text of options.textFilter) {
36
+ for (const text of options.textFilter) {
37
37
  if (textContent.indexOf(text.toLowerCase()) !== -1) {
38
38
  foundText = true;
39
39
  break;
@@ -49,12 +49,12 @@ export default class Tools {
49
49
 
50
50
  if (options.styleFilters != null) {
51
51
  possibleTargets = possibleTargets.filter(possibleTarget => {
52
- let styles = window.getComputedStyle(possibleTarget);
52
+ const styles = window.getComputedStyle(possibleTarget);
53
53
 
54
54
  let keep = true;
55
55
 
56
- for (let styleFilter of options.styleFilters) {
57
- let option = styles[styleFilter.option];
56
+ for (const styleFilter of options.styleFilters) {
57
+ const option = styles[styleFilter.option];
58
58
 
59
59
  if (styleFilter.negated) {
60
60
  keep = keep && option !== styleFilter.value;
@@ -80,7 +80,7 @@ export default class Tools {
80
80
  }
81
81
 
82
82
  if (options.iframeFilter != null) {
83
- possibleTargets = possibleTargets.filter(possibleTarget => {
83
+ possibleTargets = possibleTargets.filter((/* possibleTarget */) => {
84
84
  if (options.iframeFilter) {
85
85
  //We should be inside an iframe
86
86
  return window.location !== window.parent.location;
@@ -93,9 +93,9 @@ export default class Tools {
93
93
 
94
94
  if (options.childFilter != null) {
95
95
  possibleTargets = possibleTargets.filter(possibleTarget => {
96
- let oldBase = Tools.base;
96
+ const oldBase = Tools.base;
97
97
  Tools.setBase(possibleTarget);
98
- let childResults = Tools.find(options.childFilter);
98
+ const childResults = Tools.find(options.childFilter);
99
99
  Tools.setBase(oldBase);
100
100
  return childResults.target != null;
101
101
  });
@@ -118,13 +118,13 @@ export default class Tools {
118
118
  }
119
119
 
120
120
  static find(options: any, multiple = false) {
121
- let results: any[] = [];
121
+ const results: any[] = [];
122
122
  if (options.parent != null) {
123
- let parent = Tools.findElement(options.parent, null, multiple);
123
+ const parent = Tools.findElement(options.parent, null, multiple);
124
124
  if (parent != null) {
125
125
  if (parent instanceof Array) {
126
126
  parent.forEach(p => {
127
- let targets = Tools.findElement(options.target, p, multiple);
127
+ const targets = Tools.findElement(options.target, p, multiple);
128
128
  if (targets instanceof Array) {
129
129
  targets.forEach(target => {
130
130
  results.push({
@@ -142,7 +142,7 @@ export default class Tools {
142
142
 
143
143
  return results;
144
144
  } else {
145
- let targets = Tools.findElement(options.target, parent, multiple);
145
+ const targets = Tools.findElement(options.target, parent, multiple);
146
146
  if (targets instanceof Array) {
147
147
  targets.forEach(target => {
148
148
  results.push({
@@ -159,7 +159,7 @@ export default class Tools {
159
159
  }
160
160
  }
161
161
  } else {
162
- let targets = Tools.findElement(options.target, null, multiple);
162
+ const targets = Tools.findElement(options.target, null, multiple);
163
163
  if (targets instanceof Array) {
164
164
  targets.forEach(target => {
165
165
  results.push({
@@ -10,9 +10,14 @@ export function doEval(expr: string): Promise<boolean> {
10
10
  });
11
11
  }
12
12
 
13
- export function click(selector: string, all = false): boolean {
14
- const elem = document.querySelectorAll<HTMLElement>(selector);
15
- enableLogs && console.log("[click]", selector, all, elem);
13
+ export function click(selectorOrElements: string | HTMLElement[], all = false): boolean {
14
+ let elem: HTMLElement[] = [];
15
+ if (typeof selectorOrElements === 'string') {
16
+ elem = Array.from(document.querySelectorAll<HTMLElement>(selectorOrElements));
17
+ } else {
18
+ elem = selectorOrElements;
19
+ }
20
+ enableLogs && console.log("[click]", selectorOrElements, all, elem);
16
21
  if (elem.length > 0) {
17
22
  if (all) {
18
23
  elem.forEach((e) => e.click());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duckduckgo/autoconsent",
3
- "version": "3.0.4",
3
+ "version": "4.0.0",
4
4
  "description": "",
5
5
  "main": "dist/autoconsent.cjs.js",
6
6
  "module": "dist/autoconsent.esm.js",
@@ -9,6 +9,7 @@
9
9
  },
10
10
  "scripts": {
11
11
  "clean": "rm -r dist",
12
+ "lint": "eslint lib/ playwright/ tests/ rules/autoconsent/*.json",
12
13
  "bundle": "rollup -c",
13
14
  "watch": "rollup -c -w",
14
15
  "test": "playwright test",
@@ -28,16 +29,17 @@
28
29
  "license": "MPL-2.0",
29
30
  "devDependencies": {
30
31
  "@playwright/test": "^1.17.1",
31
- "@rollup/plugin-json": "^4.1.0",
32
- "@rollup/plugin-typescript": "^8.3.2",
32
+ "@rollup/plugin-json": "^5.0.2",
33
+ "@rollup/plugin-typescript": "^10.0.1",
33
34
  "@types/chai": "^4.3.1",
34
- "@types/chrome": "^0.0.188",
35
- "@types/mocha": "^9.1.1",
36
- "@typescript-eslint/eslint-plugin": "^5.25.0",
37
- "@typescript-eslint/parser": "^5.25.0",
35
+ "@types/chrome": "^0.0.204",
36
+ "@types/mocha": "^10.0.1",
37
+ "@typescript-eslint/eslint-plugin": "^5.42.1",
38
+ "@typescript-eslint/parser": "^5.42.1",
38
39
  "auto": "^10.37.6",
39
40
  "chai": "^4.2.0",
40
- "eslint-config-airbnb": "^19.0.4",
41
+ "eslint": "^8.27.0",
42
+ "eslint-plugin-json": "^3.1.0",
41
43
  "mocha": "^10.0.0",
42
44
  "rollup": "^2.79.1",
43
45
  "rollup-plugin-copy": "^3.4.0",
@@ -2,10 +2,7 @@
2
2
  "name": "affinity.serif.com",
3
3
  "detectCmp": [
4
4
  {
5
- "exists": ".c-cookie-banner"
6
- },
7
- {
8
- "exists": ".c-cookie-banner button"
5
+ "exists": ".c-cookie-banner button[data-qa='allow-all-cookies']"
9
6
  }
10
7
  ],
11
8
  "detectPopup": [
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "cookiealert",
3
+ "intermediate": false,
4
+ "prehideSelectors": [],
5
+ "runContext": {
6
+ "frame": true,
7
+ "main": true
8
+ },
9
+ "detectCmp": [
10
+ {
11
+ "exists": ".cookie-alert-extended"
12
+ }
13
+ ],
14
+ "detectPopup": [
15
+ {
16
+ "visible": ".cookie-alert-extended-modal"
17
+ }
18
+ ],
19
+ "optIn": [
20
+ {
21
+ "click": "button[data-controller='cookie-alert/extended/button/accept']"
22
+ },
23
+ {
24
+ "eval": "document.querySelector('body').removeAttribute('style') || true"
25
+ }
26
+ ],
27
+ "optOut": [
28
+ {
29
+ "click": "a[data-controller='cookie-alert/extended/detail-link']"
30
+ },
31
+ {
32
+ "click": ".cookie-alert-configuration-input:checked",
33
+ "all": true,
34
+ "optional": true
35
+ },
36
+ {
37
+ "click": "button[data-controller='cookie-alert/extended/button/configuration']"
38
+ },
39
+ {
40
+ "eval": "document.querySelector('body').removeAttribute('style') || true"
41
+ }
42
+ ],
43
+ "test": [
44
+ {
45
+ "eval": "window.CookieConsent.declined === true"
46
+ }
47
+ ]
48
+ }
package/rules/rules.json CHANGED
@@ -66,10 +66,7 @@
66
66
  "name": "affinity.serif.com",
67
67
  "detectCmp": [
68
68
  {
69
- "exists": ".c-cookie-banner"
70
- },
71
- {
72
- "exists": ".c-cookie-banner button"
69
+ "exists": ".c-cookie-banner button[data-qa='allow-all-cookies']"
73
70
  }
74
71
  ],
75
72
  "detectPopup": [
@@ -721,6 +718,54 @@
721
718
  }
722
719
  ]
723
720
  },
721
+ {
722
+ "name": "cookiealert",
723
+ "intermediate": false,
724
+ "prehideSelectors": [],
725
+ "runContext": {
726
+ "frame": true,
727
+ "main": true
728
+ },
729
+ "detectCmp": [
730
+ {
731
+ "exists": ".cookie-alert-extended"
732
+ }
733
+ ],
734
+ "detectPopup": [
735
+ {
736
+ "visible": ".cookie-alert-extended-modal"
737
+ }
738
+ ],
739
+ "optIn": [
740
+ {
741
+ "click": "button[data-controller='cookie-alert/extended/button/accept']"
742
+ },
743
+ {
744
+ "eval": "document.querySelector('body').removeAttribute('style') || true"
745
+ }
746
+ ],
747
+ "optOut": [
748
+ {
749
+ "click": "a[data-controller='cookie-alert/extended/detail-link']"
750
+ },
751
+ {
752
+ "click": ".cookie-alert-configuration-input:checked",
753
+ "all": true,
754
+ "optional": true
755
+ },
756
+ {
757
+ "click": "button[data-controller='cookie-alert/extended/button/configuration']"
758
+ },
759
+ {
760
+ "eval": "document.querySelector('body').removeAttribute('style') || true"
761
+ }
762
+ ],
763
+ "test": [
764
+ {
765
+ "eval": "window.CookieConsent.declined === true"
766
+ }
767
+ ]
768
+ },
724
769
  {
725
770
  "name": "Cookie Information Banner",
726
771
  "prehideSelectors": [
package/tests/192.spec.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('192.com', [
4
- 'https://192.com'], {
5
- skipRegions: ["US", "FR", "DE"]
6
- }
4
+ 'https://192.com'], {
5
+ skipRegions: ["US", "FR", "DE"]
6
+ }
7
7
  );
@@ -1,15 +1,15 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('Adroll', [
4
- 'https://www.adroll.com/',
5
- 'https://www.appliancewhse.com/',
6
- 'https://www.michiganhumane.org/',
7
- 'https://audioplugin.deals/',
8
- 'https://www.mhu.edu/',
4
+ 'https://www.adroll.com/',
5
+ 'https://www.appliancewhse.com/',
6
+ 'https://www.michiganhumane.org/',
7
+ 'https://audioplugin.deals/',
8
+ 'https://www.mhu.edu/',
9
9
  ], {
10
- skipRegions: ['US']
10
+ skipRegions: ['US']
11
11
  });
12
12
 
13
13
  generateCMPTests('Adroll', [
14
- 'https://agoraeufalo.mykajabi.com/',
14
+ 'https://agoraeufalo.mykajabi.com/',
15
15
  ], {});
@@ -1,5 +1,5 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('affinity.serif.com', [
4
- 'https://affinity.serif.com/en-us/photo/'
4
+ 'https://affinity.serif.com/en-us/photo/'
5
5
  ]);
@@ -1,8 +1,8 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('airbnb', [
4
- 'https://airbnb.nl',
5
- 'https://airbnb.co.uk',
4
+ 'https://airbnb.nl',
5
+ 'https://airbnb.co.uk',
6
6
  ],{
7
- skipRegions: ['US']
7
+ skipRegions: ['US']
8
8
  });
@@ -1,17 +1,17 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('amazon.com', [
4
- 'https://www.amazon.co.uk/',
5
- 'https://www.amazon.de/',
6
- 'https://www.amazon.nl/',
4
+ 'https://www.amazon.co.uk/',
5
+ 'https://www.amazon.de/',
6
+ 'https://www.amazon.nl/',
7
7
  ],{
8
- mobile: true,
8
+ mobile: true,
9
9
  });
10
10
 
11
11
  generateCMPTests('amazon.com', [
12
- 'https://www.amazon.co.uk/',
13
- 'https://www.amazon.de/',
14
- 'https://www.amazon.nl/',
12
+ 'https://www.amazon.co.uk/',
13
+ 'https://www.amazon.de/',
14
+ 'https://www.amazon.nl/',
15
15
  ],{
16
- mobile: false,
16
+ mobile: false,
17
17
  });
@@ -1,7 +1,7 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('arzt-auskunft.de', [
4
- 'https://arzt-auskunft.de'], {
5
- skipRegions: ["US", "FR", "GB"]
6
- }
4
+ 'https://arzt-auskunft.de'], {
5
+ skipRegions: ["US", "FR", "GB"]
6
+ }
7
7
  );
@@ -1,7 +1,7 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('ausopen.com', [
4
- 'https://www.ausopen.com/',
4
+ 'https://www.ausopen.com/',
5
5
  ], {
6
- skipRegions: ["US", "FR", "DE"]
6
+ skipRegions: ["US", "FR", "DE"]
7
7
  });
@@ -1,7 +1,7 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('aws.amazon.com', [
4
- 'https://docs.aws.amazon.com'], {
5
- skipRegions: ["US"]
6
- }
4
+ 'https://docs.aws.amazon.com'], {
5
+ skipRegions: ["US"]
6
+ }
7
7
  );
@@ -2,8 +2,8 @@
2
2
  import generateCMPTests from "../playwright/runner";
3
3
 
4
4
  generateCMPTests('axeptio', [
5
- 'https://www.welcometothejungle.com/',
6
- 'https://frichti.co/landing?redirectTo=/',
7
- 'https://www.dorcel.com/'
5
+ 'https://www.welcometothejungle.com/',
6
+ 'https://frichti.co/landing?redirectTo=/',
7
+ 'https://www.dorcel.com/'
8
8
  ]
9
9
  );
@@ -1,7 +1,7 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('baden-wuerttemberg.de', [
4
- 'https://baden-wuerttemberg.de'], {
5
- skipRegions: ["US"]
6
- }
4
+ 'https://baden-wuerttemberg.de'], {
5
+ skipRegions: ["US"]
6
+ }
7
7
  );
@@ -1,7 +1,7 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('borlabs', [
4
- 'https://www.experto.de/', 'https://www.kesselheld.de/'], {
5
- skipRegions: ["US"]
6
- }
7
- );
4
+ 'https://www.experto.de/', 'https://www.kesselheld.de/'
5
+ ], {
6
+ skipRegions: ["US"]
7
+ });
@@ -1,10 +1,10 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('bundesregierung.de', [
4
- 'https://bundesregierung.de'], {
5
- skipRegions: [
6
- "US", "FR", "GB",
7
- "DE" // our crawler proxy hits a bot wall, but it still passes locally
8
- ]
9
- }
4
+ 'https://bundesregierung.de'], {
5
+ skipRegions: [
6
+ "US", "FR", "GB",
7
+ "DE" // our crawler proxy hits a bot wall, but it still passes locally
8
+ ]
9
+ }
10
10
  );
@@ -1,11 +1,11 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('cc_banner', [
4
- 'https://www.w3resource.com/',
5
- 'https://bitcoin.org/en/',
4
+ 'https://www.w3resource.com/',
5
+ 'https://bitcoin.org/en/',
6
6
  ])
7
7
  generateCMPTests('cc_banner', [
8
- 'https://distrowatch.com/',
8
+ 'https://distrowatch.com/',
9
9
  ], {
10
- skipRegions: ['US', 'GB'],
10
+ skipRegions: ['US', 'GB'],
11
11
  });
@@ -1,10 +1,10 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('click.io', [
4
- 'https://www.propertywire.com/',
5
- 'https://pedsovet.su/',
6
- 'https://golftoday.co.uk/',
7
- 'https://www.golfshake.com/',
4
+ 'https://www.propertywire.com/',
5
+ 'https://pedsovet.su/',
6
+ 'https://golftoday.co.uk/',
7
+ 'https://www.golfshake.com/',
8
8
  ], {
9
- skipRegions: ['US']
9
+ skipRegions: ['US']
10
10
  });
@@ -1,7 +1,7 @@
1
1
  import generateCMPTests from "../playwright/runner";
2
2
 
3
3
  generateCMPTests('Complianz banner', [
4
- 'https://bloodpressureok.com/',
5
- 'https://www.fussball-wm.pro/',
4
+ 'https://bloodpressureok.com/',
5
+ 'https://www.fussball-wm.pro/',
6
6
  ], {}
7
7
  );