0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-05 22:09:06 -05:00
penpot/frontend/cypress/integration/02-onboarding/onboarding-options.spec.js
2022-09-20 23:23:22 +02:00

71 lines
No EOL
2.4 KiB
JavaScript

/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright (c) KALEIDOS INC
*/
"use strict";
describe("onboarding options solo or team", () => {
beforeEach(() => {
cy.demoLogin();
cy.get(".modal-right button").click();
cy.get(".onboarding button").click();
cy.get(".onboarding .skip").click();
});
it("choose solo option", () => {
cy.getBySel("onboarding-welcome-title").should("exist");
cy.getBySel("fly-solo-op").click();
cy.getBySel("empty-placeholder").should("exist");
});
it("choose team option and cancel", () => {
cy.getBySel("onboarding-welcome-title").should("exist");
cy.getBySel("team-up-button").click();
cy.getBySel("onboarding-choice-team-up").should("exist");
cy.get("button").click();
cy.getBySel("onboarding-welcome-title").should("exist");
});
it("choose team option, set team name and cancel", () => {
cy.getBySel("onboarding-welcome-title").should("exist");
cy.getBySel("team-up-button").click();
cy.getBySel("onboarding-choice-team-up").should("exist");
cy.get("#name").type("test team");
cy.get("input[type=submit]").first().click();
cy.get("#email").should("exist");
cy.get("button").click();
cy.getBySel("onboarding-welcome-title").should("exist");
});
it("choose team option, set team name and skip", () => {
cy.getBySel("onboarding-welcome-title").should("exist");
cy.getBySel("team-up-button").click();
cy.getBySel("onboarding-choice-team-up").should("exist");
cy.get("#name").type("test team");
cy.get("input[type=submit]").first().click();
cy.get("#email").should("exist");
cy.get(".skip-action").click();
cy.getBySel("empty-placeholder").should("exist");
});
it("choose team option, set team name and invite", () => {
cy.getBySel("onboarding-welcome-title").should("exist");
cy.getBySel("team-up-button").click();
cy.getBySel("onboarding-choice-team-up").should("exist");
cy.get("#name").type("test team");
cy.get("input[type=submit]").first().click();
cy.get("#email").should("exist");
cy.get("#email").type("test@test.com");
cy.get("input[type=submit]").first().click();
cy.getBySel("empty-placeholder").should("exist");
});
});