-
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-5025: redundant selection highlight on a menupopup
- Loading branch information
1 parent
1d12dfb
commit 940b82b
Showing
8 changed files
with
155 additions
and
31 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,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
B100-ZK-5025.zul | ||
Purpose: | ||
Description: | ||
History: | ||
Tue Sep 05 11:12:30 CST 2023, Created by jamson | ||
Copyright (C) 2023 Potix Corporation. All Rights Reserved. | ||
--> | ||
<zk> | ||
<menubar> | ||
<menu label="Nested"> | ||
<menupopup> | ||
<menuitem label="F1R1"/> | ||
<menuitem label="F1R2"/> | ||
<menu label="F1R3"> | ||
<menupopup> | ||
<menuitem label="F2R1"/> | ||
<menuitem label="F2R2"/> | ||
<menuitem label="F2R3"/> | ||
</menupopup> | ||
</menu> | ||
</menupopup> | ||
</menu> | ||
</menubar> | ||
</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
64 changes: 64 additions & 0 deletions
64
zktest/src/test/java/org/zkoss/zktest/zats/test2/B100_ZK_5025Test.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,64 @@ | ||
/* B100_ZK_5025Test.java | ||
Purpose: | ||
Description: | ||
History: | ||
Fri Sep 08 14:22:26 CST 2023, Created by jamson | ||
Copyright (C) 2023 Potix Corporation. All Rights Reserved. | ||
*/ | ||
package org.zkoss.zktest.zats.test2; | ||
|
||
import org.junit.jupiter.api.Assertions; | ||
import org.junit.jupiter.api.Test; | ||
import org.openqa.selenium.Keys; | ||
import org.openqa.selenium.interactions.Actions; | ||
|
||
import org.zkoss.test.webdriver.WebDriverTestCase; | ||
import org.zkoss.test.webdriver.ztl.JQuery; | ||
|
||
|
||
public class B100_ZK_5025Test extends WebDriverTestCase { | ||
@Test | ||
public void test(){ | ||
Actions actions = new Actions(connect()); | ||
|
||
JQuery menu1 = jq(".z-menu"), | ||
menu2 = jq("@menu:eq(1)"), | ||
menuitem1 = jq("@menuitem:eq(0)"), | ||
menuitem2 = jq("@menuitem:eq(1)"); | ||
|
||
// open menu1 | ||
actions.moveToElement(toElement(menu1)); | ||
click(menu1); | ||
Assertions.assertTrue(menuitem1.attr("class").equals("z-menuitem")); | ||
Assertions.assertTrue(menuitem2.attr("class").equals("z-menuitem")); | ||
Assertions.assertTrue(menu2.attr("class").equals("z-menu")); | ||
|
||
// hover to menuitem1 | ||
actions.moveToElement(toElement(menuitem1)).build().perform(); | ||
Assertions.assertTrue(menuitem1.attr("class").equals("z-menuitem z-menuitem-hover")); // highlight should be here only | ||
Assertions.assertTrue(menuitem2.attr("class").equals("z-menuitem")); | ||
Assertions.assertTrue(menu2.attr("class").equals("z-menu")); | ||
|
||
// keydomn:DOWN to menuitem2 | ||
actions.keyDown(Keys.DOWN).perform(); | ||
Assertions.assertTrue(menuitem1.attr("class").equals("z-menuitem")); | ||
Assertions.assertTrue(menuitem2.attr("class").equals("z-menuitem z-menuitem-focus")); // highlight should be here only | ||
Assertions.assertTrue(menu2.attr("class").equals("z-menu")); | ||
|
||
// keydomn:DOWN to menu2 | ||
actions.keyDown(Keys.DOWN).perform(); | ||
Assertions.assertTrue(menuitem1.attr("class").equals("z-menuitem")); | ||
Assertions.assertTrue(menuitem2.attr("class").equals("z-menuitem")); | ||
Assertions.assertTrue(menu2.attr("class").equals("z-menu z-menu-focus")); // highlight should be here only | ||
|
||
// hover to menuitem2 | ||
actions.moveToElement(toElement(menuitem2)).build().perform(); | ||
Assertions.assertTrue(menuitem1.attr("class").equals("z-menuitem")); | ||
Assertions.assertTrue(menuitem2.attr("class").equals("z-menuitem z-menuitem-hover")); // highlight should be here only | ||
Assertions.assertTrue(menu2.attr("class").equals("z-menu")); | ||
} | ||
} |
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
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