diff --git a/AxonIvyPortal/portal-selenium-test/resources/css/document-screenshot.css b/AxonIvyPortal/portal-selenium-test/resources/css/document-screenshot.css index a6e51bbe0a8..015f547d564 100644 --- a/AxonIvyPortal/portal-selenium-test/resources/css/document-screenshot.css +++ b/AxonIvyPortal/portal-selenium-test/resources/css/document-screenshot.css @@ -1,3 +1,12 @@ +/*****CSS FOR DECORATE SCREENSHOT***** + THIS scrollbar-width is used to prevent + the gap on the right side when selenide taking screenshot + it only happens on Linux environment. +*/ +html { + scrollbar-width: none; +} + /*****CSS FOR DECORATE SCREENSHOT******/ .marker { position: absolute; diff --git a/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js b/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js index dca9849fadd..72d33cbad1f 100644 --- a/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js +++ b/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js @@ -42,6 +42,8 @@ function highlightTopBar() { $(themeSwitchIcon).addClass("red-topbottom-medium-border"); var chatItem = topMenu.find("li.topbar-item.chat-item"); $(chatItem).addClass("red-topbottom-medium-border"); + var notificationIcon = $("#open-notifications-panel")[0].parentElement; + $(notificationIcon).addClass("red-topbottom-medium-border"); var userNameItem = topMenu.find("li.topbar-item.user-profile.setting-container"); $(userNameItem).addClass("red-topbottomright-medium-border"); } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/DashboardScreenshotTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/DashboardScreenshotTest.java index 2d673f25df7..bdd8fc0b44f 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/DashboardScreenshotTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/DashboardScreenshotTest.java @@ -42,7 +42,6 @@ import com.axonivy.portal.selenium.util.ConfigurationJsonUtils; import com.codeborne.selenide.CollectionCondition; import com.codeborne.selenide.Condition; -import com.codeborne.selenide.SelenideElement; import ch.ivy.addon.portalkit.enums.PortalVariable; @@ -354,10 +353,8 @@ public void screenshotTaskByPriorityClientStatisticChartWidget() throws IOExcept NewDashboardDetailsEditPage newDashboard = new NewDashboardDetailsEditPage(); newDashboard.waitPageLoaded(); - SelenideElement clientStatisticWidget = newDashboard.getStatisticWidgetConfigurationDialog(); ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.NEW_DASHBOARD_FOLDER + "edit-statistic-widget"); - ScreenshotUtils.captureElementWithMarginOptionScreenshot(clientStatisticWidget, - ScreenshotUtils.NEW_DASHBOARD_FOLDER + "task-by-priority-statistic-widget-configuration", new ScreenshotMargin(20)); + ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.NEW_DASHBOARD_FOLDER + "task-by-priority-statistic-widget-configuration"); redirectToRelativeLink(PORTAL_HOME_PAGE_URL); homePage = new NewDashboardPage(); ScreenshotUtils.captureElementScreenshot(homePage.waitAndGetClientStatisticChart(0), diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/HandleErrorPageScreenshotTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/HandleErrorPageScreenshotTest.java index eb9c4195300..1832ffb06bd 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/HandleErrorPageScreenshotTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/HandleErrorPageScreenshotTest.java @@ -25,7 +25,7 @@ public class HandleErrorPageScreenshotTest extends ScreenshotBaseTest { @Test public void screenshotErrorPages() throws IOException { - ScreenshotUtils.resizeBrowser(new Dimension(1200, 800)); + ScreenshotUtils.resizeBrowser(new Dimension(1280, 720)); redirectToRelativeLink(portalCustomErrorUrl); $("[id$=':test-error-method']").shouldBe(exist, DEFAULT_TIMEOUT).shouldBe(visible, DEFAULT_TIMEOUT).click(); $(".notification-container").shouldBe(appear, DEFAULT_TIMEOUT); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/SettingScreenshotTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/SettingScreenshotTest.java index 5dc65eaaaad..072d0743de7 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/SettingScreenshotTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/SettingScreenshotTest.java @@ -52,6 +52,7 @@ public void screenshotAdminSettings() throws IOException { ScreenshotUtils.captureElementWithMarginOptionScreenshot(adminSettingsPage.getEditSettingDialogOfFirstRow(), ScreenshotUtils.SETTINGS_FOLDER + "edit-global-settings", new ScreenshotMargin(20)); adminSettingsPage.closeEditSettingDialog(); + refreshPage(); adminSettingsPage.openAnnouncementTab(); ScreenshotUtils.captureElementWithMarginOptionScreenshot(adminSettingsPage.getAdminSettingContainer(),