From 56efd5515087554cbec6e7f006a2a4d629e55d9f Mon Sep 17 00:00:00 2001 From: Maxim Tsoy Date: Fri, 31 May 2024 10:52:58 +0200 Subject: [PATCH] Add a rule for ebay (#449) * Add a rule for ebay * Add test URLs for ebay --- rules/autoconsent/ebay.json | 31 +++++++++++++++++++++++++++++++ tests/ebay.spec.ts | 7 +++++++ 2 files changed, 38 insertions(+) create mode 100644 rules/autoconsent/ebay.json create mode 100644 tests/ebay.spec.ts diff --git a/rules/autoconsent/ebay.json b/rules/autoconsent/ebay.json new file mode 100644 index 00000000..ccf19e31 --- /dev/null +++ b/rules/autoconsent/ebay.json @@ -0,0 +1,31 @@ +{ + "name": "ebay", + "vendorUrl": "https://ebay.com", + "cosmetic": false, + "runContext": { + "main": true, + "frame": false, + "urlPattern": "^https://(www\\.)?ebay\\.([.a-z]+)/" + }, + "prehideSelectors": ["#gdpr-banner"], + "detectCmp": [ + { + "exists": "#gdpr-banner" + } + ], + "detectPopup": [ + { + "visible": "#gdpr-banner" + } + ], + "optIn": [ + { + "waitForThenClick": "#gdpr-banner-accept" + } + ], + "optOut": [ + { + "waitForThenClick": "#gdpr-banner-decline" + } + ] +} \ No newline at end of file diff --git a/tests/ebay.spec.ts b/tests/ebay.spec.ts new file mode 100644 index 00000000..b07bd978 --- /dev/null +++ b/tests/ebay.spec.ts @@ -0,0 +1,7 @@ +import generateCMPTests from "../playwright/runner"; + +generateCMPTests('ebay', [ + 'https://www.ebay.co.uk/', + 'https://www.ebay.com/', + 'https://www.ebay.nl/', +]);