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.
This commit is contained in:
parent
b73ed8ffbc
commit
f7e8135a0c
2 changed files with 5 additions and 3 deletions
|
|
@ -9,5 +9,7 @@
|
|||
"retries": {
|
||||
"runMode": 2,
|
||||
"openMode": 2
|
||||
}
|
||||
},
|
||||
"integrationFolder": ".",
|
||||
"testFiles": ["cypress/integration/*.js", "**/ui_test_*.js"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue