diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TemplatePage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TemplatePage.java index 4038d8afe6..952b993f09 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TemplatePage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TemplatePage.java @@ -481,6 +481,10 @@ public NewDashboardPage openTaskList() { return openMainMenu().selectTaskMenu(); } + public void waitForTaskTitleAppear() { + waitForElementDisplayed(By.id("title"), true); + } + public void waitForIFrameContentVisible() { waitForIFrameScreenshotSizeGreaterThan(IFRAME_SCREENSHOT_FILE_SIZE_AT_MINIMUM); } 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 f0b988a233..8699cc2c95 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 @@ -8,6 +8,7 @@ import com.axonivy.portal.selenium.common.NavigationHelper; import com.axonivy.portal.selenium.page.MainMenuPage; import com.axonivy.portal.selenium.page.NewDashboardPage; +import com.axonivy.portal.selenium.page.TaskIFrameTemplatePage; import com.axonivy.portal.selenium.page.TopMenuTaskWidgetPage; import com.axonivy.portal.selenium.page.UserProfilePage; import com.axonivy.portal.selenium.page.WorkingTaskDialogFromUserProfilePage; @@ -26,9 +27,10 @@ public void setup() { public void testChangeLanguageWhenWorkingOnTask() { NavigationHelper.navigateToTaskList(); TopMenuTaskWidgetPage taskWidget = new TopMenuTaskWidgetPage(); - taskWidget.startTaskIFrameByIndex(0); + TaskIFrameTemplatePage taskPage = taskWidget.startTaskIFrameByIndex(0); taskWidget.switchBackToParent(); - taskWidget.clickOnMyProfile(); + taskPage.waitForTaskTitleAppear(); + taskPage.clickOnMyProfile(); WorkingTaskDialogFromUserProfilePage workingTaskDialogPage = new WorkingTaskDialogFromUserProfilePage(); workingTaskDialogPage.leaveTask(); UserProfilePage userProfilePage = new UserProfilePage();