增加 后端,后台管理系统,uniapp会员端的自动化测试。
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* 个人中心页 Page Object
|
||||
*/
|
||||
class ProfilePage {
|
||||
constructor(miniProgram) {
|
||||
this.mp = miniProgram;
|
||||
}
|
||||
|
||||
async waitForReady() {
|
||||
const page = await this.mp.currentPage();
|
||||
await page.waitFor(2000);
|
||||
console.log('个人中心页加载完成');
|
||||
}
|
||||
|
||||
async getPath() {
|
||||
const page = await this.mp.currentPage();
|
||||
return page.path;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员信息
|
||||
*/
|
||||
async getMemberInfo() {
|
||||
const page = await this.mp.currentPage();
|
||||
const data = await page.data();
|
||||
return data;
|
||||
}
|
||||
|
||||
async containsText(text) {
|
||||
const page = await this.mp.currentPage();
|
||||
const wxml = await page.wxml();
|
||||
return wxml.includes(text);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { ProfilePage };
|
||||
Reference in New Issue
Block a user