saleor-dashboard/cypress/integration/homePage/homePage.js
Karolina Rakoczy 1f01a09e87
add tags (#1251)
* add tags

* edit e2e.yaml

* fix test for customer registration

* add empty lines
2021-07-23 12:46:44 +03:00

22 lines
805 B
JavaScript

import { TEST_ADMIN_USER, USER_WITHOUT_NAME } from "../../Data/users";
import { expectWelcomeMessageIncludes } from "../../steps/homePageSteps";
import filterTests from "../../support/filterTests";
import { urlList } from "../../url/urlList";
filterTests(["all"], () => {
describe("Displaying welcome message on home page", () => {
it("should display user name on home page", () => {
cy.loginUserViaRequest();
cy.visit(urlList.homePage);
expectWelcomeMessageIncludes(
`${TEST_ADMIN_USER.name} ${TEST_ADMIN_USER.lastName}`
);
});
it("should display user email on home page", () => {
cy.loginUserViaRequest("auth", USER_WITHOUT_NAME);
cy.visit(urlList.homePage);
expectWelcomeMessageIncludes(`${USER_WITHOUT_NAME.email}`);
});
});
});