Builds on the initial Cucumber integration tests added by @levinmr . Provides some test coverage for:
Configuring DAP through query parameters
The automatic tracking of file downloads
Generally, the behavior of the tests is to:
Start up a headless browser (using Puppeteer).
Load a page from our DAP-enabled test site in the browser.
Interact with the page in some way that should trigger a DAP event (using Puppeteer).
Inspect window.dataLayer to verify that the correct gtag call was made.
The DAP-enabled test site runs in Docker, in a process that must be started up separately from the test runner. The contents of the test site are based on an HTML file that Cardinal Path has been using for its own manual testing of the DAP code.
Builds on the initial Cucumber integration tests added by @levinmr . Provides some test coverage for:
Generally, the behavior of the tests is to:
window.dataLayer
to verify that the correctgtag
call was made.The DAP-enabled test site runs in Docker, in a process that must be started up separately from the test runner. The contents of the test site are based on an HTML file that Cardinal Path has been using for its own manual testing of the DAP code.