Skip to content

Commit

Permalink
Add consent-manager rule
Browse files Browse the repository at this point in the history
  • Loading branch information
sammacbeth committed Nov 22, 2024
1 parent 478b7d8 commit fb53e82
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
35 changes: 35 additions & 0 deletions rules/autoconsent/consent-manager.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "consent-manager",
"cosmetic": false,
"runContext": {
"main": true,
"frame": false
},
"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 fb53e82

Please sign in to comment.