-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Proposal to use CMP in e2e tests #6377
Comments
Seems like it would be straightforward to write some unit tests that use the iab stub to start with. This Iubenda cmp script is not open source, not locked to a version, and has a ton of extraneous functionality not required for testing. How about we just stub the response to getTCData? If i run all the code above in console (deleting 'export'), then the everything accepted scenario, and then this line i get something we could use for tests on getTCData: |
@ChrisHuie working on a PR to implement the stub, simultaneously, after discussing today, it also might be good to update the examples with a CMP implemented. This should help with manual testing, and we will publish a generic version with the relevant JS for publishers / CMPs to swap out the CMP being called. |
This is a 3 phase to do:
|
closing as stale |
Type of issue
Proposal
Description
We want to improve the consent management testing by introducing e2e tests that make use of actual CMP code, as the currently available tests only mock
__tcfapi
calls with predefined responses. The new tests could help avoid bugs such as #5792.We want to discuss the possibility of implementing these tests and the implementation details.
Sample code
The code below provides a way to initialize iubenda CMP in the test environment with a predefined scenario:
It can be used in tests e.g. like this:
Steps to reproduce
Test page
Expected results
Actual results
Platform details
Other information
The text was updated successfully, but these errors were encountered: