@winning-test/component 0.0.4 → 0.0.5
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@winning-test/component",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "",
|
|
6
6
|
"scripts": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"author": "",
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@winning-test/autotest-webui": "^0.1.
|
|
16
|
+
"@winning-test/autotest-webui": "^0.1.35"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/jest": "^29.5.1",
|
|
@@ -87,7 +87,7 @@ class Component extends require("@winning-test/autotest-webui/src/Component") {
|
|
|
87
87
|
* @param {Number} timeout 等待时间, 单位: ms
|
|
88
88
|
*/
|
|
89
89
|
async isDisplayed(timeout) {
|
|
90
|
-
await this.browser.isDisplayed(this.getXpath(), timeout);
|
|
90
|
+
return await this.browser.isDisplayed(this.getXpath(), timeout);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/**
|
|
@@ -10,8 +10,8 @@ beforeAll(async () => {
|
|
|
10
10
|
|
|
11
11
|
test("input/button/text", async () => {
|
|
12
12
|
const page = new Page(browser);
|
|
13
|
-
await page.inputComponent("在此键入您的工号/账号").input(config.username);
|
|
14
|
-
await page.inputComponent("请输入您的密码").input(config.password);
|
|
13
|
+
await page.inputComponent("在此键入您的工号/账号").input(config.user.admin.username);
|
|
14
|
+
await page.inputComponent("请输入您的密码").input(config.user.admin.password);
|
|
15
15
|
await page.buttonComponent("登录").click();
|
|
16
16
|
if (await page.messageComponent("未经处理的异常").isDisplayed(1000)){
|
|
17
17
|
await page.buttonComponent("登录").click();
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"url": "http://172.18.0.66/portal/#/index",
|
|
3
|
-
"
|
|
4
|
-
|
|
3
|
+
"user": {
|
|
4
|
+
"admin": {
|
|
5
|
+
"username": "admin",
|
|
6
|
+
"password": "winning@300253"
|
|
7
|
+
},
|
|
8
|
+
"doctor": {
|
|
9
|
+
"username": "224",
|
|
10
|
+
"password": "abcd@1234"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
5
13
|
}
|