Bläddra i källkod

chore: colocate ui tests

UI tests can now be colocated where they make more sense.
The filename must start with ui_test_ and end with .js to be
picked up by cypress.
version-14
Faris Ansari 3 år sedan
förälder
incheckning
f7e8135a0c
2 ändrade filer med 5 tillägg och 3 borttagningar
  1. +3
    -1
      cypress.json
  2. +2
    -2
      cypress/support/commands.js

+ 3
- 1
cypress.json Visa fil

@@ -9,5 +9,7 @@
"retries": {
"runMode": 2,
"openMode": 2
}
},
"integrationFolder": ".",
"testFiles": ["cypress/integration/*.js", "**/ui_test_*.js"]
}

+ 2
- 2
cypress/support/commands.js Visa fil

@@ -30,7 +30,7 @@ Cypress.Commands.add('login', (email, password) => {
email = 'Administrator';
}
if (!password) {
password = Cypress.config('adminPassword');
password = Cypress.env('adminPassword');
}
cy.request({
url: '/api/method/login',
@@ -161,7 +161,7 @@ Cypress.Commands.add('remove_doc', (doctype, name) => {

Cypress.Commands.add('create_records', doc => {
return cy
.call('frappe.tests.ui_test_helpers.create_if_not_exists', {doc})
.call('frappe.tests.ui_test_helpers.create_if_not_exists', {doc: JSON.stringify(doc)})
.then(r => r.message);
});



Laddar…
Avbryt
Spara