Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

New 20130329 #52

Merged
merged 2 commits into from

2 participants

@huangnoah

No description provided.

@leeyt leeyt merged commit 113e794 into leeyt:master
@leeyt
Owner

accept

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 29, 2013
  1. @huangnoah

    add 8 cases

    huangnoah authored
  2. @huangnoah

    add IE only B65-ZK-1642.zul

    huangnoah authored
This page is out of date. Refresh to see the latest.
View
100 zstl/test/org/zkoss/zktest/test2/B65/B65_ZK_1278Test.scala
@@ -0,0 +1,100 @@
+package org.zkoss.zktest.test2.B65
+
+import org.zkoss.ztl.Tags
+import org.zkoss.zstl.ZTL4ScalaTestCase
+
+@Tags(tags = "B65-ZK-1278.zul")
+class B65_ZK_1278Test extends ZTL4ScalaTestCase {
+
+ def testClick() = {
+ val zscript = """
+<zk>
+<script>
+zk.afterMount(function () {
+setTimeout(function () {
+jq('#zk_log')[0].rows = 50;
+}, 1000);
+});
+</script>
+<label multiline="true">
+1. Please open the "A" and then "B"
+2. If the log information are added too much that is a bug. (the log textbox should not appear the scrollbar)
+</label>
+<tree id="aggregationTree" zclass="z-dottree" mold="paging"
+height="100%" width="100%" multiple="false" vflex="true"
+hflex="true" style="border:none" renderdefer="0">
+<treecols sizable="true">
+<treecol label="Column Lable"/>
+</treecols>
+</tree>
+<zscript><![CDATA[
+public class SimpleTreeTestModel extends AbstractTreeModel {
+ private static final long serialVersionUID = 1L;
+
+ private static final String ROOT = "root";
+ private static final int LEVELS = 6;
+ public SimpleTreeTestModel() {
+ super(ROOT);
+ }
+
+ public Object getChild(Object arg0, int arg1) {
+ Clients.log("getChild() - Arg0: " + arg0 + ", Arg1: " +arg1);
+
+ if (arg0.equals(ROOT)) {
+ switch (arg1) {
+ case 0 : return "A";
+ case 1 : return "B";
+ case 2 : return "C";
+ case 3 : return "D";
+ case 4 : return "E";
+ default : return "IMPOSSIBLE";
+ }
+ }
+ else {
+ // E.g. A22222.
+ return arg0 + arg1;
+ }
+ }
+
+ public int getChildCount(Object arg0) {
+ Clients.log("getChildCount() - Arg0: " + arg0);
+
+ if (arg0.equals(ROOT)) {
+ return 5;
+ }
+
+ if (arg0.length() <= LEVELS) {
+ return 3;
+ }
+
+ // Impossible.
+ return 0;
+ }
+
+ public boolean isLeaf(Object arg0) {
+ //Clients.log("isLeaf() - Arg0: " + arg0);
+
+ if (arg0.equals(ROOT)) {
+ return false;
+ }
+
+ // E.g. A00000
+ return arg0.length() == LEVELS;
+ }
+}
+aggregationTree.setModel(new SimpleTreeTestModel());
+]]></zscript>
+</zk>
+"""
+ runZTL(zscript,
+ () => {
+ click(jq(".z-treecell:contains(A) .z-dottree-root-close"))
+ waitResponse()
+ click(jq(".z-treecell:contains(B) .z-dottree-root-close"))
+ waitResponse()
+ val log = jq("#zk_log")
+ verifyEquals("the log textbox should not appear the scrollbar", log.scrollTop() <= log.height())
+ })
+
+ }
+}
View
89 zstl/test/org/zkoss/zktest/test2/B65/B65_ZK_1597Test.scala
@@ -0,0 +1,89 @@
+package org.zkoss.zktest.test2.B65
+
+import org.zkoss.ztl.Tags
+import org.zkoss.zstl.ZTL4ScalaTestCase
+
+@Tags(tags = "B65-ZK-1597.zul")
+class B65_ZK_1597Test extends ZTL4ScalaTestCase {
+
+ def testClick() = {
+ val zscript = """
+<zk>
+ <window title="Hello World!!" border="normal" width="800px"
+ height="500px">
+ <zscript>ListModelList model = new ListModelList();
+ model.add("a");
+ model.add("b");
+ model.add("c");</zscript>
+ <tabbox hflex="1" vflex="1">
+ <tabs>
+ <tab id="tab" label="tab 1" droppable="true" draggable="true">
+ <attribute name="onDrop">
+ DropEvent evt = (DropEvent) event;
+ Component dragged = evt.getDragged();
+ Component target = evt.getTarget();
+ dragged.getParent().insertBefore(dragged, target);
+ dragged.selected= true;
+ </attribute>
+ </tab>
+ <tab label="Items" draggable="true" droppable="true" id="tabItems">
+ <attribute name="onDrop">
+ DropEvent evt = (DropEvent) event;
+ Component dragged = evt.getDragged();
+ Component target = evt.getTarget();
+ dragged.getParent().insertBefore(dragged, target);
+ dragged.selected= true;
+ </attribute>
+ </tab>
+ </tabs>
+ <tabpanels>
+ <tabpanel>
+ <label multiline="true">
+ 1, Please select the tab "Items".
+ 2, Drag the tab "Items" to prev of "tab 1" and drop it.
+ 3, The tab "Items" should be selected and the content displays the first tabpanel.
+ </label>
+ </tabpanel>
+ <tabpanel>
+ <borderlayout height="100%" width="100%">
+ <north size="30px" flex="true" splittable="true" minsize="30" maxsize="30" >
+ <combobox />
+ </north>
+ <center autoscroll="true">
+ <listbox id="listbox" model="${model}" >
+ <listhead>
+ <listheader label="id" />
+ <listheader label="descricao" />
+ </listhead>
+ </listbox>
+ </center>
+ </borderlayout>
+ </tabpanel>
+ </tabpanels>
+ </tabbox>
+ </window>
+</zk>"""
+ runZTL(zscript,
+ () => {
+ val position = "2,2"
+ val src = jq(".z-tab:contains(Items)")
+ val target = jq(".z-tab:contains(tab 1)")
+ mouseMoveAt(src, position)
+ waitResponse
+
+ mouseDownAt(src, position)
+ waitResponse
+
+ mouseMoveAt(target, position)
+ waitResponse
+
+ mouseUpAt(target, position)
+ waitResponse
+
+
+ verifyEquals("The tab 'Items' should be selected and the content displays the first tabpanel.", jq(".z-tab:eq(0)").text() == "Items")
+ verifyEquals("The tab 'Items' should be selected and the content displays the first tabpanel.", jq(".z-tabpanel:eq(0) .z-label:contains(1)").exists())
+ })
+
+ }
+}
View
85 zstl/test/org/zkoss/zktest/test2/B65/B65_ZK_1612Test.scala
@@ -0,0 +1,85 @@
+package org.zkoss.zktest.test2.B65
+
+import org.zkoss.ztl.Tags
+import org.zkoss.zstl.ZTL4ScalaTestCase
+
+@Tags(tags = "B65-ZK-1612.zul")
+class B65_ZK_1612Test extends ZTL4ScalaTestCase {
+
+ def testClick() = {
+ val zscript = """
+<zk>
+
+<zscript><![CDATA[
+void changeTitle(org.zkoss.zul.Panel thePanel)
+{
+ thePanel.setTitle("Dropped!");
+}
+
+ ]]>
+ </zscript>
+<label multiline="true">
+1. Please click the "Button Image"
+2. You should see a dialog and close it.
+3. Please drag the "Button Image" into the window of the right side panel.
+4. You should see the title of the right side panel is changed.
+</label>
+ <window width="800px" height="800px" border="normal" title="test">
+ <grid>
+ <rows>
+ <row>
+ <panel id="panel1" title="PANEL1" droppable="ABC" onDrop="changeTitle(panel1);">
+ <panelchildren>
+ <window width="200px" height="200px" border="normal" draggable="ABC">
+ <toolbarbutton image="/img/button.png" onClick="alert(1)">
+
+ </toolbarbutton>
+ </window>
+ </panelchildren>
+ </panel>
+
+ <panel id="panel2" title="PANEL2" droppable="ABC" onDrop="changeTitle(panel2);">
+ <panelchildren>
+ <window width="200px" height="200px" border="normal" draggable="ABC" />
+ </panelchildren>
+ </panel>
+ </row>
+ </rows>
+ </grid>
+ </window>
+
+</zk>
+"""
+ runZTL(zscript,
+ () => {
+ val img = jq("img[src*=button]")
+
+ click(img)
+ waitResponse()
+ verifyTrue("You should see a dialog", jq(".z-messagebox-window").exists())
+
+ click(jq(".z-button"))
+ waitResponse()
+
+ val header = jq(".z-panel-header:eq(1)")
+ val headerText = header.text()
+
+ val position = "2,2"
+ val target = jq(".z-panel-body:eq(1)")
+ mouseMoveAt(img, position)
+ waitResponse
+
+ mouseDownAt(img, position)
+ waitResponse
+
+ mouseMoveAt(target, position)
+ waitResponse
+
+ mouseUpAt(target, position)
+ waitResponse
+
+ verifyTrue("You should see the title of the right side panel is changed.", header.text() != headerText)
+ })
+
+ }
+}
View
75 zstl/test/org/zkoss/zktest/test2/B65/B65_ZK_1617Test.scala
@@ -0,0 +1,75 @@
+package org.zkoss.zktest.test2.B65
+
+import org.zkoss.ztl.Tags
+import org.zkoss.zstl.ZTL4ScalaTestCase
+
+@Tags(tags = "B65-ZK-1617.zul")
+class B65_ZK_1617Test extends ZTL4ScalaTestCase {
+
+ def testClick() = {
+ val zscript = """<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+B65-ZK-1617.zul
+
+ Purpose:
+
+ Description:
+
+ History:
+ Fri, Feb 08, 2013 10:02:33 AM, Created by jumperchen
+
+Copyright (C) 2013 Potix Corporation. All Rights Reserved.
+
+-->
+<div>
+ <label multiline="true">
+ 1. Please click the 'Rename' button.
+ 2. Try to drag the title of the panel, and it should be able to drag and drop.
+ </label>
+ <button id="btn" label="Rename" onClick="onClick()"/>
+ <portallayout>
+ <portalchildren>
+ <panel id="panel" title="Change Me" border="normal">
+ <panelchildren>
+ <div style="display:block;" width="400px" height="300px"/>
+ </panelchildren>
+ </panel>
+ </portalchildren>
+ </portallayout>
+ <zscript>
+ public void onClick() {
+ panel.setTitle("Change Title");
+ }
+ </zscript>
+</div>"""
+ runZTL(zscript,
+ () => {
+ val btn = jq(".z-button:contains(Rename)")
+ click(btn)
+ waitResponse()
+
+ val position = "2,2"
+ val src = jq(".z-panel-header")
+
+ val top = src.offsetTop()
+
+ mouseMoveAt(src, position)
+ waitResponse
+
+ mouseDownAt(src, position)
+ waitResponse
+
+ mouseMoveAt(btn, position)
+ waitResponse
+
+ verifyTrue("it should be able to drag and drop.", top != src.offsetTop())
+
+ mouseUpAt(btn, position)
+ waitResponse
+
+
+ })
+
+ }
+}
View
290 zstl/test/org/zkoss/zktest/test2/B65/B65_ZK_1632Test.scala
@@ -0,0 +1,290 @@
+package org.zkoss.zktest.test2.B65
+
+import org.zkoss.ztl.Tags
+import org.zkoss.zstl.ZTL4ScalaTestCase
+import org.openqa.selenium.Keys
+
+@Tags(tags = "B65-ZK-1632.zul")
+class B65_ZK_1632Test extends ZTL4ScalaTestCase {
+
+ def testClick() = {
+ val zscript = """
+<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
+
+<zk xmlns="http://www.zkoss.org/2005/zul"
+ xmlns:h="http://www.w3.org/1999/xhtml"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd">
+ <window>
+ <label multiline="true">
+ 1. Please use "TAB" to focus each textbox and then the errorbox should appear.
+ 2. Please check if the textbox is out of the viewport, and then its errorbox should disappear.
+ </label>
+ <window id="win1" border="normal" width="100%" height ="600px" sizable="false" >
+ <borderlayout id="borderlayoutOriginatorRegistration" height="100%" >
+ <center border="normal" autoscroll="true">
+
+ <div id="orgDetailTabDiv" height="500px">
+
+ <grid sclass="GridLayoutNoBorder" fixedLayout="true" >
+ <columns>
+ <column width="500px" />
+ </columns>
+ <rows>
+ <row>
+ <hlayout>
+ <label value="textbox 1"></label>
+ <textbox width="150px" constraint="no empty: Textbox 1"></textbox>
+ </hlayout>
+ </row>
+
+ <row>
+ <hlayout>
+ <label value="textbox 2"></label>
+ <textbox width="150px" constraint="no empty: Textbox 2"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textbox 3"></label>
+ <textbox width="150px" constraint="no empty: Textbox 3"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textbox 4"></label>
+ <textbox width="150px" constraint="no empty: Textbox 4"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textbox 5"></label>
+ <textbox width="150px" constraint="no empty: Textbox 5"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textbox 6"></label>
+ <textbox width="150px" constraint="no empty: Textbox 6"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textbox 7"></label>
+ <textbox width="150px" constraint="no empty: Textbox 7"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textBox 8 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 8"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textBox 9 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 9"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textBox 10"></label>
+ <textbox width="150px" constraint="no empty: Textbox 10"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textBox 11"></label>
+ <textbox width="150px" constraint="no empty: Textbox 11"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textBox 12 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 12"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textBox 13 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 13"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textBox 14 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 14"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textBox 15"></label>
+ <textbox width="150px" constraint="no empty: Textbox 15"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textBox 16 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 16"></textbox>
+ </hlayout>
+ </row><row>
+ <hlayout>
+ <label value="textBox 17"></label>
+ <textbox width="150px" constraint="no empty: Textbox 17"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 18"></label>
+ <textbox width="150px" constraint="no empty: Textbox 18"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 19"></label>
+ <textbox width="150px" constraint="no empty: Textbox 19"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 20 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 20"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 21 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 21"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 22 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 22"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 23 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 23"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 24 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 24"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 25"></label>
+ <textbox width="150px" constraint="no empty: Textbox 25"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 26 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 26"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 27 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 27"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 28 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 28"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 29 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 29"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 30 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 30"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 31 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 31"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 32 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 32"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 33 "></label>
+ <textbox width="150px" constraint="no empty: Textbox 33"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 34"></label>
+ <textbox width="150px" constraint="no empty: Textbox 34"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 35"></label>
+ <textbox width="150px" constraint="no empty: Textbox 35"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 36"></label>
+ <textbox width="150px" constraint="no empty: Textbox 36"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 37"></label>
+ <textbox width="150px" constraint="no empty: Textbox 37"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 38"></label>
+ <textbox width="150px" constraint="no empty: Textbox 38"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 39"></label>
+ <textbox width="150px" constraint="no empty: Textbox 39"></textbox>
+ </hlayout>
+ </row>
+ <row>
+ <hlayout>
+ <label value="textBox 40s"></label>
+ <textbox width="150px" constraint="no empty: Textbox 40"></textbox>
+ </hlayout>
+ </row>
+
+
+ </rows>
+
+ </grid>
+
+
+ </div>
+ </center>
+
+ </borderlayout>
+ </window>
+ </window>
+
+</zk>
+
+"""
+ runZTL(zscript,
+ () => {
+ 0 to 20 foreach { i =>
+ sendKeys(jq(".z-textbox:eq(" + i + ")"), Keys.TAB)
+ }
+ waitResponse()
+ jq(".z-center-body").toElement().set("scrollTop", 3000)
+ jq(".z-center-body").toElement().set("scrollTop", 0)
+ verifyTrue("errorbox should disappear. ", jq(".z-errbox:contains(Textbox 1)").css("display") == "none")
+ })
+
+ }
+}
View
81 zstl/test/org/zkoss/zktest/test2/B65/B65_ZK_1642Test.scala
@@ -0,0 +1,81 @@
+package org.zkoss.zktest.test2.B65
+
+import org.zkoss.ztl.Tags
+import org.zkoss.zstl.ZTL4ScalaTestCase
+
+@Tags(tags = "B65-ZK-1642.zul")
+class B65_ZK_1642Test extends ZTL4ScalaTestCase {
+
+def testClick() = {
+ val zscript = """<zk>
+ <label multiline="true">
+ IE only
+ Should see header width of "col2" and "col3" are equal to its content width
+ </label>
+ <tree height="180px">
+ <treecols>
+ <treecol label="col1" hflex="1" />
+ <treecol label="col2" />
+ <treecol label="col3" />
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="Item 1" />
+ <treecell label="Item 1 description" />
+ <treecell label="Item 1 description" />
+ </treerow>
+ </treeitem>
+ <treeitem>
+ <treerow>
+ <treecell label="Item 2" />
+ <treecell label="Item 2 description" />
+ <treecell label="Item 1 description" />
+ </treerow>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="Item 2.1" />
+ <treecell label="Item 1 description" />
+ </treerow>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="Item 2.1.1" />
+ <treecell label="Item 1 description" />
+ </treerow>
+ </treeitem>
+ <treeitem>
+ <treerow>
+ <treecell label="Item 2.1.2" />
+ <treecell label="Item 1 description" />
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </treeitem>
+ <treeitem>
+ <treerow>
+ <treecell label="Item 2.2" />
+ <treecell label="Item 2.2 is something who cares" />
+ <treecell label="Item 1 description" />
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </treeitem>
+ <treeitem label="Item 3" />
+ </treechildren>
+ </tree>
+</zk>"""
+ runZTL(zscript,
+ () => {
+ val col1 = jq(".z-treecol:eq(0)")
+ val col2 = jq(".z-treecol:eq(1)")
+ val col3 = jq(".z-treecol:eq(2)")
+ print(col1.width(), col2.width(), col3.width())
+ verifyTrue("Should see header width of 'col2' and 'col3' are equal to its content width", (col1.width() - col2.width()).abs <= 3)
+ verifyTrue("Should see header width of 'col2' and 'col3' are equal to its content width", (col1.width() - col3.width()).abs <= 3)
+ verifyTrue("Should see header width of 'col2' and 'col3' are equal to its content width", (col2.width() - col3.width()).abs <= 3)
+ })
+
+ }
+}
View
43 zstl/test/org/zkoss/zktest/test2/B65/B65_ZK_1647Test.scala
@@ -0,0 +1,43 @@
+package org.zkoss.zktest.test2.B65
+
+import org.zkoss.ztl.Tags
+import org.zkoss.zstl.ZTL4ScalaTestCase
+
+@Tags(tags = "B65-ZK-1647.zul")
+class B65_ZK_1647Test extends ZTL4ScalaTestCase {
+
+ def testClick() = {
+ val zscript = """<zk>
+ <label multiline="true">
+ 1. Should not see horizontal scrollbar showed.
+ 2. Pink area should be twice as wide as the blue area.
+ </label>
+ <separator />
+ <hbox width="400px">
+ <tree hflex="1">
+ <treecols>
+ <treecol hflex="1" />
+ <treecol hflex="2" />
+ <treecol width="50px"/>
+ </treecols>
+ <treechildren>
+ <treeitem>
+ <treerow>
+ <treecell label="Item 1" style="background: cyan" />
+ <treecell label="Item 1" style="background: pink" />
+ <treecell label="Item 1" />
+ </treerow>
+ </treeitem>
+ </treechildren>
+ </tree>
+ </hbox>
+</zk>"""
+ runZTL(zscript,
+ () => {
+ verifyTrue("Should not see horizontal scrollbar showed.", jq(".z-tree-body").width() >= jq("z-treerow").width())
+ val diff = (jq(".z-treecell[style*=pink]").width() - 2 * jq(".z-treecell[style*=cyan]").width())
+ verifyTrue("Pink area should be twice as wide as the blue area.", diff <= 1)
+ })
+
+ }
+}
View
37 zstl/test/org/zkoss/zktest/test2/B65/B65_ZK_1679Test.scala
@@ -0,0 +1,37 @@
+package org.zkoss.zktest.test2.B65
+
+import org.zkoss.ztl.Tags
+import org.zkoss.zstl.ZTL4ScalaTestCase
+
+@Tags(tags = "B65-ZK-1679.zul")
+class B65_ZK_1679Test extends ZTL4ScalaTestCase {
+
+ def testClick() = {
+ val zscript = """<zk>
+ <label multiline="true">
+ 1. Resize the window
+ 2. If you see green background bar expand to window size, it is a bug.
+ </label>
+ <window sizable="true" mode="overlapped" title="win-div" border="normal" closable="true">
+ <vlayout>
+ <hlayout vflex="1" hflex="min" style="background:green">
+ <div style="background:yellow">
+ <image src="/img/msn2.gif" width="50px" height="50px" />
+ </div>
+ <div style="background:cyan">
+ <image src="/img/msn2.gif" width="50px" height="50px" />
+ </div>
+ </hlayout>
+ </vlayout>
+ </window>
+</zk>"""
+ runZTL(zscript,
+ () => {
+ dragAndDrop(jq(".z-window-overlapped-br"), "0,320")
+ waitResponse()
+ verifyTrue("you should not see green background bar expand to window size", (jq(".z-hlayout").height() - 50).abs < 5)
+ verifyTrue("you should not see green background bar expand to window size", (jq(".z-hlayout").width() - 105).abs < 5)
+ })
+
+ }
+}
View
3  ztl.ignore
@@ -289,3 +289,6 @@ Z60-F01416DefaultCommand.ztl
opera,chrome,safari,ie6={
Z60-B00775ListmodelSelection.ztl
}
+opera,chrome,safari,firefox*={
+B65-ZK-1642.zul
+}
Something went wrong with that request. Please try again.