Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/axonivy-market/portal int…
Browse files Browse the repository at this point in the history
…o feature/IVYPORTAL-18044-Stabilize-screenshot-tests
  • Loading branch information
nhthinh-axonivy committed Dec 2, 2024
2 parents ca7161b + 35a995b commit 5353e44
Show file tree
Hide file tree
Showing 18 changed files with 48 additions and 240 deletions.
4 changes: 2 additions & 2 deletions AxonIvyPortal/PortalKitTestHelper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<version>9.1.0.0-SNAPSHOT</version>
<packaging>iar</packaging>
<properties>
<ivy.engine.version>12.0.0</ivy.engine.version>
<build.plugin.version>12.0.0</build.plugin.version>
<ivy.engine.version>12.0.1</ivy.engine.version>
<build.plugin.version>12.0.0-SNAPSHOT</build.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions AxonIvyPortal/portal-components/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</snapshotRepository>
</distributionManagement>
<properties>
<ivy.engine.version>12.0.0</ivy.engine.version>
<build.plugin.version>12.0.0</build.plugin.version>
<ivy.engine.version>12.0.1</ivy.engine.version>
<build.plugin.version>12.0.0-SNAPSHOT</build.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions AxonIvyPortal/portal-migration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<version>9.4.0</version>
<packaging>iar</packaging>
<properties>
<ivy.engine.version>12.0.0</ivy.engine.version>
<build.plugin.version>12.0.0</build.plugin.version>
<ivy.engine.version>12.0.1</ivy.engine.version>
<build.plugin.version>12.0.0-SNAPSHOT</build.plugin.version>
</properties>
<build>
<plugins>
Expand Down
4 changes: 2 additions & 2 deletions AxonIvyPortal/portal-selenium-test/customized_pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<version>9.1.0.0-SNAPSHOT</version>
<packaging>iar</packaging>
<properties>
<build.plugin.version>12.0.0</build.plugin.version>
<ivy.engine.version>12.0.0</ivy.engine.version>
<build.plugin.version>12.0.0-SNAPSHOT</build.plugin.version>
<ivy.engine.version>12.0.1</ivy.engine.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 @@ -6,8 +6,8 @@
<version>9.1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<build.plugin.version>12.0.0</build.plugin.version>
<ivy.engine.version>12.0.0</ivy.engine.version>
<build.plugin.version>12.0.0-SNAPSHOT</build.plugin.version>
<ivy.engine.version>12.0.1</ivy.engine.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<distributionManagement>
Expand Down
4 changes: 2 additions & 2 deletions AxonIvyPortal/portal-selenium-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<version>9.1.0.0-SNAPSHOT</version>
<packaging>iar</packaging>
<properties>
<ivy.engine.version>12.0.0</ivy.engine.version>
<build.plugin.version>12.0.0</build.plugin.version>
<ivy.engine.version>12.0.1</ivy.engine.version>
<build.plugin.version>12.0.0-SNAPSHOT</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));
}
}
4 changes: 2 additions & 2 deletions AxonIvyPortal/portal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
</snapshotRepository>
</distributionManagement>
<properties>
<ivy.engine.version>12.0.0</ivy.engine.version>
<build.plugin.version>12.0.0</build.plugin.version>
<ivy.engine.version>12.0.1</ivy.engine.version>
<build.plugin.version>12.0.0-SNAPSHOT</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 @@ -533,6 +533,7 @@ public static void loadProcessesOfWidget(ProcessDashboardWidget widget) {
private static void loadProcessByPath(SingleProcessDashboardWidget processWidget) {
String processPath = processWidget.getProcessPath();
if (processPath == null || processWidget.getProcess() != null) {
processWidget.setEmptyProcessMessage(Ivy.cms().co("/ch.ivy.addon.portalkit.ui.jsf/dashboard/processes/noProcessSelected"));
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
</ui:include>
</ui:fragment>

<h:panelGroup id="empty-process"
<h:panelGroup id="empty-process" styleClass="h-full"
rendered="#{(displayMode eq 'COMBINED_MODE' or displayMode eq 'FULL_MODE' or displayMode eq 'IMAGE_MODE') and widget.process eq null}">
<h:panelGroup id="empty-process-actions" rendered="#{!isReadOnlyMode}" styleClass="process-grid-item__action--combined">
<p:commandButton id="empty-process-edit-widget" styleClass="rounded-button ui-button-outlined u-mar-right-5" global="false" icon="si si-pencil"
Expand All @@ -136,7 +136,7 @@
trackMouse="true" hideEvent="mouseleave click" />
</h:panelGroup>

<h:panelGroup styleClass="process-dashboard-widget__empty-process empty-message-container" layout="block">
<h:panelGroup styleClass="process-dashboard-widget__empty-process empty-message-container static" layout="block">
<i class="#{widget.hasPermissionToSee ? 'si si-alert-circle' : 'si si-lock-1'} empty-message-icon" />
<br />
<h:outputText value="#{widget.emptyProcessMessage}" styleClass="empty-message-text" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@

<!-- Preview -->
<h:panelGroup id="widget-preview" styleClass="card widget-preview widget-preview--process" layout="block">
<div class="ui-g #{isCompact ? 'widget-preview--compact' : ''} #{isFull ? 'widget-preview--full' : ''} #{isCombined ? 'widget-preview--combined' : ''} #{isImage ? 'widget-preview--image-width' : ''}">
<div class="ui-g #{isCompact ? 'widget-preview--compact' : ''} #{isFull ? 'widget-preview--full h-full' : ''} #{isCombined ? 'widget-preview--combined h-full' : ''} #{isImage ? 'widget-preview--image-width' : ''}">
<div class="ui-g-12 widget-preview__header">
<h2>#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/preview')}</h2>
<h:outputText value="#{ivy.cms.co('/Dialogs/ch/ivy/addon/portal/generic/dashboard/component/ProcessWidgetConfiguration/DragAndDropToChangeOrder')}"
Expand Down
Loading

0 comments on commit 5353e44

Please sign in to comment.