chore: Fix cypress configuration to support cy13
This commit is contained in:
parent
a496f6b5e1
commit
66f8c0b37f
3 changed files with 17 additions and 12 deletions
|
|
@ -20,6 +20,7 @@ module.exports = defineConfig({
|
|||
setupNodeEvents(on, config) {
|
||||
return require("./cypress/plugins/index.js")(on, config);
|
||||
},
|
||||
testIsolation: false,
|
||||
baseUrl: "http://test_site_ui:8000",
|
||||
specPattern: ["./cypress/integration/*.js", "**/ui_test_*.js"],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -32,16 +32,24 @@ Cypress.Commands.add("login", (email, password) => {
|
|||
email = Cypress.config("testUser") || "Administrator";
|
||||
}
|
||||
if (!password) {
|
||||
password = Cypress.env("adminPassword");
|
||||
password = Cypress.env("adminPassword") || "admin";
|
||||
}
|
||||
return cy.request({
|
||||
url: "/api/method/login",
|
||||
method: "POST",
|
||||
body: {
|
||||
usr: email,
|
||||
pwd: password,
|
||||
cy.session(
|
||||
[email, password] || "",
|
||||
() => {
|
||||
return cy.request({
|
||||
url: "/api/method/login",
|
||||
method: "POST",
|
||||
body: {
|
||||
usr: email,
|
||||
pwd: password,
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
{
|
||||
cacheAcrossSpecs: true,
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
Cypress.Commands.add("call", (method, args) => {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,3 @@ Cypress.on("uncaught:exception", (err, runnable) => {
|
|||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require('./commands')
|
||||
|
||||
Cypress.Cookies.defaults({
|
||||
preserve: "sid",
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue