From 29a90f3e3ddea0780333ba7e53f7969b4d986015 Mon Sep 17 00:00:00 2001 From: Karolina Rakoczy Date: Thu, 21 Oct 2021 12:46:17 +0200 Subject: [PATCH] test for refresh (#1497) --- cypress/integration/homePage/homePage.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/cypress/integration/homePage/homePage.js b/cypress/integration/homePage/homePage.js index 709d10d9b..9663e682e 100644 --- a/cypress/integration/homePage/homePage.js +++ b/cypress/integration/homePage/homePage.js @@ -9,17 +9,25 @@ import { expectWelcomeMessageIncludes } from "../../support/pages/homePage"; filterTests({ definedTags: ["all"] }, () => { describe("Displaying welcome message on home page", () => { it("should display user name on home page", () => { - cy.loginUserViaRequest(); - cy.visit(urlList.homePage); + cy.loginUserViaRequest().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); + cy.loginUserViaRequest("auth", USER_WITHOUT_NAME).visit(urlList.homePage); expectWelcomeMessageIncludes(`${USER_WITHOUT_NAME.email}`); }); + + it("should refresh page without errors", () => { + cy.loginUserViaRequest() + .visit(urlList.homePage) + .waitForProgressBarToNotExist() + .reload(true); + expectWelcomeMessageIncludes( + `${TEST_ADMIN_USER.name} ${TEST_ADMIN_USER.lastName}` + ); + }); }); });