diff --git a/rules/autoconsent/consent-manager.json b/rules/autoconsent/consent-manager.json new file mode 100644 index 00000000..65ca041e --- /dev/null +++ b/rules/autoconsent/consent-manager.json @@ -0,0 +1,36 @@ +{ + "name": "consent-manager", + "cosmetic": false, + "runContext": { + "main": true, + "frame": false, + "urlPattern": "^https://ouraring\\.com" + }, + "prehideSelectors": [], + "detectCmp": [ + { + "exists": "[data-cy=\"consent-manager-banner\"]" + } + ], + "detectPopup": [ + { + "visible": "[data-cy=\"consent-manager-banner\"]" + } + ], + "optIn": [ + { + "waitForThenClick": "[data-cy=\"manage_cookies\"]" + }, + { + "waitForThenClick": "[data-cy=\"consent-manager-preferences-allow-all\"]" + } + ], + "optOut": [ + { + "waitForThenClick": "[data-cy=\"manage_cookies\"]" + }, + { + "waitForThenClick": "[data-cy=\"consent-manager-preferences-deny-all\"]" + } + ] +} diff --git a/tests/consent-manager.spec.ts b/tests/consent-manager.spec.ts new file mode 100644 index 00000000..e9b1a6bd --- /dev/null +++ b/tests/consent-manager.spec.ts @@ -0,0 +1,3 @@ +import generateCMPTests from '../playwright/runner'; + +generateCMPTests('consent-manager', ['https://ouraring.com/']);