Skip to content

Commit

Permalink
IVYPORTAL-18045-Check-and-beautify-screenshot-MASTER (#1289)
Browse files Browse the repository at this point in the history
- improve screenshot picture
- Update document
  • Loading branch information
tphvu-axonivy authored Dec 3, 2024
1 parent 35a995b commit 2c525b0
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ HowTo: Add a Third Party Application

#. Enter its URL in :guilabel:`Link`, e.g. http://www.google.com.

#. Click on :guilabel:`Ok`.
#. Click on :guilabel:`Save`.

.. _update-portal-settings:

Expand Down

0 comments on commit 2c525b0

Please sign in to comment.