Skip to content

Commit

Permalink
IVYPORTAL-18029 Security findings- Client-side cross-site scripting
Browse files Browse the repository at this point in the history
- Fixed GUI test
  • Loading branch information
mnhnam-axonivy committed Dec 17, 2024
1 parent f4a0f06 commit bdf9f32
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down

0 comments on commit bdf9f32

Please sign in to comment.