提交 cf6dc0a4 编写于 作者: DCloud-yinjiacheng's avatar DCloud-yinjiacheng

更新getCurrentPages示例和自动化测试用例

上级 738eee47
......@@ -2367,10 +2367,6 @@
// #endif
],
"globalStyle": {
// #ifdef APP-ANDROID
"hideStatusBar": false,
"hideBottomNavigationIndicator": false,
// #endif
"pageOrientation": "portrait",
"navigationBarTitleText": "Hello uniapp x",
"navigationBarTextStyle": "@navigationBarTextStyle",
......
......@@ -69,13 +69,22 @@ describe('getCurrentPages', () => {
}});
// setPageStyle
await page.callMethod('setPageStyle', {
androidThreeButtonNavigationTranslucent: true
});
await page.waitFor(2000);
const image4 = await program.screenshot({ deviceShot: true });
expect(image4).toSaveImageSnapshot({customSnapshotIdentifier() {
return 'get-current-pages-test-androidThreeButtonNavigationTranslucent'
}});
await page.callMethod('setPageStyle', {
hideBottomNavigationIndicator: true,
hideStatusBar: true
})
await page.waitFor(500)
const image4 = await program.screenshot({fullPage: true});
expect(image4).toSaveImageSnapshot({customSnapshotIdentifier() {
await page.waitFor(2000);
const image5 = await program.screenshot({ deviceShot: true });
expect(image5).toSaveImageSnapshot({customSnapshotIdentifier() {
return 'get-current-pages-test-hideStatusBar-hideBottomNavigationIndicator'
}});
......
......@@ -80,4 +80,9 @@ export const PageStyleArray = [
key: "hideBottomNavigationIndicator",
type: "boolean",
value: [true, false]
},
{
key: "androidThreeButtonNavigationTranslucent",
type: "boolean",
value: [true, false]
}] as PageStyleItem[]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册