0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-27 00:49:28 -05:00
penpot/frontend/cypress/integration/02-onboarding/slides.spec.js
luz paz e30bea0b6f 🔧 Fix typos in source code
Found via `codespell -q 3 -S *.po,./frontend/yarn.lock -L childs,clen,fpr,inflight,ody,ot,ro,te,trys,ue`
2022-10-04 10:40:34 +02:00

55 lines
1.6 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";
import {
checkOnboardingSlide,
goToSlideByNumber,
} from "../../support/utils.js";
describe("onboarding slides", () => {
beforeEach(() => {
cy.demoLogin();
});
it("go through all the onboarding slides", () => {
cy.getBySel("onboarding-welcome").should("exist");
cy.getBySel("onboarding-next-btn").should("exist");
cy.getBySel("onboarding-next-btn").click();
cy.getBySel("opsource-next-btn").should("exist");
cy.getBySel("skip-btn").should("not.exist");
cy.getBySel("opsource-next-btn").click();
var genArr = Array.from(Array(3).keys());
cy.wrap(genArr).each((index) => {
checkOnboardingSlide(index, true);
});
checkOnboardingSlide("3", false);
cy.getBySel("onboarding-welcome-title").should("exist");
});
it("go to specific onboarding slides", () => {
cy.getBySel("onboarding-next-btn").click();
cy.getBySel(`opsource-next-btn`).click();
var genArr = Array.from(Array(4).keys());
cy.wrap(genArr).each((index) => {
goToSlideByNumber(4 - index);
});
});
it("skip onboarding slides", () => {
cy.getBySel("onboarding-next-btn").click();
cy.getBySel("opsource-next-btn").click();
cy.getBySel("skip-btn").click();
cy.getBySel("fly-solo-op").click();
cy.getBySel("onboarding-welcome-title").should("exist");
});
});