refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
This commit is contained in:
24
tests/cypress/support/helpers/app.js
vendored
Normal file
24
tests/cypress/support/helpers/app.js
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
Cypress.Commands.add('login', () => {
|
||||
cy.exec('php artisan setup:frontendtestuser').then((result) => {
|
||||
cy.visit('/_dusk/login/'+result.stdout+'/');
|
||||
});
|
||||
});
|
||||
|
||||
Cypress.Commands.add('setPremium', (accountId) => {
|
||||
cy.exec('php artisan account:setpremium ' + accountId);
|
||||
});
|
||||
|
||||
Cypress.Commands.add('register', (firstName, lastName, password, email, policy) => {
|
||||
cy.visit('/register');
|
||||
|
||||
cy.get('.alert').should('not.exist');
|
||||
cy.get('input[name=email]').type(email);
|
||||
cy.get('input[name=first_name]').type(firstName);
|
||||
cy.get('input[name=last_name]').type(lastName);
|
||||
cy.get('input[name=password]').type(password);
|
||||
cy.get('input[name=password_confirmation]').type(password);
|
||||
if (policy) {
|
||||
cy.get('input[name=policy]').click();
|
||||
}
|
||||
cy.get('button[type=submit]').click();
|
||||
});
|
||||
Reference in New Issue
Block a user