This commit is contained in:
jeremygan2021
2026-02-11 01:31:21 +08:00
parent 61afc52ac2
commit 2d090cd0f4
97 changed files with 3661 additions and 4 deletions

View File

@@ -0,0 +1,22 @@
const automator = require('miniprogram-automator')
describe('Home Page', () => {
let miniProgram
beforeAll(async () => {
miniProgram = await automator.launch({
projectPath: '../' // Relative path to miniprogram root
})
}, 30000)
afterAll(async () => {
await miniProgram.close()
})
it('should render title', async () => {
const page = await miniProgram.reLaunch('/pages/index/index')
await page.waitFor(2000)
const element = await page.$('.title-text')
expect(await element.text()).toContain('未来已来') // Assuming typed text starts or contains this
})
})