From 3f7b67679fa00eaa6c72136c4b050a0a43012a9a Mon Sep 17 00:00:00 2001 From: Sam Macbeth Date: Fri, 22 Nov 2024 19:55:13 +0100 Subject: [PATCH] Add Cassie rule (#543) --- rules/autoconsent/cassie.json | 30 ++++++++++++++++++++++++++++++ tests/cassie.spec.ts | 3 +++ 2 files changed, 33 insertions(+) create mode 100644 rules/autoconsent/cassie.json create mode 100644 tests/cassie.spec.ts diff --git a/rules/autoconsent/cassie.json b/rules/autoconsent/cassie.json new file mode 100644 index 00000000..18600d56 --- /dev/null +++ b/rules/autoconsent/cassie.json @@ -0,0 +1,30 @@ +{ + "name": "cassie", + "vendorUrl": "https://trustcassie.com", + "cosmetic": false, + "runContext": { + "main": true, + "frame": false + }, + "prehideSelectors": [".cassie-cookie-module"], + "detectCmp": [ + { + "exists": ".cassie-pre-banner" + } + ], + "detectPopup": [ + { + "visible": "#cassie_pre_banner_text" + } + ], + "optIn": [ + { + "waitForThenClick": ".cassie-accept-all" + } + ], + "optOut": [ + { + "waitForThenClick": ".cassie-reject-all" + } + ] +} diff --git a/tests/cassie.spec.ts b/tests/cassie.spec.ts new file mode 100644 index 00000000..911e2d3a --- /dev/null +++ b/tests/cassie.spec.ts @@ -0,0 +1,3 @@ +import generateCMPTests from '../playwright/runner'; + +generateCMPTests('cassie', ['https://zepbound.lilly.com/coverage-savings']);