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:
11
tests/cypress/integration/auth/login_spec.js
vendored
Normal file
11
tests/cypress/integration/auth/login_spec.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
describe('Login', function () {
|
||||
it('should not let user sign in with a non-existing account', function () {
|
||||
cy.visit('/');
|
||||
|
||||
cy.get('input[name=email]').type('impossibru@test.com');
|
||||
cy.get('input[name=password]').type('testtest');
|
||||
cy.get('button[type=submit]').click();
|
||||
|
||||
cy.get('.alert').should('exist');
|
||||
});
|
||||
});
|
||||
43
tests/cypress/integration/auth/signup_spec.js
vendored
Normal file
43
tests/cypress/integration/auth/signup_spec.js
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
var faker = require('faker');
|
||||
|
||||
describe('Signup', function () {
|
||||
// @TODO: get emails from Mailtrap with their API and click on the confirmation
|
||||
// link
|
||||
//
|
||||
// it('should sign up and logout', function () {
|
||||
// cy.visit('/register')
|
||||
|
||||
// cy.get('input[name=email]').type('test@test.com')
|
||||
// cy.get('input[name=first_name]').type('test')
|
||||
// cy.get('input[name=last_name]').type('test')
|
||||
// cy.get('input[name=password]').type('testtest')
|
||||
// cy.get('input[name=password_confirmation]').type('testtest')
|
||||
|
||||
// cy.get('input[name=policy]').click()
|
||||
// cy.get('button[type=submit]').click()
|
||||
|
||||
// cy.url().should('include', '/dashboard')
|
||||
|
||||
// cy.get('[data-cy=header-link-logout]').click()
|
||||
|
||||
// cy.contains('Login to your account')
|
||||
// })
|
||||
|
||||
//it('should block registration if policy is not accepted', function () {
|
||||
// cy.register(faker.name.firstName(), faker.name.lastName(), faker.internet.password(), faker.internet.email(), false);
|
||||
// cy.get('.alert').should('exist');
|
||||
//});
|
||||
|
||||
it('should block registration if email is already used', function () {
|
||||
const email = faker.internet.email();
|
||||
|
||||
// test email address
|
||||
cy.register(faker.name.firstName(), faker.name.lastName(), faker.internet.password(), email, true);
|
||||
cy.get('.alert').should('not.exist');
|
||||
|
||||
cy.get('[data-cy=header-link-logout]').click();
|
||||
|
||||
cy.register(faker.name.firstName(), faker.name.lastName(), faker.internet.password(), email, true);
|
||||
cy.get('.alert').should('exist');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user