Skip to content

Commit

Permalink
Merge branch 'master' into feature/IVYPORTAL-17542-Use-latest-web-tes…
Browse files Browse the repository at this point in the history
…ter-to-run-all-tests
  • Loading branch information
tphvu-axonivy committed Dec 2, 2024
2 parents a050b1d + d57cdfc commit 6f56126
Show file tree
Hide file tree
Showing 118 changed files with 536 additions and 558 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- master
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:

permissions:
contents: write
Expand Down
2 changes: 1 addition & 1 deletion AxonIvyPortal/PortalKitTestHelper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<packaging>iar</packaging>
<properties>
<ivy.engine.version>12.0.0</ivy.engine.version>
<build.plugin.version>12.0.0-SNAPSHOT</build.plugin.version>
<build.plugin.version>12.0.0</build.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion AxonIvyPortal/portal-components/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</distributionManagement>
<properties>
<ivy.engine.version>12.0.0</ivy.engine.version>
<build.plugin.version>12.0.0-SNAPSHOT</build.plugin.version>
<build.plugin.version>12.0.0</build.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion AxonIvyPortal/portal-migration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<packaging>iar</packaging>
<properties>
<ivy.engine.version>12.0.0</ivy.engine.version>
<build.plugin.version>12.0.0-SNAPSHOT</build.plugin.version>
<build.plugin.version>12.0.0</build.plugin.version>
</properties>
<build>
<plugins>
Expand Down
2 changes: 1 addition & 1 deletion AxonIvyPortal/portal-selenium-test/customized_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<version>9.1.0.0-SNAPSHOT</version>
<packaging>iar</packaging>
<properties>
<build.plugin.version>12.0.0-SNAPSHOT</build.plugin.version>
<build.plugin.version>12.0.0</build.plugin.version>
<ivy.engine.version>12.0.0</ivy.engine.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<version>9.1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<build.plugin.version>12.0.0-SNAPSHOT</build.plugin.version>
<build.plugin.version>12.0.0</build.plugin.version>
<ivy.engine.version>12.0.0</ivy.engine.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion AxonIvyPortal/portal-selenium-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<packaging>iar</packaging>
<properties>
<ivy.engine.version>12.0.0</ivy.engine.version>
<build.plugin.version>12.0.0-SNAPSHOT</build.plugin.version>
<build.plugin.version>12.0.0</build.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,6 @@ function createRedThickOutlineWithOffset($element) {
}

/***IMPLEMENTATION TO DECORATE PAGES - WHICH ARE CALLED IN SELENIUM****/
function highlightDashboardWidget() {
createRedMediumOutline($("#task-widget"));
createRedMediumOutline($("#process-widget"));
}

function highlightAndNumberingDashboardSections() {
var processWidget = $("#process-widget");
createRedMediumOutline(processWidget);
appendStepAnnotation(processWidget, "1", 0 , processWidget.width()/2);
var taskWidget = $("#task-widget");
createRedMediumOutline(taskWidget);
appendStepAnnotation(taskWidget, "2", 0, taskWidget.width()/2);
}

function numberingTaskFilter() {
var taskOrder = jQuery("#task-widget\\:compact-task-widget-sort-menu");
appendStepAnnotation(taskOrder, 2, -15,100)
}

