mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-13 16:14:07 -08:00
622118f983
* 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
29 lines
716 B
TypeScript
29 lines
716 B
TypeScript
import { DEFAULT_USER_EMAIL, DEFAULT_USER_PASSWORD } from '../constants';
|
|
import { randFirstName, randLastName } from '@ngneat/falso';
|
|
|
|
const email = DEFAULT_USER_EMAIL;
|
|
const password = DEFAULT_USER_PASSWORD;
|
|
const firstName = randFirstName();
|
|
const lastName = randLastName();
|
|
|
|
describe('Authentication', () => {
|
|
beforeEach(() => {
|
|
cy.resetAll();
|
|
});
|
|
|
|
it('should setup owner', () => {
|
|
cy.setup({ email, firstName, lastName, password });
|
|
});
|
|
|
|
it('should sign user in', () => {
|
|
cy.setupOwner({ email, password, firstName, lastName });
|
|
cy.on('uncaught:exception', (err, runnable) => {
|
|
expect(err.message).to.include('Not logged in');
|
|
|
|
return false;
|
|
});
|
|
|
|
cy.signin({ email, password });
|
|
});
|
|
});
|