@winning-test/component 0.0.80 → 0.0.82
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.
|
@@ -31,7 +31,7 @@ class LeftMenuComponent extends require("./Component") {
|
|
|
31
31
|
if (xpath) {
|
|
32
32
|
await (await this.browser.findElement(xpath))._click(true);
|
|
33
33
|
}
|
|
34
|
-
xpath = `//*[@class='
|
|
34
|
+
xpath = `//*[@class='Left']//*[normalize-space(text())='${menuItems[menuItems.length - 1]}']`;
|
|
35
35
|
await this.browser.waitUntilElementBeVisible(xpath);
|
|
36
36
|
}
|
|
37
37
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@winning-test/component",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.82",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "",
|
|
6
6
|
"scripts": {
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"author": "",
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@types/jest": "^29.5.
|
|
17
|
-
"@winning-test/autotest-webui": "^0.1.
|
|
18
|
-
"chromedriver": "^118.0.
|
|
19
|
-
"jest": "^29.
|
|
16
|
+
"@types/jest": "^29.5.6",
|
|
17
|
+
"@winning-test/autotest-webui": "^0.1.52",
|
|
18
|
+
"chromedriver": "^118.0.1",
|
|
19
|
+
"jest": "^29.7.0"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/rpes5.6/page/Page.js
CHANGED
|
@@ -168,6 +168,32 @@ class Page extends require("@winning-test/autotest-webui").Page {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
+
/**
|
|
172
|
+
* 获取菜单组件
|
|
173
|
+
* @param {String} firstItem 大菜单项
|
|
174
|
+
* @returns 顶部菜单组件
|
|
175
|
+
*/
|
|
176
|
+
menuComponent(firstItem) {
|
|
177
|
+
let that = this;
|
|
178
|
+
class MenuComponent extends require("../component/TopMenuComponent") {
|
|
179
|
+
constructor(browser, firstItem) {
|
|
180
|
+
super(browser, firstItem);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* 选择菜单
|
|
185
|
+
* @param {String} menuItem 菜单项
|
|
186
|
+
*/
|
|
187
|
+
async select(menuItem) {
|
|
188
|
+
super.select(menuItem);
|
|
189
|
+
that.loading();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
}
|
|
194
|
+
return new MenuComponent(that.browser, firstItem)
|
|
195
|
+
}
|
|
196
|
+
|
|
171
197
|
}
|
|
172
198
|
|
|
173
199
|
module.exports = Page;
|