Skip to content

Commit

Permalink
Add a rule for wise.com
Browse files Browse the repository at this point in the history
  • Loading branch information
muodov committed Aug 9, 2024
1 parent d2bb7aa commit 9389cc3
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/eval-snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export const snippets = {
EVAL_THEFREEDICTIONARY_0: () => cmpUi.showPurposes() || cmpUi.rejectAll() || true,
EVAL_THEFREEDICTIONARY_1: () => cmpUi.allowAll() || true,
EVAL_THEVERGE_0: () => document.cookie.includes('_duet_gdpr_acknowledged=1'),
EVAL_TWCC_TEST: () => document.cookie.includes('twCookieConsent='),
EVAL_UBUNTU_COM_0: () => document.cookie.includes('_cookies_accepted=essential'),
EVAL_UK_COOKIE_CONSENT_0: () => !document.cookie.includes('catAccCookies'),
EVAL_USERCENTRICS_API_0: () => typeof UC_UI === 'object',
Expand Down
36 changes: 36 additions & 0 deletions rules/autoconsent/twcc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "twcc",
"vendorUrl": "https://unknown",
"cosmetic": false,
"runContext": {
"main": true,
"frame": false,
"urlPattern": ""
},
"prehideSelectors": ["#twcc__mechanism"],
"detectCmp": [
{
"exists": "#twcc__mechanism .twcc__notice"
}
],
"detectPopup": [
{
"visible": "#twcc__mechanism .twcc__notice"
}
],
"optIn": [
{
"waitForThenClick": "#twcc__accept-button"
}
],
"optOut": [
{
"waitForThenClick": "#twcc__decline-button"
}
],
"test": [
{
"eval": "EVAL_TWCC_TEST"
}
]
}
5 changes: 5 additions & 0 deletions tests/twcc.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import generateCMPTests from "../playwright/runner";

generateCMPTests('twcc', [
'https://wise.com/'
]);

0 comments on commit 9389cc3

Please sign in to comment.