-
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.
Merge branch 'master' into B100-ZK-5522
- Loading branch information
Showing
10 changed files
with
137 additions
and
3 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
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
17 changes: 17 additions & 0 deletions
17
zktest/src/main/java/org/zkoss/zktest/test2/B100_ZK_5569Composer.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,17 @@ | ||
package org.zkoss.zktest.test2; | ||
|
||
import org.zkoss.zk.ui.Component; | ||
import org.zkoss.zk.ui.event.CheckEvent; | ||
import org.zkoss.zk.ui.select.SelectorComposer; | ||
import org.zkoss.zk.ui.select.annotation.Listen; | ||
import org.zkoss.zk.ui.util.Clients; | ||
import org.zkoss.zul.Radio; | ||
|
||
public class B100_ZK_5569Composer extends SelectorComposer<Component> { | ||
private static final long serialVersionUID = 1L; | ||
|
||
@Listen("onCheck = #categorySelector") | ||
public void selectCategory(CheckEvent event) { | ||
Clients.log(event.getName() + ": " + ((Radio) event.getTarget()).getLabel()); | ||
} | ||
} |
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,13 @@ | ||
<zk> | ||
<window apply="org.zkoss.zktest.test2.B100_ZK_5569Composer"> | ||
<label>click any radio, should see correct label in zk log and no exception</label> | ||
<radiogroup id="categorySelector"> | ||
<hlayout width="100%"> | ||
<radio label="All Food" checked="true" width="90px" /> | ||
<radio label="Vegetables" width="90px" /> | ||
<radio label="Seafood" width="90px" /> | ||
<radio label="Fruits" width="90px" /> | ||
</hlayout> | ||
</radiogroup> | ||
</window> | ||
</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
39 changes: 39 additions & 0 deletions
39
zktest/src/test/java/org/zkoss/zktest/zats/test2/B100_ZK_5569Test.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,39 @@ | ||
package org.zkoss.zktest.zats.test2; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import org.zkoss.test.webdriver.WebDriverTestCase; | ||
import org.zkoss.test.webdriver.ztl.JQuery; | ||
import org.zkoss.test.webdriver.ztl.Widget; | ||
|
||
public class B100_ZK_5569Test extends WebDriverTestCase { | ||
@Test | ||
public void test() { | ||
connect(); | ||
JQuery jqRadio = jq("@radio"); | ||
check(jqRadio.eq(1)); | ||
waitResponse(); | ||
assertEquals("onCheck: Vegetables", getZKLog()); | ||
assertNoAnyError(); | ||
closeZKLog(); | ||
check(jqRadio.eq(2)); | ||
waitResponse(); | ||
assertEquals("onCheck: Seafood", getZKLog()); | ||
assertNoAnyError(); | ||
closeZKLog(); | ||
check(jqRadio.eq(3)); | ||
waitResponse(); | ||
assertEquals("onCheck: Fruits", getZKLog()); | ||
assertNoAnyError(); | ||
closeZKLog(); | ||
check(jqRadio.eq(0)); | ||
waitResponse(); | ||
assertEquals("onCheck: All Food", getZKLog()); | ||
assertNoAnyError(); | ||
closeZKLog(); | ||
} | ||
} |
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
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