Files
wwjcloud-nest-v1/wwjcloud-nest-v1/uniappx/demo/pages/App.test.js
wanwu 6eb9ea687d feat: 初始化项目代码
- 迁移 NestJS 项目结构
- 添加 uniappx 前端代码
- 配置数据库连接
- 添加核心业务模块
2026-04-02 21:25:02 +08:00

27 lines
843 B
JavaScript

const platformInfo = process.env.uniTestPlatformInfo.toLocaleLowerCase()
const isAndroid = platformInfo.includes('android')
const HOME_PATH = '/pages/index/index'
describe("app launch & show options", () => {
it("onLaunch onShow", async () => {
const page = await program.reLaunch(HOME_PATH)
await page.waitFor('view')
expect(await page.callMethod("checkLaunchPath")).toBe(true)
if (!isAndroid) {
expect(await page.callMethod("checkAppMixin")).toBe(true)
}
const lifeCycleNum = await page.callMethod('getLifeCycleNum')
expect(lifeCycleNum).toBe(1110)
})
it('onLastPageBackPress', async () => {
if (isAndroid) {
page = await program.navigateBack()
await page.waitFor(700)
lifeCycleNum = await page.callMethod('getLifeCycleNum')
expect(lifeCycleNum).toBe(110)
}
})
})