mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
add initialcypress e2e configuration
This commit is contained in:
parent
6a041bc9a4
commit
c76990f343
@ -1,5 +1,24 @@
|
||||
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({
|
||||
component: {
|
||||
devServer: {
|
||||
@ -8,4 +27,12 @@ export default defineConfig({
|
||||
},
|
||||
specPattern: ['**/**/*.cy.{ts,tsx}'],
|
||||
},
|
||||
e2e: {
|
||||
chromeWebSecurity: false,
|
||||
retries: 0,
|
||||
specPattern: 'features/**/*.feature',
|
||||
supportFile: false,
|
||||
video: false,
|
||||
setupNodeEvents,
|
||||
},
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user