@duckduckgo/autoconsent 17.3.0 → 18.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.
- package/.prettierignore +1 -0
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +90 -0
- package/dist/addon-firefox/background.bundle.js +28 -7
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +624 -54
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/popup.bundle.js +19 -7
- package/dist/addon-firefox/rule-index.json +1 -1
- package/dist/addon-firefox/rules.json +1 -1
- package/dist/addon-mv3/background.bundle.js +28 -7
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/content.bundle.js +624 -54
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/popup.bundle.js +19 -7
- package/dist/addon-mv3/rule-index.json +1 -1
- package/dist/addon-mv3/rules.json +1 -1
- package/dist/autoconsent.cjs.js +630 -60
- package/dist/autoconsent.esm.js +630 -60
- package/dist/autoconsent.playwright.js +624 -54
- package/dist/autoconsent.standalone.js +631 -61
- package/dist/heuristics.cjs.js +621 -52
- package/dist/heuristics.mjs +609 -50
- package/dist/types/cmps/trustarc-top.d.ts +1 -0
- package/dist/types/eval-snippets.d.ts +2 -0
- package/dist/types/heuristic-classify.d.ts +2 -6
- package/dist/types/heuristic-detect.d.ts +32 -0
- package/dist/types/heuristic-literals.d.ts +1 -0
- package/dist/types/heuristic-negatives.d.ts +25 -0
- package/dist/types/heuristic-patterns.d.ts +18 -2
- package/dist/types/heuristic-prefilter.d.ts +13 -0
- package/docs/heuristic-detection.md +78 -0
- package/docs/heuristic-prefilter.md +62 -0
- package/eslint.config.mjs +16 -1
- package/lib/cmps/admiral.ts +10 -0
- package/lib/cmps/trustarc-top.ts +10 -1
- package/lib/eval-snippets.ts +9 -0
- package/lib/heuristic-classify.ts +4 -39
- package/lib/heuristic-detect.ts +209 -0
- package/lib/heuristic-literals.ts +207 -0
- package/lib/heuristic-negatives.ts +173 -0
- package/lib/heuristic-patterns.ts +104 -31
- package/lib/heuristic-prefilter.ts +40 -0
- package/lib/heuristics.ts +8 -4
- package/lib/web.ts +1 -1
- package/package.json +2 -1
- package/rules/autoconsent/adblockplus.json +94 -0
- package/rules/autoconsent/alertamodal-cookies.json +29 -0
- package/rules/autoconsent/altamar-cookieconsent.json +45 -0
- package/rules/autoconsent/autohero.json +49 -0
- package/rules/autoconsent/bing.com-notice-cosmetic.json +28 -0
- package/rules/autoconsent/bing.com-notice.json +13 -0
- package/rules/autoconsent/binogi.json +32 -0
- package/rules/autoconsent/bokio.json +32 -0
- package/rules/autoconsent/botble-cookie-consent.json +16 -0
- package/rules/autoconsent/bsgdprcookies.json +16 -0
- package/rules/autoconsent/calcolo-tools.json +23 -0
- package/rules/autoconsent/casasrurales.json +15 -0
- package/rules/autoconsent/ccoo.json +40 -0
- package/rules/autoconsent/cdu-edu-au.json +29 -0
- package/rules/autoconsent/cnmc-gob-es.json +14 -0
- package/rules/autoconsent/comparandonos.json +66 -0
- package/rules/autoconsent/consent-backdrop.json +34 -0
- package/rules/autoconsent/consilium-europa-eu.json +35 -0
- package/rules/autoconsent/cookie-accordion-settings.json +56 -0
- package/rules/autoconsent/cookies-tip-v1.json +9 -0
- package/rules/autoconsent/cookiesplus.json +20 -0
- package/rules/autoconsent/crtm.json +36 -0
- package/rules/autoconsent/dtu-findit.json +47 -0
- package/rules/autoconsent/edebe.json +22 -0
- package/rules/autoconsent/eduardolosilla.json +12 -0
- package/rules/autoconsent/educastur-alojaweb.json +13 -0
- package/rules/autoconsent/flatsome-cookies.json +25 -0
- package/rules/autoconsent/gameforge.json +42 -0
- package/rules/autoconsent/gamefound-com.json +12 -0
- package/rules/autoconsent/generalitat-catalunya.json +15 -0
- package/rules/autoconsent/hikvision.com.json +18 -0
- package/rules/autoconsent/hurra-consent.json +16 -0
- package/rules/autoconsent/ihavecookies.json +5 -1
- package/rules/autoconsent/imarina.json +25 -0
- package/rules/autoconsent/isidewith.com.json +38 -0
- package/rules/autoconsent/jobtoday.json +18 -0
- package/rules/autoconsent/kaggle.json +21 -0
- package/rules/autoconsent/landgate.json +10 -0
- package/rules/autoconsent/mblock.json +28 -0
- package/rules/autoconsent/mirasvit-gdpr.json +18 -7
- package/rules/autoconsent/mites.gob.es.json +18 -0
- package/rules/autoconsent/pakamera.json +19 -0
- package/rules/autoconsent/purecookie-cosmetic.json +13 -0
- package/rules/autoconsent/random-org.json +41 -0
- package/rules/autoconsent/react-cookie-consent-cosmetic.json +40 -0
- package/rules/autoconsent/supercontable.json +19 -0
- package/rules/autoconsent/tallink.json +13 -0
- package/rules/autoconsent/tealium.json +4 -1
- package/rules/autoconsent/tusclasesparticulares.com.json +14 -0
- package/rules/autoconsent/typo3-cookieconsent.json +9 -0
- package/rules/autoconsent/udg.edu.json +47 -0
- package/rules/autoconsent/uned-barbastro.json +58 -0
- package/rules/autoconsent/uregina.json +35 -0
- package/rules/autoconsent/vinnies-org-au.json +29 -0
- package/rules/autoconsent/vrg-bottom-cookies.json +52 -0
- package/rules/autoconsent/wiki.gg.json +1 -1
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/scripts/build-heuristic-literals.ts +24 -0
- package/scripts/required-literals.ts +177 -0
- package/tests/adblockplus.spec.ts +7 -0
- package/tests/admiral.spec.ts +5 -4
- package/tests/alertamodal-cookies.spec.ts +8 -0
- package/tests/altamar-cookieconsent.spec.ts +6 -0
- package/tests/autohero.spec.ts +3 -0
- package/tests/bing.com-notice-cosmetic.spec.ts +5 -0
- package/tests/bing.com-notice.spec.ts +6 -0
- package/tests/binogi.spec.ts +3 -0
- package/tests/bokio.spec.ts +6 -0
- package/tests/botble-cookie-consent.spec.ts +11 -0
- package/tests/bsgdprcookies.spec.ts +6 -0
- package/tests/calcolo-tools.spec.ts +3 -0
- package/tests/casasrurales.spec.ts +3 -0
- package/tests/ccoo.spec.ts +5 -0
- package/tests/cdu-edu-au.spec.ts +3 -0
- package/tests/cnmc-gob-es.spec.ts +3 -0
- package/tests/comparandonos.spec.ts +3 -0
- package/tests/consent-backdrop.spec.ts +9 -0
- package/tests/consilium-europa-eu.spec.ts +3 -0
- package/tests/cookie-accordion-settings.spec.ts +5 -0
- package/tests/cookies-tip-v1.spec.ts +3 -0
- package/tests/cookiesplus.spec.ts +6 -0
- package/tests/crtm.spec.ts +3 -0
- package/tests/dtu-findit.spec.ts +3 -0
- package/tests/edebe.spec.ts +3 -0
- package/tests/eduardolosilla.spec.ts +3 -0
- package/tests/educastur-alojaweb.spec.ts +6 -0
- package/tests/flatsome-cookies.spec.ts +3 -0
- package/tests/gameforge.spec.ts +8 -0
- package/tests/gamefound-com.spec.ts +3 -0
- package/tests/generalitat-catalunya.spec.ts +3 -0
- package/tests/hikvision.com.spec.ts +3 -0
- package/tests/hurra-consent.spec.ts +8 -0
- package/tests/ihavecookies.spec.ts +7 -1
- package/tests/imarina.spec.ts +8 -0
- package/tests/isidewith.com.spec.ts +3 -0
- package/tests/jobtoday.spec.ts +5 -0
- package/tests/kaggle.spec.ts +3 -0
- package/tests/landgate.spec.ts +3 -0
- package/tests/mblock.spec.ts +3 -0
- package/tests/mirasvit-gdpr.spec.ts +5 -0
- package/tests/mites.gob.es.spec.ts +3 -0
- package/tests/pakamera.spec.ts +5 -0
- package/tests/purecookie-cosmetic.spec.ts +8 -0
- package/tests/random-org.spec.ts +3 -0
- package/tests/react-cookie-consent-cosmetic.spec.ts +9 -0
- package/tests/supercontable.spec.ts +3 -0
- package/tests/tallink.spec.ts +3 -0
- package/tests/trustarc.spec.ts +7 -0
- package/tests/tusclasesparticulares.com.spec.ts +3 -0
- package/tests/typo3-cookieconsent.spec.ts +10 -0
- package/tests/udg.edu.spec.ts +3 -0
- package/tests/uned-barbastro.spec.ts +3 -0
- package/tests/uregina.spec.ts +3 -0
- package/tests/vinnies-org-au.spec.ts +3 -0
- package/tests/vrg-bottom-cookies.spec.ts +3 -0
- package/tests-wtr/heuristics/heuristics-utils.test.ts +222 -8
- package/tests-wtr/heuristics/regex-syntax.test.ts +81 -0
- package/rules/generated/auto_CA_promessedefleurs.com_noy.json +0 -40
- package/rules/generated/auto_FR_ludum.fr_gl5.json +0 -40
- package/rules/generated/auto_FR_meillandrichardier.com_c2f.json +0 -40
- package/rules/generated/auto_NL_bonprix.nl_ovi.json +0 -40
- package/tests/generated/auto_CA_promessedefleurs.com_noy.spec.ts +0 -6
- package/tests/generated/auto_FR_ludum.fr_gl5.spec.ts +0 -2
- package/tests/generated/auto_FR_meillandrichardier.com_c2f.spec.ts +0 -6
- package/tests/generated/auto_NL_bonprix.nl_ovi.spec.ts +0 -2
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates lib/heuristic-literals.ts: the prefilter literals of each built-in detect pattern, in DETECT_PATTERNS order,
|
|
3
|
+
* so pages don't parse the pattern sources at load time. Run after changing DETECT_PATTERNS and commit the result; a
|
|
4
|
+
* unit test fails while it is stale. See docs/heuristic-prefilter.md.
|
|
5
|
+
*/
|
|
6
|
+
import fs from 'fs';
|
|
7
|
+
import path from 'path';
|
|
8
|
+
import { detectLiteralTable } from './required-literals';
|
|
9
|
+
|
|
10
|
+
const OUT = path.join(__dirname, '../lib/heuristic-literals.ts');
|
|
11
|
+
|
|
12
|
+
const table = detectLiteralTable();
|
|
13
|
+
fs.writeFileSync(
|
|
14
|
+
OUT,
|
|
15
|
+
[
|
|
16
|
+
'// Generated by `npm run build-heuristic-literals` from DETECT_PATTERNS. Do not edit.',
|
|
17
|
+
'// Entry i holds the literals DETECT_PATTERNS[i] needs to match (see docs/heuristic-prefilter.md).',
|
|
18
|
+
'export const DETECT_PATTERN_LITERALS: string[][] = [',
|
|
19
|
+
...table.map((literals) => ` ${JSON.stringify(literals)},`),
|
|
20
|
+
'];',
|
|
21
|
+
'',
|
|
22
|
+
].join('\n'),
|
|
23
|
+
);
|
|
24
|
+
console.log(`Wrote ${path.relative(process.cwd(), OUT)} (${table.length} patterns)`);
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Works out the prefilter literals of a detect pattern from its regex source (see docs/heuristic-prefilter.md).
|
|
3
|
+
* Build-time only: `build-heuristic-literals.ts` writes `detectLiteralTable()` to lib/heuristic-literals.ts, and a unit
|
|
4
|
+
* test checks that file against it. It is not part of the library, so pages never parse pattern sources.
|
|
5
|
+
*
|
|
6
|
+
* The literals must be sound: every match of the pattern contains at least one of them, or the prefilter would skip a
|
|
7
|
+
* pattern that matches. When that can't be shown from the source, a pattern gets no literals and is never skipped.
|
|
8
|
+
*/
|
|
9
|
+
import { DETECT_PATTERNS, patternOf } from '../lib/heuristic-patterns';
|
|
10
|
+
|
|
11
|
+
/** The index of the `]` closing the character class that opens at `open`, skipping escapes. */
|
|
12
|
+
export function classEnd(src: string, open: number): number {
|
|
13
|
+
let i = open + 1;
|
|
14
|
+
while (i < src.length && src[i] !== ']') {
|
|
15
|
+
i += src[i] === '\\' ? 2 : 1;
|
|
16
|
+
}
|
|
17
|
+
return i;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** The index of the `)` closing the group that opens at `open`, skipping escapes and classes. */
|
|
21
|
+
export function groupEnd(src: string, open: number): number {
|
|
22
|
+
let depth = 0;
|
|
23
|
+
for (let i = open; i < src.length; i++) {
|
|
24
|
+
const c = src[i];
|
|
25
|
+
if (c === '\\') {
|
|
26
|
+
i++;
|
|
27
|
+
} else if (c === '[') {
|
|
28
|
+
i = classEnd(src, i);
|
|
29
|
+
} else if (c === '(') {
|
|
30
|
+
depth++;
|
|
31
|
+
} else if (c === ')' && --depth === 0) {
|
|
32
|
+
return i;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return src.length;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Splits a regex source at its top-level `|`. */
|
|
39
|
+
export function alternatives(src: string): string[] {
|
|
40
|
+
const parts = [];
|
|
41
|
+
let from = 0;
|
|
42
|
+
for (let i = 0; i < src.length; i++) {
|
|
43
|
+
const c = src[i];
|
|
44
|
+
if (c === '\\') {
|
|
45
|
+
i++;
|
|
46
|
+
} else if (c === '[') {
|
|
47
|
+
i = classEnd(src, i);
|
|
48
|
+
} else if (c === '(') {
|
|
49
|
+
i = groupEnd(src, i);
|
|
50
|
+
} else if (c === '|') {
|
|
51
|
+
parts.push(src.slice(from, i));
|
|
52
|
+
from = i + 1;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
parts.push(src.slice(from));
|
|
56
|
+
return parts;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** A group's alternatives as lowercased plain literals (word boundaries dropped), or null if any has other syntax. */
|
|
60
|
+
function plainAlternatives(inner: string): string[] | null {
|
|
61
|
+
if (inner.startsWith('?!')) {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
// lookbehind isn't allowed in lib/, and would not count as plain
|
|
65
|
+
const plain = alternatives(inner.replace(/^\?[:=]/, '')).map((p) => p.replace(/\\b/g, '').replace(/\\([^A-Za-z0-9])/g, '$1'));
|
|
66
|
+
return plain.every((p) => p && !/[\\.^$*+?()[\]{}|]/.test(p)) ? plain.map((p) => p.toLowerCase()) : null;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** The index after the escape that starts at src[i] (a backslash), including multi-character escapes such as \\uXXXX. */
|
|
70
|
+
function escapeEnd(src: string, i: number): number {
|
|
71
|
+
const n = src[i + 1];
|
|
72
|
+
const through = (close: string) => {
|
|
73
|
+
const at = src.indexOf(close, i + 2);
|
|
74
|
+
return at === -1 ? src.length : at + 1;
|
|
75
|
+
};
|
|
76
|
+
if (n === 'u') {
|
|
77
|
+
return src[i + 2] === '{' ? through('}') : i + 6;
|
|
78
|
+
}
|
|
79
|
+
if (n === 'x') {
|
|
80
|
+
return i + 4;
|
|
81
|
+
}
|
|
82
|
+
if (n === 'c') {
|
|
83
|
+
return i + 3;
|
|
84
|
+
}
|
|
85
|
+
if ((n === 'p' || n === 'P') && src[i + 2] === '{') {
|
|
86
|
+
return through('}');
|
|
87
|
+
}
|
|
88
|
+
if (n === 'k' && src[i + 2] === '<') {
|
|
89
|
+
return through('>');
|
|
90
|
+
}
|
|
91
|
+
return i + 2;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function literalsOf(src: string): string[] {
|
|
95
|
+
const alts = alternatives(src);
|
|
96
|
+
if (alts.length > 1) {
|
|
97
|
+
const each = alts.map(literalsOf);
|
|
98
|
+
return each.every((l) => l.length) ? each.flat() : [];
|
|
99
|
+
}
|
|
100
|
+
// candidate requirements: a run of literal characters, or a required group of plain alternatives
|
|
101
|
+
const candidates: string[][] = [];
|
|
102
|
+
let run = '';
|
|
103
|
+
const end = () => {
|
|
104
|
+
candidates.push([run.toLowerCase()]);
|
|
105
|
+
run = '';
|
|
106
|
+
};
|
|
107
|
+
const quantifier = (i: number) => {
|
|
108
|
+
const q = src[i];
|
|
109
|
+
if (q !== '?' && q !== '*' && q !== '+' && q !== '{') {
|
|
110
|
+
return { zero: false, quantified: false, next: i };
|
|
111
|
+
}
|
|
112
|
+
const zero = q === '?' || q === '*' || (q === '{' && /^\{0[,}]/.test(src.slice(i)));
|
|
113
|
+
let j = q === '{' ? src.indexOf('}', i) + 1 : i + 1;
|
|
114
|
+
if (src[j] === '?') {
|
|
115
|
+
j++;
|
|
116
|
+
}
|
|
117
|
+
return { zero, quantified: true, next: j };
|
|
118
|
+
};
|
|
119
|
+
const literalChar = (ch: string, i: number) => {
|
|
120
|
+
const q = quantifier(i);
|
|
121
|
+
if (!q.zero) {
|
|
122
|
+
run += ch;
|
|
123
|
+
}
|
|
124
|
+
if (q.quantified) {
|
|
125
|
+
end();
|
|
126
|
+
}
|
|
127
|
+
return q.next;
|
|
128
|
+
};
|
|
129
|
+
for (let i = 0; i < src.length;) {
|
|
130
|
+
const c = src[i];
|
|
131
|
+
if (c === '\\') {
|
|
132
|
+
const n = src[i + 1];
|
|
133
|
+
if (/[^A-Za-z0-9]/.test(n)) {
|
|
134
|
+
i = literalChar(n, i + 2);
|
|
135
|
+
} else {
|
|
136
|
+
// a class escape (\\s, \\b…) or a character, property or backreference escape ends the run
|
|
137
|
+
end();
|
|
138
|
+
i = quantifier(escapeEnd(src, i)).next;
|
|
139
|
+
}
|
|
140
|
+
} else if (c === '[') {
|
|
141
|
+
end();
|
|
142
|
+
i = quantifier(classEnd(src, i) + 1).next;
|
|
143
|
+
} else if (c === '(') {
|
|
144
|
+
end();
|
|
145
|
+
const close = groupEnd(src, i);
|
|
146
|
+
const q = quantifier(close + 1);
|
|
147
|
+
const plain = q.zero ? null : plainAlternatives(src.slice(i + 1, close));
|
|
148
|
+
if (plain) {
|
|
149
|
+
candidates.push(plain);
|
|
150
|
+
}
|
|
151
|
+
i = q.next;
|
|
152
|
+
} else if (c === '.' || c === '^' || c === '$') {
|
|
153
|
+
end();
|
|
154
|
+
i = quantifier(i + 1).next;
|
|
155
|
+
} else {
|
|
156
|
+
i = literalChar(c, i + 1);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
end();
|
|
160
|
+
// the most selective cheap check: the requirement whose shortest literal is longest
|
|
161
|
+
const shortest = (l: string[]) => Math.min(...l.map((x) => x.length));
|
|
162
|
+
const usable = candidates.filter((l) => l.every((x) => x.trim().length >= 3));
|
|
163
|
+
const best = usable.reduce((a, b) => (shortest(b) > shortest(a) ? b : a), ['']);
|
|
164
|
+
return shortest(best) >= 4 ? [...new Set(best)] : [];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Lowercased literals any match of a regex must contain (at least one of them), or none if they can't be worked out.
|
|
169
|
+
*/
|
|
170
|
+
export function requiredLiterals(re: RegExp): string[] {
|
|
171
|
+
return literalsOf(re.source);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/** The contents of lib/heuristic-literals.ts: each built-in detect pattern's literals, in DETECT_PATTERNS order. */
|
|
175
|
+
export function detectLiteralTable(): string[][] {
|
|
176
|
+
return DETECT_PATTERNS.map((p) => requiredLiterals(patternOf(p)));
|
|
177
|
+
}
|
package/tests/admiral.spec.ts
CHANGED
|
@@ -3,10 +3,11 @@ import generateCMPTests from '../playwright/runner';
|
|
|
3
3
|
generateCMPTests(
|
|
4
4
|
'Admiral',
|
|
5
5
|
[
|
|
6
|
-
'https://
|
|
7
|
-
'https://
|
|
8
|
-
'https://
|
|
9
|
-
'https://
|
|
6
|
+
'https://steamcharts.com/',
|
|
7
|
+
'https://www.linguee.com/',
|
|
8
|
+
'https://www.buchstaben.com/',
|
|
9
|
+
'https://www.dexerto.com/',
|
|
10
|
+
'https://www.last.fm/',
|
|
10
11
|
],
|
|
11
12
|
{ testOptIn: false },
|
|
12
13
|
);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
const urls = ['https://altamar.es/', 'https://altamar.cat/', 'https://inoxcyl.com/'];
|
|
4
|
+
|
|
5
|
+
generateCMPTests('altamar-cookieconsent', urls, { mobile: true });
|
|
6
|
+
generateCMPTests('altamar-cookieconsent', urls, { mobile: false });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
generateCMPTests('botble-cookie-consent', [
|
|
4
|
+
'https://uokik.gov.pl/',
|
|
5
|
+
'https://mitsuheavy.vn/',
|
|
6
|
+
'https://fooundit.com/',
|
|
7
|
+
'https://saedcars.com/',
|
|
8
|
+
'https://rubicon.nl/',
|
|
9
|
+
'https://www.deutschetageszeitung.de/',
|
|
10
|
+
'https://internet.ee/',
|
|
11
|
+
]);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
generateCMPTests('cookiesplus', ['https://farmaciasenante.com/', 'https://www.ludum.fr/']);
|
|
4
|
+
|
|
5
|
+
// the reject button submits a form, reloading the page before the self-test runs
|
|
6
|
+
generateCMPTests('cookiesplus', ['https://passion-radio.fr/'], { testSelfTest: false });
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
import generateCMPTests from '../playwright/runner';
|
|
2
2
|
|
|
3
|
-
generateCMPTests('ihavecookies', [
|
|
3
|
+
generateCMPTests('ihavecookies', [
|
|
4
|
+
'https://www.boligcenter.dk/',
|
|
5
|
+
'https://bleiche.de/',
|
|
6
|
+
'https://www.cop.es/',
|
|
7
|
+
'https://utools.gr/',
|
|
8
|
+
'https://www.asturias.es/',
|
|
9
|
+
]);
|
|
@@ -13,6 +13,11 @@ generateCMPTests(
|
|
|
13
13
|
'https://www.autopflege-shop.de/',
|
|
14
14
|
// has a "Decline" button in the bar, so the settings dialog is not needed
|
|
15
15
|
'https://www.lamps-on-line.com/',
|
|
16
|
+
// Hyvä theme with "mst-gdpr-" class names and a "continue without accepting" button above the text
|
|
17
|
+
'https://www.promessedefleurs.es/',
|
|
16
18
|
],
|
|
17
19
|
{},
|
|
18
20
|
);
|
|
21
|
+
|
|
22
|
+
// redirects visitors from other countries to a localized store, which reruns autoconsent
|
|
23
|
+
generateCMPTests('mirasvit-gdpr', ['https://www.meillandrichardier.com/'], { onlyRegions: ['FR'] });
|
package/tests/trustarc.spec.ts
CHANGED
|
@@ -11,3 +11,10 @@ generateCMPTests('TrustArc-top', ['https://www.garmin.com/de-DE/'], {
|
|
|
11
11
|
testSelfTest: false,
|
|
12
12
|
skipRegions: ['US'],
|
|
13
13
|
});
|
|
14
|
+
|
|
15
|
+
// in-page preference center (no "Decline" shortcut on the banner)
|
|
16
|
+
generateCMPTests('TrustArc-top', ['https://www.ea.com/games/it-takes-two/it-takes-two', 'https://www.ea.com/'], {
|
|
17
|
+
testOptOut: true,
|
|
18
|
+
testOptIn: false,
|
|
19
|
+
onlyRegions: ['CA', 'AU', 'JP'],
|
|
20
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import generateCMPTests from '../playwright/runner';
|
|
2
|
+
|
|
3
|
+
generateCMPTests('typo3-cookieconsent', [
|
|
4
|
+
'https://www.swiss-ski.ch/',
|
|
5
|
+
'https://www.gcz.ch/',
|
|
6
|
+
'https://www.swiss-athletics.ch/',
|
|
7
|
+
'https://www.curling.ch/',
|
|
8
|
+
'https://www.zsclions.ch/',
|
|
9
|
+
'https://www.lauberhorn.ch/',
|
|
10
|
+
]);
|