saleor-dashboard/cypress/e2e/homePage/homePage.js
Karolina Rakoczy 4d1e41517d
In old release versions run small package of most important tests (#2379)
* In old version release run small package of most important tests

* add to releases tests for stocks, warehouses and orders

* Update .github/workflows/tests-nightly.yml

Co-authored-by: Mika <6186720+NyanKiyoshi@users.noreply.github.com>

* remove set-output command

Co-authored-by: Mika <6186720+NyanKiyoshi@users.noreply.github.com>
2022-10-25 19:27:26 +02:00

42 lines
1.3 KiB
JavaScript

/// <reference types="cypress"/>
/// <reference types="../../support"/>
import { urlList } from "../../fixtures/urlList";
import { TEST_ADMIN_USER, USER_WITHOUT_NAME } from "../../fixtures/users";
import { expectWelcomeMessageIncludes } from "../../support/pages/homePage";
describe("Displaying welcome message on home page", () => {
it(
"should display user name on home page",
{ tags: ["@homePage", "@allEnv", "@stable", "@oldRelease"] },
() => {
cy.loginUserViaRequest().visit(urlList.homePage);
expectWelcomeMessageIncludes(
`${TEST_ADMIN_USER.name} ${TEST_ADMIN_USER.lastName}`,
);
},
);
it(
"should display user email on home page",
{ tags: ["@homePage", "@allEnv", "@stable", "@oldRelease"] },
() => {
cy.loginUserViaRequest("auth", USER_WITHOUT_NAME).visit(urlList.homePage);
expectWelcomeMessageIncludes(`${USER_WITHOUT_NAME.email}`);
},
);
it(
"should refresh page without errors",
{ tags: ["@homePage", "@allEnv", "@stable", "@oldRelease"] },
() => {
cy.loginUserViaRequest()
.visit(urlList.homePage)
.waitForProgressBarToNotExist()
.reload(true);
expectWelcomeMessageIncludes(
`${TEST_ADMIN_USER.name} ${TEST_ADMIN_USER.lastName}`,
);
},
);
});