mirror of
https://github.com/IT4Change/boilerplate-e2e-cypress-cucumber.git
synced 2025-12-13 04:55:50 +00:00
configuration
This commit is contained in:
parent
879fab62dc
commit
681e2d2915
@ -1,27 +1,11 @@
|
||||
import { defineConfig } from "cypress";
|
||||
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor';
|
||||
import webpack from '@cypress/webpack-preprocessor';
|
||||
|
||||
// async function setupNodeEvents(
|
||||
// on: Cypress.PluginEvents,
|
||||
// config: Cypress.PluginConfigOptions
|
||||
// ): Promise<Cypress.PluginConfigOptions> {
|
||||
// await addCucumberPreprocessorPlugin(on, config);
|
||||
|
||||
// on(
|
||||
// "file:preprocessor",
|
||||
// preprocessor(config, {
|
||||
// typescript: require.resolve("typescript"),
|
||||
// })
|
||||
// );
|
||||
|
||||
// return config;
|
||||
// }
|
||||
import { defineConfig } from 'cypress'
|
||||
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'
|
||||
import webpack from '@cypress/webpack-preprocessor'
|
||||
|
||||
const setupNodeEvents = async (on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) => {
|
||||
await addCucumberPreprocessorPlugin(on, config, {
|
||||
omitAfterRunHandler: true,
|
||||
});
|
||||
})
|
||||
on(
|
||||
'file:preprocessor',
|
||||
webpack({
|
||||
@ -53,22 +37,19 @@ const setupNodeEvents = async (on: Cypress.PluginEvents, config: Cypress.PluginC
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
)
|
||||
|
||||
return config;
|
||||
};
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
e2e: {
|
||||
defaultCommandTimeout: 60000,
|
||||
pageLoadTimeout:180000,
|
||||
chromeWebSecurity: false,
|
||||
baseUrl: "http://localhost:3000",
|
||||
specPattern: "cypress/e2e/**/*.feature",
|
||||
supportFile: "cypress/support/e2e.ts",
|
||||
baseUrl: 'https://the-internet.herokuapp.com/',
|
||||
specPattern: 'cypress/e2e/features/*.feature',
|
||||
supportFile: false,
|
||||
retries: 0,
|
||||
video: false,
|
||||
setupNodeEvents,
|
||||
experimentalInteractiveRunEvents: true,
|
||||
}
|
||||
});
|
||||
})
|
||||
@ -1,15 +0,0 @@
|
||||
// ***********************************************************
|
||||
// This example support/e2e.ts is processed and
|
||||
// loaded automatically before your test files.
|
||||
//
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
import './commands/commands'
|
||||
@ -2,7 +2,12 @@
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"lib": ["es5", "dom"],
|
||||
"types": ["cypress", "node"]
|
||||
"types": ["cypress", "node"],
|
||||
"paths": {
|
||||
"#pages/*": [
|
||||
"../pages/*.ts"
|
||||
]
|
||||
},
|
||||
"include": ["**/*.ts"]
|
||||
},
|
||||
"include": ["./**/*.ts"]
|
||||
}
|
||||
@ -24,7 +24,7 @@
|
||||
"author": "mahula",
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
"cypress:open": "cypress open",
|
||||
"cypress:open": "cypress open --e2e --browser electron",
|
||||
"cypress:run": "cypress run"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user