@winning-test/component 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -96,6 +96,18 @@ class Component extends require("@winning-test/autotest-webui/src/Component") {
|
|
|
96
96
|
async scrollIntoView() {
|
|
97
97
|
(await this.browser.findElement(this.getXpath())).scrollIntoView();
|
|
98
98
|
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* 右击
|
|
102
|
+
*/
|
|
103
|
+
async contextClick() {
|
|
104
|
+
const { By, until } = require("selenium-webdriver");
|
|
105
|
+
const xpath = this.getXpath();
|
|
106
|
+
await this.browser.webDriver.wait(until.elementLocated(By.xpath(xpath)), this.browser.config.timeout);
|
|
107
|
+
let actions = this.browser.webDriver.actions();
|
|
108
|
+
actions.contextClick(await this.browser.webDriver.findElement(By.xpath(xpath)))
|
|
109
|
+
await actions.perform();
|
|
110
|
+
}
|
|
99
111
|
}
|
|
100
112
|
|
|
101
113
|
module.exports = Component;
|
|
@@ -18,7 +18,7 @@ test("input/button/text", async () => {
|
|
|
18
18
|
}
|
|
19
19
|
})
|
|
20
20
|
|
|
21
|
-
test("dialog/checkbox", async () => {
|
|
21
|
+
test.skip("dialog/checkbox", async () => {
|
|
22
22
|
const page = new Page(browser);
|
|
23
23
|
await page.blockComponent(null, "//*[@class='application-name']").click();
|
|
24
24
|
await page.textComponent("门诊医生站").click();
|
|
@@ -29,7 +29,7 @@ test("dialog/checkbox", async () => {
|
|
|
29
29
|
await page.dialogComponent("就诊科目").buttonComponent("确定").click();
|
|
30
30
|
})
|
|
31
31
|
|
|
32
|
-
test("blockComponent/table/select/list", async () => {
|
|
32
|
+
test.skip("blockComponent/table/select/list", async () => {
|
|
33
33
|
const page = new Page(browser);
|
|
34
34
|
await page.textComponent("患者列表").click();
|
|
35
35
|
await page.blockComponent("header-search").waitUntilBeVisible();
|
|
@@ -38,7 +38,7 @@ test("blockComponent/table/select/list", async () => {
|
|
|
38
38
|
await page.blockComponent("header-search").selectComponent(null, "时间筛选").select("本月");
|
|
39
39
|
})
|
|
40
40
|
|
|
41
|
-
test("switch", async () => {
|
|
41
|
+
test.skip("switch", async () => {
|
|
42
42
|
const page = new Page(browser);
|
|
43
43
|
await page.blockComponent(null, "//*[@class='application-name']").click();
|
|
44
44
|
await page.textComponent("配置管理").click();
|