Add autoconsent rule for ring.com#1311
Draft
noisysocks wants to merge 1 commit intoranderson/context-eng-benchmark-v2-experimentalfrom
Draft
Add autoconsent rule for ring.com#1311noisysocks wants to merge 1 commit intoranderson/context-eng-benchmark-v2-experimentalfrom
noisysocks wants to merge 1 commit intoranderson/context-eng-benchmark-v2-experimentalfrom
Conversation
Co-authored-by: Robert Anderson <robert@noisysocks.com>
Collaborator
|
CI run finished. Artifacts ZIP for the review tool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a site-specific autoconsent rule for
ring.com(and country sub-sites such asen-uk.ring.com).CMP
Ring uses a custom in-house consent manager loaded from
d39xvdj9d5ntm1.cloudfront.net/common/.../consent-manager*.js. The banner DOM isidentifiable by the
.consent-bannercontainer, with buttons:button.consent--accept– accept allbutton.consent--reject– reject all (only rendered in EU/GDPR variant)button.consent--manage– open settings modalIn the US (and other non-GDPR regions) the banner only shows "Got it" + "Manage Settings",
so opt-out has to go through the modal: open settings, toggle off the per-third-party
.check-iconrows in non-essential buckets, then click.consent-save.The CMP writes a
privacy-banner-clicked=truecookie on any decision (accept, reject, orsave), used as the self-test signal.
Rule flow
prehideSelectors/detectCmp/detectPopupuse.consent-banner.optInclicksbutton.consent--accept.optOut:button.consent--rejectis present (GDPR), click it..third-party.active .check-iconinside non-essential
.consent-bucketrows (optional, in case the modal arrivespre-toggled-off), then click
.consent-save.runContext.urlPatternscopes the rule to*.ring.com.Verification
npm run rule-syntax-check– passednpm run build-rules– passednpm run test:lib– 2946 passednpm run lint-fix– cleannpx playwright test --project=chrome tests/ring-com.spec.ts– all 4 tests passed(US + UK, optIn + optOut, with
selfTestResult: true).