Skip to content

Commit

Permalink
Add consent-manager rule (#542)
Browse files Browse the repository at this point in the history
* Add consent-manager rule

* Add urlpattern
  • Loading branch information
sammacbeth authored Jan 23, 2025
1 parent 5a6d0e4 commit 8d79f05
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
36 changes: 36 additions & 0 deletions rules/autoconsent/consent-manager.json
Original file line number Diff line number Diff line change
@@ -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\"]"
}
]
}
3 changes: 3 additions & 0 deletions tests/consent-manager.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import generateCMPTests from '../playwright/runner';

generateCMPTests('consent-manager', ['https://ouraring.com/']);

0 comments on commit 8d79f05

Please sign in to comment.