function highlightTopBar() {
var topMenu = $("#top-menu");
var searchIcon = topMenu.find("li.topbar-item.search-item");
Expand Down Expand Up @@ -82,31 +63,6 @@ function highlightLogo() {
createRedMediumOutline($(".portal-home-logo.portal-home-logo-small"));
}

function numberingTaskItem() {
var taskPriorityFirstRow = jQuery(".priority-cell:eq(0)");
appendStepAnnotation(taskPriorityFirstRow, "1", -35, 0);

var taskNameFirstRow = jQuery(".task-start-info-task-name:eq(0)");
appendStepAnnotation(taskNameFirstRow, "2", -10, 160);

var taskIdSecondRow = jQuery(".task-start-info-task-name:eq(1)");
appendStepAnnotation(taskIdSecondRow, "3", -10, 170);

var taskDatesThirddRow = jQuery(".task-start-info-content:eq(2)");
appendStepAnnotation(taskDatesThirddRow, "4", -10, -45);
appendStepAnnotation(taskDatesThirddRow, "5", -10, 120);

var taskDescriptionFourthRow = jQuery(".task-start-info-task-description:eq(3)");
appendStepAnnotation(taskDescriptionFourthRow, "6", -10, 175);
}

function numberingTaskFilterAndSort() {
var taskFilter = $("#task-widget\\:filter-form\\:filter-container");
appendStepAnnotation(taskFilter, 1, -15, taskFilter.width()/2);
var taskSort = $("#task-widget\\:sort-task-form\\:sort-task-menu");
appendStepAnnotation(taskSort, 2, -15, taskSort.width()/2);
}

function highlightProcessNavigation() {
createRedThickOutlineWithOffset($('.layout-menu .PROCESS'));
}
Expand Down Expand Up @@ -202,72 +158,6 @@ function highlightShowMoreNoteLink() {
createRedMediumOutline($('a.js-note-show-more-link'));
}

function highlightCustomCaseList() {
var caseHeader = $("[id$='case-widget:widget-column-header']");
createRedMediumOutline(caseHeader);
appendStepAnnotation(caseHeader, "1", -15, caseHeader.width()/2);

var action = $(".case-header-container.case-header-data:eq(1)");
createRedMediumOutline(action);
appendStepAnnotation(action, "2", -15, caseHeader.width()/2);
}

function highlightCustomColumnsConfigOnCaseList() {
var customColumnHeader = $(".ui-commandlink.customized-case-header-column:eq(0)");
createRedMediumOutline(customColumnHeader)
appendStepAnnotation(customColumnHeader, "1", -30, -20);

var columnsCheckbox = $("[id$=':select-columns-form:columns-checkbox']");
var customCheckbox = columnsCheckbox.find("td:eq(5)");
createRedMediumOutline(customCheckbox);
appendStepAnnotation(customCheckbox, "2", -20, customCheckbox.width() - 10);

var caseHeader = $(".case-info-row.js-case-start-link:eq(6)");
var customCaseItemCell = caseHeader.find("span.customized-case-header-column:eq(0)");
createRedMediumOutline(customCaseItemCell);
appendStepAnnotation(customCaseItemCell, "3", -20, - 20);
}

function highlightCaseCreatorFilter() {
var filterLabel = $("[id$=':creator-filter:filter-open-form:advanced-filter-command']");
createRedMediumOutline(filterLabel);
appendStepAnnotation(filterLabel, "1", -25, -30);

var removeFilterCommand = $("[id$=':creator-filter:filter-open-form:advanced-filter-remove-command']");
createRedMediumOutline(removeFilterCommand);
appendStepAnnotation(removeFilterCommand, "2", -25, removeFilterCommand.width());

var updateCommand = $("[id$=':creator-filter:filter-input-form:update-command']");
createRedMediumOutline(updateCommand);
appendStepAnnotation(updateCommand, "3", -2, -40)
}

function highlightEditSwitchProcessButton() {
var editSwitchCommand = $("[id$='process-widget:user-process-action-form:editing-switch-command']");
createRedMediumOutline(editSwitchCommand);
appendStepAnnotation(editSwitchCommand, "1", -45, editSwitchCommand.width()/2);
}

function highlightEditStepUserProcess(isDeleteProcess) {
var userProcessList = $("[id$='process-widget:edit-process-item-form:order-list-items']");
var userProcessItem = userProcessList.find("li.ui-orderlist-item.ui-sortable-handle:eq(0)");
if (isDeleteProcess) {
var processDeleteLink = userProcessItem.find("[id$=':process-delete-link']");
createRedMediumOutline(processDeleteLink);
appendStepAnnotation(processDeleteLink, "2", -40, processDeleteLink.width()/2);
} else {
appendStepAnnotation(userProcessItem, "2", 4, userProcessItem.width()/2);
}

var processSaveLink = $("[id$='process-widget:user-process-action-form:save-process-command']");
createRedMediumOutline(processSaveLink);
appendStepAnnotation(processSaveLink, "3", -40, -20);
}

function highlightSortUserProcess() {
createRedMediumOutline($("[id$=':user-process-action-form:name-sort-command']"));
}

function highlightProcessMoreInformationLink() {
var displayingProcessItem = $(".js-process-start-list-item").filter(function() {
if($(this).css('display') != 'none')
Expand All @@ -280,47 +170,6 @@ function highlightProcessMoreInformationLink() {
}

// Task
function highlightCustomTaskList() {
var caseHeader = $("[id$='task-widget:task-widget-sub-header']");
createRedMediumOutline(caseHeader);
appendStepAnnotation(caseHeader, "1", -15, caseHeader.width()/2);

var action = $(".full-mode.task-start-list-item.js-task-start-list-item:eq(2)");
createRedMediumOutline(action);
appendStepAnnotation(action, "2", -15, caseHeader.width()/2);
}

function highlightCustomColumnsConfigOnTaskList() {
var customColumnHeader = $("[id$=':task-custom']")[0];
createRedMediumOutline($(customColumnHeader))
appendStepAnnotation($(customColumnHeader), "1", -30, -20);

var columnsCheckbox = $("[id$='task-columns-configuration:select-columns-form:columns-checkbox']");
var customCheckbox = columnsCheckbox.find("td:eq(7)");
createRedMediumOutline(customCheckbox);
appendStepAnnotation(customCheckbox, "2", -20, customCheckbox.width() - 10);

var taskHeader = $(".task-start-link.js-task-start-link:eq(4)");
var customTaskItemCell = taskHeader.find(".task-custom-field-cell");
createRedMediumOutline(customTaskItemCell);
appendStepAnnotation(customTaskItemCell, "3", -20, - 20);
}


function highlightTaskStateFilter() {
var filterLabel = $("[id$=':state-filter:filter-open-form:advanced-filter-command']");
createRedMediumOutline(filterLabel);
appendStepAnnotation(filterLabel, "1", -25, -30);

var removeFilterCommand = $("[id$=':state-filter:filter-open-form:advanced-filter-remove-command']");
createRedMediumOutline(removeFilterCommand);
appendStepAnnotation(removeFilterCommand, "2", -25, removeFilterCommand.width());

var updateCommand = $("[id$=':state-filter:filter-input-form:update-command']");
createRedMediumOutline(updateCommand);
appendStepAnnotation(updateCommand, "3", -2, -40)
}

function highlightJoinGroupChatOption() {
createRedMediumOutline($('#horizontal-task-action-form\\:chat-group').parent());
}
Expand Down Expand Up @@ -349,36 +198,10 @@ function scrollToMiddleOfLayoutContent() {
window.scrollTo(0, document.body.scrollHeight/2);
}

function scrollToMiddleOfLayoutContent2() {
window.scrollTo(0, document.body.scrollHeight/4);
}

function scrollToBottomOfLayoutContent() {
window.scrollTo(0, document.body.scrollHeight);
}

function highlightCustomTaskDetail() {
var customTop = $('.custom-task-details-panel-top');
appendStepAnnotation(customTop, 1, -45, customTop.width()/2);

var customBottom = $('.custom-task-details-panel-bottom');
appendStepAnnotation(customBottom, 2, -45, customBottom.width()/2);
}

function highlightCustomTaskDetailWithNewStyle() {
var customPanel1 = $('.custom-task-panel-1');
appendStepAnnotation(customPanel1, 1, -10, customPanel1.width()/2);

var customPanel2 = $('.custom-task-panel-2');
appendStepAnnotation(customPanel2, 2, -10, customPanel2.width()/2);

var customPanel3 = $('.custom-task-panel-3');
appendStepAnnotation(customPanel3, 3, -10, customPanel3.width()/2);

var customPanel4 = $('.custom-task-panel-4');
appendStepAnnotation(customPanel4, 4, -10, customPanel4.width()/2);
}

function highlightCaseDetailComponents() {
var general = $('#case-details-information-panel');
appendStepAnnotation(general, 1, 0, general.width()/2);
Expand Down Expand Up @@ -423,14 +246,6 @@ function highlightTaskActionItem(taskIndex, actionIndex) {
createRedMediumOutline(actionItem);
}

function highlightShowAllProcesses() {
createRedThickOutlineWithOffset($('.layout-menu .PROCESS'));
}

function highlightTaskExportToExcelButton() {
createRedMediumOutline($("[id$=':task-export-to-excel-form']"));
}

function highlightCaseExportToExcelButton() {
createRedMediumOutline($("a[id$=':case-export-to-excel']"));
}
Expand All @@ -456,16 +271,6 @@ function highlightCustomWidgetInCaseDetails() {
createRedMediumOutline($(".custom-widget-card"));
}

function addStepToCustomWidgetTopTaskDetails() {
var topWidget = $(".custom-task-details-panel-top");
appendStepAnnotation(topWidget, 1, -30, topWidget.width()/2)
}

function addStepTCustomWidgetTopTaskDetails() {
var bottomWidget = $(".custom-task-details-panel-bottom");
appendStepAnnotation(bottomWidget, 2, -30, bottomWidget.width()/2)
}

function highlightIFrameWidgetTaskDetails() {
createRedMediumOutline($(".custom-widget-card.task-detail-card"));
}
Expand All @@ -482,10 +287,6 @@ function clearHighlightUserName() {
clearRedMediumOutline($('#user-settings-menu'));
}

function highlightServerInfo() {
createRedMediumOutline($("#server-infor"));
}

function highlightUserExampleNavigation() {
createRedThickOutlineWithOffset($('.layout-menu .CUSTOM'));
}
Expand Down Expand Up @@ -558,8 +359,4 @@ function createBlackThinOutline($element) {

function createBlackMediumOutline($element) {
$element.addClass("black-medium-outline");
}

function highlightElement(elementSelector) {
createRedMediumOutline($(elementSelector));
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.axonivy.portal.selenium.document.screenshot;

import static com.codeborne.selenide.CollectionCondition.sizeGreaterThanOrEqual;
import static com.codeborne.selenide.Selenide.$;

import java.io.IOException;
import java.util.Arrays;

Expand Down Expand Up @@ -40,8 +43,6 @@
import com.codeborne.selenide.CollectionCondition;
import com.codeborne.selenide.Condition;
import com.codeborne.selenide.SelenideElement;
import static com.codeborne.selenide.CollectionCondition.sizeGreaterThanOrEqual;
import static com.codeborne.selenide.Selenide.$;

import ch.ivy.addon.portalkit.enums.PortalVariable;

Expand Down Expand Up @@ -205,6 +206,17 @@ public void screenshotNewDashboardUserGuide() throws IOException {
detailsEditPage.waitForCaseWidgetLoaded();
ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.NEW_DASHBOARD_FOLDER + "edit-widget");

// Take screenshot of task widget table in edit mode
NewDashboardPage newDashboardPage = new NewDashboardPage();
ScreenshotUtils.captureElementScreenshot(
newDashboardPage.getTaskWidgetTable(),
ScreenshotUtils.NEW_DASHBOARD_FOLDER + "task-list-widget-edit-mode");

// Take screenshot of case widget table in edit mode
ScreenshotUtils.captureElementScreenshot(
newDashboardPage.getCaseWidgetTable(),
ScreenshotUtils.NEW_DASHBOARD_FOLDER + "case-list-widget-edit-mode");

// Take screenshot of Add new widget dialog
WebElement newWidgetDialog = detailsEditPage.addWidget();
ScreenshotUtils.captureElementWithMarginOptionScreenshot(newWidgetDialog,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.axonivy.portal.selenium.common.ScreenshotBaseTest;
import com.axonivy.portal.selenium.common.ScreenshotMargin;
import com.axonivy.portal.selenium.common.ScreenshotUtils;
import com.axonivy.portal.selenium.common.Sleeper;
import com.axonivy.portal.selenium.common.TestAccount;
import com.axonivy.portal.selenium.common.Variable;
import com.axonivy.portal.selenium.common.WaitHelper;
Expand Down Expand Up @@ -58,6 +59,7 @@ public void screenshotCasesNavigate() throws IOException {
ScreenshotUtils.resizeBrowser(new Dimension(SCREENSHOT_WIDTH, 600));
mainMenuPage.closeMainMenu();
caseWidgetPage.clickOnCaseActionLink(0);
Sleeper.sleep(500); // use Sleeper to wait actions memu display clearly
ScreenshotUtils.capturePageScreenshot(ScreenshotUtils.CASE_WIDGET_FOLDER + "case-key-information");
}

Expand Down
Loading

0 comments on commit 6f56126

Please sign in to comment.