-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ZK-5696: Nested Shadow element fails in ZK 10
- Loading branch information
1 parent
eb20a95
commit 720f183
Showing
4 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- | ||
B101-ZK-5696.zul | ||
Purpose: | ||
Description: | ||
History: | ||
2024/9/9, Created by jumperchen | ||
Copyright (C) 2024 Potix Corporation. All Rights Reserved. | ||
--> | ||
<zk> | ||
<zscript><![CDATA[ | ||
int counter = 0; | ||
ListModelList items = new ListModelList(); | ||
]]></zscript> | ||
<div apply="org.zkoss.bind.BindComposer"> | ||
<forEach items="@init(items)"> | ||
<div> | ||
<label value="${each}"/> | ||
<if test="@init(true)"> | ||
conditional | ||
</if> | ||
</div> | ||
</forEach> | ||
</div> | ||
<button onClick="items.add(++counter)" label="add"/> | ||
</zk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
zktest/src/test/java/org/zkoss/zktest/zats/test2/B101_ZK_5696Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* B101_ZK_5696Test.java | ||
Purpose: | ||
Description: | ||
History: | ||
11:58 AM 2024/9/9, Created by jumperchen | ||
Copyright (C) 2024 Potix Corporation. All Rights Reserved. | ||
*/ | ||
package org.zkoss.zktest.zats.test2; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import org.zkoss.test.webdriver.WebDriverTestCase; | ||
|
||
/** | ||
* @author jumperchen | ||
*/ | ||
public class B101_ZK_5696Test extends WebDriverTestCase { | ||
@Test | ||
public void test() { | ||
connect(); | ||
for (int i = 0; i < 5; ) { | ||
click(jq(".z-button")); | ||
waitResponse(); | ||
assertEquals(1, jq(".z-label:contains(" + ++i + ")").length()); | ||
assertEquals(i, jq(".z-label:contains(conditional)").length()); | ||
} | ||
} | ||
} |