Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rule for Shopify Customer Privacy CMP #616

Merged
merged 3 commits into from
Jan 31, 2025
Merged

Add rule for Shopify Customer Privacy CMP #616

merged 3 commits into from
Jan 31, 2025

Conversation

noisysocks
Copy link
Contributor

@noisysocks noisysocks added minor Increment the minor version when merged CMP labels Jan 30, 2025
@noisysocks noisysocks requested a review from muodov January 30, 2025 04:58
rules/autoconsent/shopify.json Outdated Show resolved Hide resolved
Comment on lines 4 to 6
'https://store.leviton.com/collections/smart-load-center',
'https://snaprevise.co.uk/',
'https://hannun.com/',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests seem to fail, not sure what it is... npm run test -- --grep shopify

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I assumed that these tests were ran on GitHub Actions and so saw the ✅ in the PR and thought nothing further.

The first two failures were due to EVAL_SHOPIFY_TEST. It doesn’t seem like window.Shopify works in Playwright. I switched to evaluating based on document.cookie which is the approach we take for other rules.

The test for https://hannun.com/ I couldn’t get to work no matter what I tried. For some reason autoconsentSendMessage never fires on that page in Playwright. The cookie popup is handled successfully when I test in the browser. I spent an hour debugging but, having gotten nowhere, gave up, and replaced it with the next highest ranked site from PublicWWW.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @noisysocks! Yeah, these tests are flaky due to sites changing, so we don't run them in CI. We may rely on coverage data for these tests, but it's out of scope.

@noisysocks noisysocks requested a review from muodov January 31, 2025 00:53
@muodov muodov merged commit e078a75 into main Jan 31, 2025
9 checks passed
@muodov muodov deleted the shopify-cmp branch January 31, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMP minor Increment the minor version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants