From 3c0091006f51bdf98161e18050fe19cfabdf4db2 Mon Sep 17 00:00:00 2001 From: James Chu Date: Thu, 5 Oct 2023 16:01:49 +0800 Subject: [PATCH] refine test case for F96_ZK_4330_2Test move B80_ZK_2888Test to ZTL (iphone, chrome issue) --- .../src/main/webapp/test2/config.properties | 2 +- .../zktest/zats/test2/B80_ZK_2888Test.java | 41 ------------------- .../zktest/zats/test2/F86_ZK_4184Test.java | 3 ++ .../zktest/zats/test2/F96_ZK_4330_2Test.java | 7 ++-- 4 files changed, 8 insertions(+), 45 deletions(-) delete mode 100644 zktest/src/test/java/org/zkoss/zktest/zats/test2/B80_ZK_2888Test.java diff --git a/zktest/src/main/webapp/test2/config.properties b/zktest/src/main/webapp/test2/config.properties index 8a0be72b1e6..9f50fabafa1 100644 --- a/zktest/src/main/webapp/test2/config.properties +++ b/zktest/src/main/webapp/test2/config.properties @@ -2012,7 +2012,7 @@ B70-ZK-2992.zul=A,E,Grid,Scrollbar,PE,iPad ##zats##B80-ZK-1696-tree-2.zul=A,H,Paging,Paginal,Pageable,rendering ##zats##B80-ZK-2760.zul=B,M,ZHTML,XHTML,input,Parser ##zats##B80-ZK-2912.zul=B,E,unless,EL,EL3.0,Label -##zats##B80-ZK-2888.zul=B,E,Javascript,UserAgent,iPhone,Chrome +##ztl##B80-ZK-2888.zul=B,E,Javascript,UserAgent,iPhone,Chrome ##Manually##B80-ZK-2872.zul=A,E,Dropupload,IE11 ##zats##B80-ZK-2874.zul=B,E,Bookmark,Redirect ##zats##B80-ZK-2911.zul=A,E,Custom-attributes,Page,EL diff --git a/zktest/src/test/java/org/zkoss/zktest/zats/test2/B80_ZK_2888Test.java b/zktest/src/test/java/org/zkoss/zktest/zats/test2/B80_ZK_2888Test.java deleted file mode 100644 index 34d39d31f5e..00000000000 --- a/zktest/src/test/java/org/zkoss/zktest/zats/test2/B80_ZK_2888Test.java +++ /dev/null @@ -1,41 +0,0 @@ -/* B80_ZK_2888Test.java - - Purpose: - - Description: - - History: - 3:20 PM 12/22/15, Created by jumperchen - -Copyright (C) 2015 Potix Corporation. All Rights Reserved. -*/ -package org.zkoss.zktest.zats.test2; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -import java.util.Collections; - -import org.junit.jupiter.api.Test; -import org.openqa.selenium.chrome.ChromeOptions; - -import org.zkoss.test.webdriver.WebDriverTestCase; - -/** - * @author jumperchen - */ -public class B80_ZK_2888Test extends WebDriverTestCase { - @Override - protected ChromeOptions getWebDriverOptions() { - return super.getWebDriverOptions() - .setExperimentalOption("mobileEmulation", Collections.singletonMap("deviceName", "iPad")); - } - - @Test - public void testZK2888() { - connect(); - waitResponse(); - assertEquals( - "You should see true below. (iphone with chrome only)true", - trim(jq("@label").text())); - } -} diff --git a/zktest/src/test/java/org/zkoss/zktest/zats/test2/F86_ZK_4184Test.java b/zktest/src/test/java/org/zkoss/zktest/zats/test2/F86_ZK_4184Test.java index ced41e24753..0bc82a7edfb 100644 --- a/zktest/src/test/java/org/zkoss/zktest/zats/test2/F86_ZK_4184Test.java +++ b/zktest/src/test/java/org/zkoss/zktest/zats/test2/F86_ZK_4184Test.java @@ -32,6 +32,7 @@ public void test() { testUpdate(); // Test 4 more times for (int i = 0; i < 4; i++) { + System.out.println(">>>> test -> " + (i + 1)); closeAuAlert(); testUpdate(); } @@ -45,7 +46,9 @@ private void testUpdate() { private void closeAuAlert() { JQuery $aualert = jq("$aualert"); + System.out.println(">>>> closeAuAlert is called!"); if ($aualert.isVisible()) { + System.out.println(">>>> closeAuAlert: try to close"); click($aualert.find("@button")); waitResponse(); } diff --git a/zktest/src/test/java/org/zkoss/zktest/zats/test2/F96_ZK_4330_2Test.java b/zktest/src/test/java/org/zkoss/zktest/zats/test2/F96_ZK_4330_2Test.java index d98606d0009..668a83daf25 100644 --- a/zktest/src/test/java/org/zkoss/zktest/zats/test2/F96_ZK_4330_2Test.java +++ b/zktest/src/test/java/org/zkoss/zktest/zats/test2/F96_ZK_4330_2Test.java @@ -36,9 +36,10 @@ public void test() { waitResponse(); click(selAllBtn); click(selCountBtn); - Assertions.assertFalse(tree1.find(".z-treecol-checkable").hasClass("z-treecol-checked")); - Assertions.assertFalse(tree2.find(".z-treecol-checkable").hasClass("z-treecol-checked")); - Assertions.assertFalse(tree3.find(".z-treecol-checkable").hasClass("z-treecol-checked")); + waitResponse(); + Assertions.assertTrue(tree1.find(".z-treecol-checkable").hasClass("z-treecol-checked")); + Assertions.assertTrue(tree2.find(".z-treecol-checkable").hasClass("z-treecol-checked")); + Assertions.assertTrue(tree3.find(".z-treecol-checkable").hasClass("z-treecol-checked")); click(jq("@button:eq(1)")); click(jq("@button:eq(5)")); click(selAllBtn);