-
Notifications
You must be signed in to change notification settings - Fork 22
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 Pandectes CMP #632
Add Pandectes CMP #632
Conversation
d6b28cf
to
f5ece0d
Compare
Hm |
rules/autoconsent/pandectes.json
Outdated
], | ||
"detectPopup": [ | ||
{ | ||
"visible": ".pd-cookie-banner-window" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest of the rule works fine, but this always returns true for me, even when the popup is actually not visible, e.g. after a reload.
Note that the visibility check is a hack, and it doesn't always work. See also https://app.asana.com/0/1201844467387842/1202597302683964
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I’ll use the other selector. 6e67680
rules/autoconsent/pandectes.json
Outdated
{ "click": "#pandectes-banner .cc-settings" }, | ||
{ "waitForThenClick": ".pd-cp-ui-rejectAll" }, | ||
{ "click": ".pd-cp-ui-save" }, | ||
{ "wait": 200 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There’s a slight delay in setting the cookie in Webkit which is why unit tests were failing. This line fixes it, but maybe there’s a better way? One option could be to make selfTest
retry a few times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, given I can’t reproduce this issue when actually using Safari/Webkit, it only seems to prop up in the tests, maybe a better fix is to have the test runner wait before running selfTest
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided on moving the wait
to test
as it looks like we do that in a few other rules: youtube, testcmp-cosmetic, paypal, openai.
Local tests pass now! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works great, thanks @noisysocks !
https://app.asana.com/0/1203268166580279/1207386274532820
https://app.asana.com/0/1203268166580279/1206854778035229
Pandectes seems to be built off of Complianz so there’s an argument that we could update e.g.
complianz-optin
to work with Pandectes cookie popups. I decided to write a new rule, though, because Pandectes has a completely custom Settings modal.