IDEMPIERE-4138 Move fitnesse integration from core. Move ztl

This commit is contained in:
hengsin 2019-12-26 18:37:21 +08:00
parent 0caa446721
commit 602623af92
9 changed files with 0 additions and 203 deletions

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="lib" path="lib/ztl-2.0.0-SNAPSHOT.jar" sourcepath="lib/ztl-2.0.0-sources.jar"/>
<classpathentry kind="lib" path="/org.idempiere.fitnesse.server/lib/selenium-server-standalone-2.35.0.jar" sourcepath="/org.idempiere.fitnesse.server/lib/selenium-server-2.31.0-sources.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ztl</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -1,11 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View File

@ -1,18 +0,0 @@
config.properties
- configuration file for running Ztl generator and Ztl test
ZtlGenerator.launch
- Eclipse launch configuration for Ztl generator
test
- Example test cases generated by Ztl generator
resource/test
- ztl test script
Notes
======
* You must change the "target" instance variable value to "" in the generated ztl java source
* Use the AdempiereIDGenerator and your browser's inspect element tool to find out the selector for the element that you need to access. Alternatively,
you can use the script created from Selenium IDE recording as a guide.

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/ztl/lib/ztl-2.0.0-SNAPSHOT.jar"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
</listAttribute>
<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6&quot; javaProject=&quot;ztl&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry id=&quot;org.eclipse.jdt.launching.classpathentry.defaultClasspath&quot;&gt;&#10;&lt;memento exportedEntriesOnly=&quot;false&quot; project=&quot;ztl&quot;/&gt;&#10;&lt;/runtimeClasspathEntry&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/ztl/lib/commons-lang-2.4.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;runtimeClasspathEntry internalArchive=&quot;/ztl/lib/velocity-1.7.jar&quot; path=&quot;3&quot; type=&quot;2&quot;/&gt;&#10;"/>
</listAttribute>
<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.zkoss.ztl.util.ZtlGenerator"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-src resource -dist src"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="ztl"/>
</launchConfiguration>

View File

@ -1,11 +0,0 @@
server=http://127.0.0.1:8080
context-path=/webui
delay=500
action=
timeout=10000
browser=firefox
granularity=1
leniency=1
all=firefox
firefox=firefoxdriver
target=

View File

@ -1,5 +0,0 @@
ztl-2.0.0-SNAPSHOT.jar
- for execution of ztl generator and ztl test cases
others
- for execution of ztl generator

View File

@ -1,27 +0,0 @@
<test tags="login" action="">
<case id="login">
<client>
<![CDATA[
type(jq("$loginPanel $txtUserId"), "GardenAdmin");
type(jq("$loginPanel $txtPassword"), "GardenAdmin");
click(widget(jq("$loginPanel $chkSelectRole")).$n("real"));
click(jq("$loginPanel $Ok"));
waitResponse();
JQuery lstClient = jq("$rolePanel $lstClient");
if (lstClient.exists() && lstClient.isVisible()) {
click(jq("$rolePanel $lstClient ~ .z-combobox-btn"));
click(jq("$rolePanel $lstClient $GardenWorld"));
waitResponse();
}
click(jq("$rolePanel $lstRole ~ .z-combobox-btn"));
click(jq("$rolePanel $lstRole $GardenWorld\\\\ Admin"));
waitResponse();
click(jq("$rolePanel $lstOrganisation ~ .z-combobox-btn"));
click(jq("$rolePanel $lstOrganisation $HQ"));
click(jq("$rolePanel $Ok"));
waitResponse();
verifyEquals("GardenAdmin@GardenWorld.HQ/GardenWorld Admin", jq("$loginUserAndRole").text());
]]>
</client>
</case>
</test>

View File

@ -1,87 +0,0 @@
/* LoginTest.java
Purpose:
Description:
History:
Dec, 11, 2012 00:52:22 AM
Copyright (C) 2012 Potix Corporation. All Rights Reserved.
This program is distributed under Apache License Version 2.0 in the hope that
it will be useful, but WITHOUT ANY WARRANTY.
*/
package test;
import org.junit.Test;
import org.zkoss.ztl.JQuery;
import org.zkoss.ztl.Tags;
import org.zkoss.ztl.Widget;
import org.zkoss.ztl.ZKClientTestCase;
import org.zkoss.ztl.util.ConfigHelper;
import org.zkoss.ztl.util.ZKSelenium;
import com.thoughtworks.selenium.Selenium;
import com.thoughtworks.selenium.SeleniumException;
@Tags(tags = "login")
public class LoginTest extends ZKClientTestCase {
public LoginTest() {
target = "";
browsers = getBrowsers("firefox");
_timeout = 10000;
caseID = getClass().getSimpleName();
}
@Test(expected = AssertionError.class)
public void testlogin() {
for (Selenium browser : browsers) {
try {
start(browser);
windowFocus();
windowMaximize();
Widget engine = new Widget(new StringBuffer("zk.Desktop._dt"));
// remove all of unnecessary children
if (target.endsWith("/service.zul"))
removeChildren(engine.firstChild());
/** start **/
/** client code **/
type(jq("$loginPanel $txtUserId"), "GardenAdmin");
type(jq("$loginPanel $txtPassword"), "GardenAdmin");
click(widget(jq("$loginPanel $chkSelectRole")).$n("real"));
click(jq("$loginPanel $Ok"));
waitResponse();
JQuery lstClient = jq("$rolePanel $lstClient");
if (lstClient.exists() && lstClient.isVisible()) {
click(jq("$rolePanel $lstClient ~ .z-combobox-btn"));
click(jq("$rolePanel $lstClient $GardenWorld"));
waitResponse();
}
click(jq("$rolePanel $lstRole ~ .z-combobox-btn"));
click(jq("$rolePanel $lstRole $GardenWorld\\\\ Admin"));
waitResponse();
click(jq("$rolePanel $lstOrganisation ~ .z-combobox-btn"));
click(jq("$rolePanel $lstOrganisation $HQ"));
click(jq("$rolePanel $Ok"));
waitResponse();
verifyEquals("GardenAdmin@GardenWorld.HQ/GardenWorld Admin", jq("$loginUserAndRole").text());
/** end **/
} catch (SeleniumException e) {
ZKSelenium zbrowser = ((ZKSelenium) browser);
ConfigHelper.getInstance().clearCache(zbrowser);
zbrowser.shutdown();
throw e;
} finally {
stop();
}
}
}
}