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.
npm install --save-dev @viasat/codeceptjs-snowplow-helper
On the helpers
section of your CodeceptJS file, indicate:
Snowplow: {
require: "codeceptjs-snowplow-helper",
endpoint: "http://localhost:9090",
},
require
: imports the pluginendpoint
: Snowplow micro's base URL
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()
})
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!