remixed v0

This commit is contained in:
m5r
2022-05-14 12:22:06 +02:00
parent 9275d4499b
commit 98b89ae0f7
338 changed files with 22549 additions and 44628 deletions

View File

@ -0,0 +1,20 @@
describe("dashboard", () => {
it("should redirect to login page if user is unauthenticated", () => {
cy.visit("/test/dashboard");
cy.url().should("include", "/sign-in");
});
it("should redirect to the user's organization if user is trying to access a different one", () => {
cy.visit("/register");
cy.findByLabelText("Organization name").type("Inspect Page Source Gang");
cy.findByLabelText("Full name").type("Hasbulla Nurmagomedov");
cy.findByLabelText("Email").type("hasbi@test.com");
cy.findByLabelText("Password").type(`secret password{enter}`);
cy.url().should("include", "/inspect-page-source-gang/dashboard");
cy.findByText("Team").click();
cy.url().should("include", "/inspect-page-source-gang/team");
cy.visit("/other-org/dashboard");
cy.url().should("include", "/inspect-page-source-gang/dashboard");
});
});

View File

@ -0,0 +1,27 @@
describe("onboarding", () => {
it("should register, invite a colleague, remove them and delete my account", () => {
const email = "hasbi@test.com";
const password = "secret password";
cy.visit("/");
cy.findByText("Register").click();
cy.findByLabelText("Organization name").type("Inspect Page Source Gang");
cy.findByLabelText("Full name").type("Hasbulla Nurmagomedov");
cy.findByLabelText("Email").type(email);
cy.findByLabelText("Password").type(`${password}{enter}`);
cy.findByText("Team").click();
cy.findByPlaceholderText("colleague@company.com").type("khabib@test.com{enter}");
cy.findByText("").click();
cy.findByText("Sign out").click();
cy.findByText("Sign in").click();
cy.findByLabelText("Email").type(email);
cy.findByLabelText("PasswordForgot your password?").type(`${password}{enter}`);
cy.findByText("Settings").click();
cy.findByText("Delete my account").click();
});
});