Skip to content

Commit

Permalink
Make sure that the test page uses an eval rule (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
muodov authored Nov 22, 2024
1 parent daee0c9 commit 478b7d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/eval-snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export const snippets = {
EVAL_TEALIUM_3: () => utag.gdpr.getConsentState() !== 1,
EVAL_TEALIUM_DONOTSELL_CHECK: () => utag.gdpr.dns?.getDnsState() !== 1,
EVAL_TESLA_TEST: () => document.cookie.includes('tsla-cookie-consent=rejected'),
EVAL_TESTCMP_STEP: () => !!document.querySelector('#reject-all'),
EVAL_TESTCMP_0: () => window.results.results[0] === 'button_clicked',
EVAL_TESTCMP_COSMETIC_0: () => window.results.results[0] === 'banner_hidden',
EVAL_THEFREEDICTIONARY_0: () => cmpUi.showPurposes() || cmpUi.rejectAll() || true,
Expand Down
2 changes: 1 addition & 1 deletion rules/autoconsent/testcmp.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"detectCmp": [{ "exists": "#privacy-test-page-cmp-test" }],
"detectPopup": [{ "visible": "#privacy-test-page-cmp-test" }],
"optIn": [{ "waitFor": "#accept-all" }, { "click": "#accept-all" }],
"optOut": [{ "waitFor": "#reject-all" }, { "click": "#reject-all" }],
"optOut": [{ "waitFor": "#reject-all" }, { "eval": "EVAL_TESTCMP_STEP" }, { "click": "#reject-all" }],
"test": [{ "eval": "EVAL_TESTCMP_0" }]
}

0 comments on commit 478b7d8

Please sign in to comment.