-
Notifications
You must be signed in to change notification settings - Fork 4
/
cypress.config.dist.js
39 lines (35 loc) · 1.1 KB
/
cypress.config.dist.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
/*
* Copy this file as 'cypress.config.js' and adjust the following three values if necessary.
*/
const joomlaBaseURL = "http://localhost";
const joomlaAdminUserName = "ci-admin";
const joomlaAdminUserPassword = "joomla-17082005";
const { defineConfig } = require("cypress");
const { readTestSteps } = require("./cypress/support/readTestSteps");
module.exports = defineConfig({
env: {
username: joomlaAdminUserName,
password: joomlaAdminUserPassword,
},
e2e: {
baseUrl: joomlaBaseURL,
//
supportFile: "cypress/support/index.js",
specPattern: ["cypress/integration/tests.cy.js"],
setupNodeEvents(on, config) {
// Importing tasks from cypress/plugins/index.js
require("./cypress/plugins")(on, config);
// Reading test steps as entries from directory 'modules-tutorial'
return readTestSteps()
.then((files) => {
config.env = config.env || {};
config.env.steps = files;
return config;
})
.catch((err) => {
console.error("Error in setupNodeEvents:", err);
throw err;
});
},
},
});