mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat: Make use of db:reset in all test suites (no-changelog) (#4739)
* feat: Make use of db:reset in all test suites * refactor: Rename task to no longer use db: prefix * feat: wrap cypress tasks into commands * refactor: rename resetDatabase to resetAll * fix: update test:e2e:all to use --headless
This commit is contained in:
@@ -52,7 +52,7 @@ Cypress.Commands.add('findChildByTestId', { prevSubject: true }, (subject: Cypre
|
||||
|
||||
Cypress.Commands.add(
|
||||
'signin',
|
||||
(email, password) => {
|
||||
({ email, password }) => {
|
||||
const signinPage = new SigninPage();
|
||||
const workflowsPage = new WorkflowsPage();
|
||||
|
||||
@@ -75,8 +75,7 @@ Cypress.Commands.add(
|
||||
});
|
||||
});
|
||||
|
||||
// todo rename to setup
|
||||
Cypress.Commands.add('signup', (email, firstName, lastName, password) => {
|
||||
Cypress.Commands.add('setup', ({ email, firstName, lastName, password }) => {
|
||||
const signupPage = new SignupPage();
|
||||
|
||||
cy.visit(signupPage.url);
|
||||
@@ -120,3 +119,12 @@ Cypress.Commands.add('skipSetup', () => {
|
||||
});
|
||||
});
|
||||
})
|
||||
|
||||
Cypress.Commands.add('resetAll', () => {
|
||||
cy.task('reset');
|
||||
Cypress.session.clearAllSavedSessions();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('setupOwner', (payload) => {
|
||||
cy.task('setup-owner', payload);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user