-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ZK-5354: Update animation implementation to avoid iframe reloading
- Loading branch information
1 parent
00bdb92
commit 9429005
Showing
8 changed files
with
165 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
27 changes: 27 additions & 0 deletions
27
zktest/src/main/java/org/zkoss/zktest/test2/F100_ZK_5354VM.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,27 @@ | ||
/* F100_ZK_5354VM.java | ||
Purpose: | ||
Description: | ||
History: | ||
Wed Sep 06 15:27:17 CST 2023, Created by rebeccalai | ||
Copyright (C) 2023 Potix Corporation. All Rights Reserved. | ||
*/ | ||
package org.zkoss.zktest.test2; | ||
|
||
import org.zkoss.bind.annotation.Init; | ||
|
||
public class F100_ZK_5354VM { | ||
private static int initCount = 0; | ||
|
||
public int getInitCount() { | ||
return initCount; | ||
} | ||
|
||
@Init | ||
public void init() { | ||
initCount++; | ||
} | ||
} |
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,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
F100-ZK-5354-1.zul | ||
Purpose: | ||
Description: | ||
History: | ||
Thu Sep 07 10:23:16 CST 2023, Created by rebeccalai | ||
Copyright (C) 2023 Potix Corporation. All Rights Reserved. | ||
--> | ||
<zk> | ||
<div viewModel="@id('vm') @init('org.zkoss.zktest.test2.F100_ZK_5354VM')"> | ||
initCount = <label id="initCount" value="@load(vm.initCount)"/> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
F100-ZK-5354-2.zul | ||
Purpose: | ||
Description: | ||
History: | ||
Thu Sep 07 11:25:36 CST 2023, Created by rebeccalai | ||
Copyright (C) 2023 Potix Corporation. All Rights Reserved. | ||
--> | ||
<zk> | ||
<label multiline="true"> | ||
1. click the second tab to expand | ||
2. click the third tab to expand | ||
3. no js error (else bug exists) | ||
</label> | ||
<tabbox mold="accordion"> | ||
<tabs> | ||
<tab iconSclass="z-icon-users" label="First tab"/> | ||
<tab iconSclass="z-icon-graduation-cap" label="Second tab"/> | ||
<tab iconSclass="z-icon-star-half-o" label="Third tab"/> | ||
</tabs> | ||
<tabpanels> | ||
<tabpanel> | ||
<ckeditor id="ck1" height="100%" width="100%" /> | ||
</tabpanel> | ||
<tabpanel> | ||
<ckeditor id="ck2" height="100%" width="100%" /> | ||
</tabpanel> | ||
<tabpanel> | ||
<ckeditor id="ck3" height="100%" width="100%"/> | ||
</tabpanel> | ||
</tabpanels> | ||
</tabbox> | ||
<custom-attributes org.zkoss.zul.client.rod="false" /> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
F100-ZK-5354.zul | ||
Purpose: | ||
Description: | ||
History: | ||
Tue Aug 22 11:38:29 CST 2023, Created by rebeccalai | ||
Copyright (C) 2023 Potix Corporation. All Rights Reserved. | ||
--> | ||
<zk> | ||
<label multiline="true"> | ||
1. click the angle icon to collapse east | ||
2. click the angle icon to expand east | ||
3. initCount should remain unchanged (else bug exists) | ||
</label> | ||
<borderlayout> | ||
<center> | ||
center | ||
</center> | ||
<east collapsible="true" title="iframe"> | ||
<iframe src="F100-ZK-5354-1.zul"/> | ||
</east> | ||
</borderlayout> | ||
</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
45 changes: 45 additions & 0 deletions
45
zktest/src/test/java/org/zkoss/zktest/zats/test2/F100_ZK_5354Test.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,45 @@ | ||
/* F100_ZK_5354Test.java | ||
Purpose: | ||
Description: | ||
History: | ||
Tue Sep 05 13:47:51 CST 2023, Created by rebeccalai | ||
Copyright (C) 2023 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; | ||
|
||
public class F100_ZK_5354Test extends WebDriverTestCase { | ||
@Test | ||
public void test1() throws Exception { | ||
connect(); | ||
waitResponse(); | ||
String initCountBefore = jq("@iframe").contents().find("span").text(); | ||
click(jq(".z-icon-angle-double-right")); | ||
waitResponse(); | ||
click(jq(".z-icon-angle-double-left")); | ||
waitResponse(); | ||
String initCountAfter = jq("@iframe").contents().find("span").text(); | ||
System.out.println(initCountBefore + " vs " + initCountAfter); | ||
assertEquals(initCountBefore, initCountAfter); | ||
} | ||
|
||
@Test | ||
public void test2() throws Exception { | ||
connect("/test2/F100-ZK-5354-2.zul"); | ||
waitResponse(); | ||
click(jq("@tab:eq(1)")); | ||
waitResponse(); | ||
click(jq("@tab:eq(2)")); | ||
waitResponse(); | ||
assertNoJSError(); | ||
} | ||
} |