skillbox/client/cypress.frontend.ts

48 lines
1.0 KiB
TypeScript

import { defineConfig } from 'cypress';
import { readFileSync } from 'fs';
import { resolve } from 'path';
import currents from 'cypress-cloud/plugin';
export default defineConfig({
chromeWebSecurity: false,
e2e: {
baseUrl: 'http://127.0.0.1:8080',
specPattern: 'cypress/e2e/frontend/**/*.{cy,spec}.{js,ts}',
supportFile: 'cypress/support/e2e.ts',
setupNodeEvents(on, config) {
currents(on, config);
on('task', {
getSchema() {
return readFileSync(resolve(__dirname, '../server/schema.graphql'), 'utf8');
},
});
},
},
videoUploadOnPasses: false,
reporter: 'junit',
reporterOptions: {
mochaFile: 'cypress/test-reports/frontend/cypress-results-[hash].xml',
toConsole: true,
},
projectId: 'msk-fe',
retries: {
runMode: 3,
},
component: {
devServer: {
framework: 'vue',
bundler: 'webpack',
webpackConfig: async () => {
const webpackConfig = await require('./build/webpack.dev.conf');
return webpackConfig;
},
},
},
});