diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/BaseTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/BaseTest.java index 12cf9c1bb98..bc5d20ce0a8 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/BaseTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/BaseTest.java @@ -1,6 +1,7 @@ package com.axonivy.portal.selenium.common; import static com.codeborne.selenide.Condition.exist; + import static com.codeborne.selenide.Selenide.$; import static com.codeborne.selenide.Selenide.open; import static com.codeborne.selenide.Selenide.refresh; @@ -17,8 +18,6 @@ import org.openqa.selenium.support.ui.WebDriverWait; import com.axonivy.ivy.webtest.engine.EngineUrl; -import com.axonivy.portal.selenium.page.NewDashboardPage; -import com.axonivy.portal.selenium.page.UserProfilePage; import com.codeborne.selenide.Condition; import com.codeborne.selenide.WebDriverRunner; @@ -347,13 +346,6 @@ public void createJSonFile(String jsonFile, String key) { redirectToRelativeLink(String.format(createJSonFileUrl, filepath, key)); } - public void resetFormattingLanguage() { - NewDashboardPage newDashboardPage = new NewDashboardPage(); - UserProfilePage userProfilePage = newDashboardPage.openMyProfilePage(); - userProfilePage.inputFormattingLanguage("English (United Kingdom)"); - newDashboardPage = userProfilePage.save(); - } - protected void showNewDashboard() { redirectToRelativeLink(PORTAL_HOME_PAGE_URL); } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AnnouncementPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AnnouncementPage.java index 2a526d729c6..400b11cd410 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AnnouncementPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AnnouncementPage.java @@ -1,5 +1,6 @@ package com.axonivy.portal.selenium.page; +import static com.codeborne.selenide.Condition.appear; import static com.codeborne.selenide.Selenide.$; import org.openqa.selenium.By; @@ -14,8 +15,7 @@ protected String getLoadedLocator() { } public String getInfoSummary() { - return WebDriverRunner.getWebDriver().findElement(By.cssSelector("div[id$='messages'] span[class$='summary']")) - .getText(); + return $("div[id$='announcement-tab']").shouldBe(appear, DEFAULT_TIMEOUT).$("span.ui-messages-error-summary").shouldBe(appear, DEFAULT_TIMEOUT).getText(); } public void publish() { diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/AnnouncementTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/AnnouncementTest.java index c61402c87d4..bb8196ebaf1 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/AnnouncementTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/AnnouncementTest.java @@ -1,7 +1,5 @@ package com.axonivy.portal.selenium.test; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -69,7 +67,7 @@ public void testShouldDisplayNotification() { } @Test - public void testDepulishNotification() { + public void testDepublishNotification() { NewDashboardPage newDashboardPage = new NewDashboardPage(); AdminSettingsPage adminSettingsPage = newDashboardPage.openAdminSettings(); AnnouncementPage announcementPage = adminSettingsPage.openAnnouncementTab(); @@ -83,9 +81,4 @@ public void testDepulishNotification() { announcementPage.dePublish(); assertTrue(newDashboardPage.isAnnouncementMessageNotDisplayed()); } - - @AfterEach - public void resetDefaultFormattingLanguage() { - resetFormattingLanguage(); - } } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/LanguageSettingTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/LanguageSettingTest.java index ffe74d1303f..8e390f28a0e 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/LanguageSettingTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/LanguageSettingTest.java @@ -1,6 +1,5 @@ package com.axonivy.portal.selenium.test; -import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -55,9 +54,4 @@ public void testChangeLanguage() { private void createTestData() { redirectToRelativeLink(createTestingTasksUrl); } - - @AfterEach - public void resetDefaultFormattingLanguage() { - resetFormattingLanguage(); - } }