1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/frontend/cypress.config.ts
Nuno Góis edefa6fc7e
test: add interactive demo guide e2e test (#3656)
This PR revamps e2e tests, while adding a new one for the interactive
demo guide:
 - Bumps Cypress from `9.7.0` to `12.11.0`;
 - Bumps Cypress GH action from `v2` to `v5`;
 - Makes any adjustments needed;
 - Fixes a lot of issues identified with existing tests;
- Adds new `demo.spec.ts` e2e test that covers the entire demo guide
flow;

**Note:** Currently does not include `demo.spec.ts` in the GH action, as
it
[fails](https://github.com/Unleash/unleash/actions/runs/4896839575/jobs/8744137231?pr=3656)
on step 2.13 (last step of "user-specific" topic). It runs perfectly
fine locally, though.

Might be placebo, but in general tests seem less flaky now and they may
even be faster (especially when not adding the `demo` one, which would
always take a long time).
2023-05-08 09:16:18 +01:00

29 lines
767 B
TypeScript

import path from 'path';
import { defineConfig } from 'cypress';
import vitePreprocessor from 'cypress-vite';
export default defineConfig({
projectId: 'tc2qff',
defaultCommandTimeout: 12000,
screenshotOnRunFailure: false,
video: false,
e2e: {
specPattern: '**/*.spec.ts',
setupNodeEvents(on, config) {
on(
'file:preprocessor',
vitePreprocessor({
configFile: path.resolve(__dirname, './vite.config.ts'),
mode: 'development',
})
);
on('task', {
log(message) {
console.log(message);
return null;
},
});
},
},
});