radio-station/cypress/e2e/smoke.cy.ts
Luke Bunselmeyer 78c07c40cc - Fixed E2E smoke tests
- Added unit test for `slugify`
- Updated readme
2023-05-08 00:55:06 -04:00

27 lines
721 B
TypeScript

import { faker } from "@faker-js/faker";
describe("smoke tests", () => {
afterEach(() => {
cy.cleanupUser();
});
it("should allow you to register and login", () => {
const loginForm = {
email: `${faker.internet.userName()}@example.com`,
password: faker.internet.password()
};
cy.then(() => ({ email: loginForm.email })).as("user");
cy.visitAndCheck("/");
cy.findByRole("link", { name: /join/i }).click();
cy.findByRole("textbox", { name: /email/i }).type(loginForm.email);
cy.findByLabelText(/password/i).type(loginForm.password);
cy.findByRole("button", { name: /create account/i }).click();
});
});