diff --git a/rules/autoconsent/nike.json b/rules/autoconsent/nike.json new file mode 100644 index 00000000..8dacb11e --- /dev/null +++ b/rules/autoconsent/nike.json @@ -0,0 +1,32 @@ +{ + "name": "nike", + "vendorUrl": "https://nike.com", + "runContext": { + "urlPattern": "^https://(www\\.)?nike\\.com/" + }, + "prehideSelectors": [], + "detectCmp": [ + { + "exists": "[data-testid=cookie-dialog-root]" + } + ], + "detectPopup": [ + { + "visible": "[data-testid=cookie-dialog-root]" + } + ], + "optIn": [ + { + "waitForThenClick": "[data-testid=dialog-accept-button]" + } + ], + "optOut": [ + { + "waitForThenClick": "input[type=radio][id$=-declineLabel]", + "all": true + }, + { + "waitForThenClick": "[data-testid=confirm-choice-button]" + } + ] +} \ No newline at end of file diff --git a/tests/nike.spec.ts b/tests/nike.spec.ts new file mode 100644 index 00000000..6ba5b69b --- /dev/null +++ b/tests/nike.spec.ts @@ -0,0 +1,5 @@ +import generateCMPTests from "../playwright/runner"; + +generateCMPTests('nike', [ + 'https://www.nike.com/', +]);