@viasat/codeceptjs-snowplow-helper
v1.1.2
Published
A CodeceptJS helper to integrate Snowplow micro analytics in the acceptance tests
Downloads
4
Readme
Codecept-snowplow-helper
This helper integrates CodeceptJS and Snowplow. It includes steps to check correctness of your Snowplow events, tested against a Snowplow-micro instance running in the background.
Installation
npm install --save-dev @viasat/codeceptjs-snowplow-helper
How to use it
On the helpers
section of your CodeceptJS file, indicate:
Snowplow: {
require: "codeceptjs-snowplow-helper",
endpoint: "http://localhost:9090",
},
Options
require
: imports the pluginendpoint
: Snowplow micro's base URL
Usage example
On your test suite, use assertions like:
Feature("Testing Snowplow events")
Before(({I}) => {
I.resetAllEvents()
})
Scenario("Records basic clicks", () => {
I.click("on my fancy button")
I.dontSeeBadEvents()
})
Contributing
This project implements a few github workflows:
- On PR updates: it runs unit tests and block merges if they don't pass.
- On PR merges to main:
- it calculates the new version from conventional commits
- it updates the repo tags
- it creates a new release
- it publishes the new version for public use.
We are glad to incorporate your ideas too, so if you want to contribute: open a PR. When it gets approved and tested, just press the green button and see your code shipped!