Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IVYPORTAL-18045-Check-and-beautify-screenshot-MASTER #1289

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading