n8n/cypress/e2e/0-smoke.cy.ts
Alex Grozav b5b44d1b59
feat: Add credentials E2E test suite and page object (#4596)
* fix: Fix inferred type of X cannot be named error after pnpm update

* feat: Change page objects to expose actions and getters. Add credential creation suite
2022-11-22 11:37:26 +02:00

24 lines
612 B
TypeScript

import {DEFAULT_USER_EMAIL, DEFAULT_USER_PASSWORD} from "../constants";
import {randFirstName, randLastName} from "@ngneat/falso";
const username = DEFAULT_USER_EMAIL;
const password = DEFAULT_USER_PASSWORD;
const firstName = randFirstName();
const lastName = randLastName();
describe('Authentication', () => {
it('should sign user up', () => {
cy.signup(username, firstName, lastName, password);
});
it('should sign user in', () => {
cy.on('uncaught:exception', (err, runnable) => {
expect(err.message).to.include('Not logged in');
return false;
})
cy.signin(username, password);
});
});