Skip to content

Commit

Permalink
Merge pull request #1226 from axonivy-market/feature/IVYPORTAL-18000-…
Browse files Browse the repository at this point in the history
…Fix-GUI-Test-LE

Feature/ivyportal 18000 fix g UI test le
  • Loading branch information
mnhnam-axonivy authored Nov 20, 2024
2 parents eabf1a6 + 80f39c1 commit 368355b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void testFindProcess() {
@Test
public void testChangeProcessViewMode() {
String currentView = processWidgetPage.getCurrentViewMode();
processWidgetPage.selectViewMode(ProcessWidgetPage.GRID_MODE);
processWidgetPage.selectGridMode();
String newView = processWidgetPage.getCurrentViewMode();
assertFalse(StringUtils.equals(currentView, newView));
}
Expand All @@ -57,19 +57,19 @@ public void testEditDeleteProcessIcon() {
processWidgetPage = mainMenuPage.selectProcessesMenu();
createPublicExternalTestProcess(AAGOOGLE_LINK, AAGOOGLE_LINK, TestRole.TESTER_ROLE);

processWidgetPage.selectViewMode(ProcessWidgetPage.GRID_MODE);
processWidgetPage.selectGridMode();
processWidgetPage.waitForGridProcessListDisplayed();
processWidgetPage.enterSearchKeyword("link");
String currentIcon = processWidgetPage.getProcessItemIcon(0);
processWidgetPage.selectViewMode(ProcessWidgetPage.IMAGE_MODE);
processWidgetPage.selectImageMode();
processWidgetPage.waitForImageProcessListDisplayed();
processWidgetPage.enterSearchKeyword("link");
processWidgetPage.clickMoreButtonOfFirstImageProcess();
processWidgetPage.clickOnProcessEditMenu(0);
processWidgetPage.changeProcessIcon();
processWidgetPage.addNewRolePermission(TestRole.HR_ROLE);
processWidgetPage.saveEditProcessDialog();
processWidgetPage.selectViewMode(ProcessWidgetPage.GRID_MODE);
processWidgetPage.selectGridMode();
processWidgetPage.waitForGridProcessListDisplayed();
processWidgetPage.enterSearchKeyword("link");
String newIcon = processWidgetPage.getProcessItemIcon(0);
Expand All @@ -93,7 +93,7 @@ public void testEditDeleteProcessIcon() {
newDashboardPage = new NewDashboardPage();
mainMenuPage = newDashboardPage.openMainMenu();
processWidgetPage = mainMenuPage.selectProcessesMenu();
processWidgetPage.selectViewMode(ProcessWidgetPage.GRID_MODE);
processWidgetPage.selectGridMode();
processWidgetPage.waitForGridProcessListDisplayed();
processWidgetPage.enterSearchKeyword(AAGOOGLE_LINK);
processWidgetPage.clickMoreButtonOfGridProcess(AAGOOGLE_LINK);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<cc:attribute name="onCompleteLoadWidget" />
<cc:attribute name="isAIResult" default="false" />
<cc:attribute name="caseWidgetVar" default="dashboard-cases" />


</cc:interface>

<cc:implementation>
Expand All @@ -25,7 +23,7 @@
<p:remoteCommand id="rcLoadCaseFirstTimeAIResult" rendered="#{cc.attrs.isAIResult}"
autoRun="true" actionListener="#{caseWidget.dataModel.loadFirstTime()}"
update="dashboard-cases-container" global="false" async="true" process="@this"
oncomplete="loadCaseAndTaskWidgetFirstTime('js-loading-#{caseWidget.id}', 'js-dashboard-cases-container-#{caseWidget.id}'); #{cc.attrs.onCompleteLoadWidget}; #{cc.attrs.isPreviewMode ? 'calculateFilterPaneltPosition();' : ''}" />
oncomplete="loadCaseAndTaskWidgetFirstTime('js-loading-#{caseWidget.id}', 'js-dashboard-cases-container-#{caseWidget.id}'); #{cc.attrs.onCompleteLoadWidget};" />
<p:inputText type="hidden" value="#{cc.attrs.caseWidgetVar}-#{caseWidget.id}" styleClass="js-table-widget-var" rendered="#{!isPreviewMode}" />

<p:remoteCommand id="rcLoadCaseFirstTime" rendered="#{!cc.attrs.isAIResult}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
componentToUpdate="#{cc.attrs.componentToUpdate}" />
<ic:ch.ivy.addon.portal.generic.dashboard.component.CaseWidget id="case-widget-preview" isReadOnlyMode="#{cc.attrs.isReadOnlyMode}"
caseWidget="#{widget}" renderColumnConfiguration="false" isPreviewMode="true" caseWidgetVar="dashboard-cases-configuration" componentToUpdateCaseWidget="@widgetVar(dashboard-cases-configuration-#{widget.id})"
onCompleteLoadWidget="setTimeout(function() { PF('new-widget-configuration-dialog').initPosition(); }, 100); initTableWidget(PF('dashboard-cases-configuration-#{widget.id}'))"/>
onCompleteLoadWidget="setTimeout(function() { PF('new-widget-configuration-dialog').initPosition(); }, 100); initTableWidget(PF('dashboard-cases-configuration-#{widget.id}'));"/>
</ui:define>

<ui:define name="multiLanguageDialog">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
componentToUpdate="#{cc.attrs.componentToUpdate}" />
<ic:ch.ivy.addon.portal.generic.dashboard.component.TaskWidget id="task-widget-preview" isReadOnlyMode="#{cc.attrs.isReadOnlyMode}"
taskWidget="#{widget}" renderColumnConfiguration="false" isPreviewMode="true" taskWidgetVar="dashboard-tasks-configuration" componentToUpdateTaskWidget="@widgetVar(dashboard-tasks-configuration-#{widget.id})"
onCompleteLoadWidget="setTimeout(function() { PF('new-widget-configuration-dialog').initPosition(); }, 100); initTableWidget(PF('dashboard-tasks-configuration-#{widget.id}'))"/>
onCompleteLoadWidget="setTimeout(function() { PF('new-widget-configuration-dialog').initPosition(); }, 100); initTableWidget(PF('dashboard-tasks-configuration-#{widget.id}'));"/>
</ui:define>

<ui:define name="multiLanguageDialog">
Expand Down

0 comments on commit 368355b

Please sign in to comment.