generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcypress.config.js
86 lines (80 loc) · 2.37 KB
/
cypress.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
* Copyright: Copyright 2023 SAP SE or an SAP affiliate company and cdc-tools-chrome-extension contributors
* License: Apache-2.0
*/
const { defineConfig } = require('cypress')
require('dotenv').config()
const path = require('path')
module.exports = defineConfig({
projectId: '4iymaz',
env: {
userName: `${process.env.email}`,
passWord: `${process.env.passWord}`,
codeCoverageTasksRegistered: true,
},
chromeWebSecurity: false,
defaultCommandTimeout: 30000,
requestTimeout: 30000,
responseTimeout: 30000,
watchForFileChanges: false,
e2e: {
baseUrl: 'http://localhost:3000',
setupNodeEvents(on, config) {
on('before:browser:launch', (browser, launchOptions) => {
const extensionFolder = path.resolve(__dirname, './build')
launchOptions.args.push(`--load-extension=${extensionFolder}`)
return launchOptions
})
require('@cypress/code-coverage/task')(on, config)
on('file:preprocessor', require('@cypress/code-coverage/use-babelrc'))
return {
config,
excludeSpecPattern: ['cypress/e2e/e2eFullTesting.cy.js'],
// excludeSpecPattern: [
// 'cypress/e2e/copyConfigurationExtendedTests.cy.js',
// 'cypress/e2e/emailTemplatesTests.cy.js',
// 'cypress/e2e/smsTemplatesTests.cy.js',
// 'cypress/e2e/siteDeployerTests.cy.js',
// 'cypress/e2e/siteDeployerCopyConfigurationTests.cy.js',
// 'cypress/e2e/e2eFullTesting.cy.js'
// ],
}
},
},
retries: {
// Default is 0
// Configure retry attempts for `cypress run`.
runMode: 1,
// Configure retry attempts for `cypress open`
openMode: 0,
},
component: {
setupNodeEvents(on, config) {
require('@bahmutov/cypress-code-coverage/plugin')(on, config)
return config
},
devServer: {
framework: 'create-react-app',
bundler: 'webpack',
webpackConfig: {
mode: 'development',
devtool: false,
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: ['istanbul'],
},
},
},
],
},
},
},
},
})