IDEMPIERE-529 Search on empty table doesn't allow to close the window. Fitnesse test.
This commit is contained in:
parent
401b046add
commit
92dc282c1c
|
@ -0,0 +1,14 @@
|
||||||
|
http://jira.idempiere.com/browse/IDEMPIERE-529
|
||||||
|
|
||||||
|
!include -c .ZkSuite.ZkGardenAdminLogin
|
||||||
|
|
||||||
|
!define windowId {$Activity__ABC__1}
|
||||||
|
|
||||||
|
Open Activity (ABC) window
|
||||||
|
|''open window''|!-Activity (ABC)-!|
|
||||||
|
|''wait response'' |
|
||||||
|
|
||||||
|
|''window'' |${windowId}|''click toolbar''|!-BtnFind-!|
|
||||||
|
|''click''|$MessageBox_Activity__ABC_ $btnOk|
|
||||||
|
|''window'' |${windowId}|''click toolbar''|!-BtnIgnore-!|
|
||||||
|
|''attribute''|class|''of''|${windowId} $BtnSave|is|!-toolbar-button disableFilter z-toolbarbutton z-toolbarbutton-disd-!|
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<properties>
|
||||||
|
<Edit>true</Edit>
|
||||||
|
<Files>true</Files>
|
||||||
|
<Properties>true</Properties>
|
||||||
|
<RecentChanges>true</RecentChanges>
|
||||||
|
<Refactor>true</Refactor>
|
||||||
|
<Search>true</Search>
|
||||||
|
<Test/>
|
||||||
|
<Versions>true</Versions>
|
||||||
|
<WhereUsed>true</WhereUsed>
|
||||||
|
</properties>
|
|
@ -20,6 +20,7 @@ package org.adempiere.webui.component;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.adempiere.util.Callback;
|
import org.adempiere.util.Callback;
|
||||||
|
import org.adempiere.webui.AdempiereIdGenerator;
|
||||||
import org.adempiere.webui.LayoutUtils;
|
import org.adempiere.webui.LayoutUtils;
|
||||||
import org.adempiere.webui.apps.AEnv;
|
import org.adempiere.webui.apps.AEnv;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
@ -115,35 +116,42 @@ public class Messagebox extends Window implements EventListener<Event>
|
||||||
// Invert - Unify OK/Cancel IDEMPIERE-77
|
// Invert - Unify OK/Cancel IDEMPIERE-77
|
||||||
//btnOk.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "OK")));
|
//btnOk.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "OK")));
|
||||||
btnOk.setImage("/images/Ok16.png");
|
btnOk.setImage("/images/Ok16.png");
|
||||||
|
btnOk.setId("btnOk");
|
||||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||||
LayoutUtils.addSclass("action-text-button", btnOk);
|
LayoutUtils.addSclass("action-text-button", btnOk);
|
||||||
|
|
||||||
//btnCancel.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "Cancel")));
|
//btnCancel.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "Cancel")));
|
||||||
btnCancel.setImage("/images/Cancel16.png");
|
btnCancel.setImage("/images/Cancel16.png");
|
||||||
btnCancel.addEventListener(Events.ON_CLICK, this);
|
btnCancel.addEventListener(Events.ON_CLICK, this);
|
||||||
|
btnCancel.setId("btnCancel");
|
||||||
LayoutUtils.addSclass("action-text-button", btnCancel);
|
LayoutUtils.addSclass("action-text-button", btnCancel);
|
||||||
|
|
||||||
btnYes.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "Yes")));
|
btnYes.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "Yes")));
|
||||||
btnYes.setImage("/images/Ok16.png");
|
btnYes.setImage("/images/Ok16.png");
|
||||||
btnYes.addEventListener(Events.ON_CLICK, this);
|
btnYes.addEventListener(Events.ON_CLICK, this);
|
||||||
|
btnYes.setId("btnYes");
|
||||||
LayoutUtils.addSclass("action-text-button", btnYes);
|
LayoutUtils.addSclass("action-text-button", btnYes);
|
||||||
|
|
||||||
btnNo.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "No")));
|
btnNo.setLabel(Util.cleanAmp(Msg.getMsg(ctx, "No")));
|
||||||
btnNo.setImage("/images/Cancel16.png");
|
btnNo.setImage("/images/Cancel16.png");
|
||||||
btnNo.addEventListener(Events.ON_CLICK, this);
|
btnNo.addEventListener(Events.ON_CLICK, this);
|
||||||
|
btnNo.setId("btnNo");
|
||||||
LayoutUtils.addSclass("action-text-button", btnNo);
|
LayoutUtils.addSclass("action-text-button", btnNo);
|
||||||
|
|
||||||
btnAbort.setLabel("Abort");
|
btnAbort.setLabel("Abort");
|
||||||
btnAbort.addEventListener(Events.ON_CLICK, this);
|
btnAbort.addEventListener(Events.ON_CLICK, this);
|
||||||
|
btnAbort.setId("btnAbort");
|
||||||
LayoutUtils.addSclass("action-text-button", btnAbort);
|
LayoutUtils.addSclass("action-text-button", btnAbort);
|
||||||
|
|
||||||
btnRetry.setLabel("Retry");
|
btnRetry.setLabel("Retry");
|
||||||
btnRetry.addEventListener(Events.ON_CLICK, this);
|
btnRetry.addEventListener(Events.ON_CLICK, this);
|
||||||
|
btnRetry.setId("btnRetry");
|
||||||
LayoutUtils.addSclass("action-text-button", btnRetry);
|
LayoutUtils.addSclass("action-text-button", btnRetry);
|
||||||
|
|
||||||
btnIgnore.setLabel("Ignore");
|
btnIgnore.setLabel("Ignore");
|
||||||
btnIgnore.setImage("/images/Ignore16.png");
|
btnIgnore.setImage("/images/Ignore16.png");
|
||||||
btnIgnore.addEventListener(Events.ON_CLICK, this);
|
btnIgnore.addEventListener(Events.ON_CLICK, this);
|
||||||
|
btnIgnore.setId("btnIgnore");
|
||||||
LayoutUtils.addSclass("action-text-button", btnIgnore);
|
LayoutUtils.addSclass("action-text-button", btnIgnore);
|
||||||
|
|
||||||
Panel pnlMessage = new Panel();
|
Panel pnlMessage = new Panel();
|
||||||
|
@ -248,7 +256,7 @@ public class Messagebox extends Window implements EventListener<Event>
|
||||||
this.setSizable(true);
|
this.setSizable(true);
|
||||||
|
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
this.setId(title);
|
this.setId("MessageBox_"+AdempiereIdGenerator.escapeId(title));
|
||||||
AEnv.showCenterScreen(this);
|
AEnv.showCenterScreen(this);
|
||||||
|
|
||||||
return returnValue;
|
return returnValue;
|
||||||
|
|
|
@ -134,6 +134,7 @@ public class ZkFixture extends SpiderFixture {
|
||||||
public void openWindow(String label) {
|
public void openWindow(String label) {
|
||||||
Widget widget = new Widget("$treeSearchCombo");
|
Widget widget = new Widget("$treeSearchCombo");
|
||||||
String search = label.indexOf("&") > 0 ? label.substring(0, label.indexOf("&")) : label;
|
String search = label.indexOf("&") > 0 ? label.substring(0, label.indexOf("&")) : label;
|
||||||
|
search = search.indexOf("(") > 0 ? search.substring(0, search.indexOf("(")) : search;
|
||||||
WebElement element = widget.$n(webDriver, "real");
|
WebElement element = widget.$n(webDriver, "real");
|
||||||
element.sendKeys(search);
|
element.sendKeys(search);
|
||||||
waitResponse();
|
waitResponse();
|
||||||
|
|
Loading…
Reference in New Issue