feat: migrate static pages to native tabbar
This commit is contained in:
22
tests/login-page-render.test.js
Normal file
22
tests/login-page-render.test.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
describe('login page compatibility', () => {
|
||||
test('renders a static login layout with action list only', () => {
|
||||
const wxml = fs.readFileSync(path.join(process.cwd(), 'pages/login/index.wxml'), 'utf8')
|
||||
const wxss = fs.readFileSync(path.join(process.cwd(), 'pages/login/index.wxss'), 'utf8')
|
||||
|
||||
expect(wxml).toContain('login-page')
|
||||
expect(wxml).toContain('{{title}}')
|
||||
expect(wxml).toContain('{{subtitle}}')
|
||||
expect(wxml).toContain('wx:for="{{actions}}"')
|
||||
expect(wxml).toContain('bindtap="handleActionTap"')
|
||||
expect(wxml).not.toContain('handleMockLogin')
|
||||
expect(wxml).not.toContain('t-input')
|
||||
expect(wxml).not.toContain('app-button')
|
||||
|
||||
expect(wxss).toContain('.login-page')
|
||||
expect(wxss).toContain('.login-page__hero')
|
||||
expect(wxss).toContain('.login-page__action')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user