mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 18:07:17 +01:00
30b6692920
* WIP: get cypress something doing * Get a test running * Get css loading, stub posthog * Move helpers to separate file * Givens > given2 It plays nicer with beforeEach * Test for session filters * Test date navigation * Test filtering * Try keep old tests running * Try get tests running under CI * Prettify fixtures * Cleanup, use cypress 6 * Add yarn build * Fix e2e cypress tests * given2 => givens * Rename `frontend-test-runner` to `e2e-test-runner` * Fix cypress test * Add webpack-preprocessor as a devDependency * Improve freezing time * Make css inclusions automatic for component tests
10 lines
250 B
JavaScript
10 lines
250 B
JavaScript
Cypress.Commands.add('interceptLazy', (pattern, handler) => {
|
|
return cy.intercept(pattern, (req) => {
|
|
req.reply(handler())
|
|
})
|
|
})
|
|
|
|
Cypress.Commands.add('map', { prevSubject: true }, (subject, method) => {
|
|
return method(subject)
|
|
})
|