saleor-dashboard/cypress/e2e/homePage/homePage.js
Karolina Rakoczy fd7813692a
Change way of tagging tests, add stable tag (#2102)
* change tags in tests

* change tags in tests

* add finde-names

* correct critical tag

* fix navigation

* remove comments

* fix config

* fix baseUrl port
2022-06-27 11:30:51 +02:00

42 lines
1.2 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"] },
() => {
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"] },
() => {
cy.loginUserViaRequest("auth", USER_WITHOUT_NAME).visit(urlList.homePage);
expectWelcomeMessageIncludes(`${USER_WITHOUT_NAME.email}`);
}
);
it(
"should refresh page without errors",
{ tags: ["@homePage", "@allEnv", "@stable"] },
() => {
cy.loginUserViaRequest()
.visit(urlList.homePage)
.waitForProgressBarToNotExist()
.reload(true);
expectWelcomeMessageIncludes(
`${TEST_ADMIN_USER.name} ${TEST_ADMIN_USER.lastName}`
);
}
);
});