mirror of
https://github.com/IT4Change/boilerplate-e2e-cypress-cucumber.git
synced 2025-12-12 20:55:48 +00:00
33 lines
861 B
TypeScript
33 lines
861 B
TypeScript
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'
|
|
import { createEsbuildPlugin } from '@badeball/cypress-cucumber-preprocessor/esbuild'
|
|
import createBundler from '@bahmutov/cypress-esbuild-preprocessor'
|
|
import { defineConfig } from 'cypress'
|
|
|
|
async function setupNodeEvents(
|
|
on: Cypress.PluginEvents,
|
|
config: Cypress.PluginConfigOptions,
|
|
): Promise<Cypress.PluginConfigOptions> {
|
|
await addCucumberPreprocessorPlugin(on, config)
|
|
|
|
on(
|
|
'file:preprocessor',
|
|
createBundler({
|
|
plugins: [createEsbuildPlugin(config)],
|
|
}),
|
|
)
|
|
|
|
return config
|
|
}
|
|
|
|
export default defineConfig({
|
|
e2e: {
|
|
chromeWebSecurity: false,
|
|
baseUrl: 'https://the-internet.herokuapp.com/',
|
|
specPattern: 'cypress/e2e/features/*.feature',
|
|
supportFile: false,
|
|
retries: 0,
|
|
video: false,
|
|
setupNodeEvents,
|
|
},
|
|
})
|