feat: migrate static pages to native tabbar
This commit is contained in:
24
tests/profile-page-render.test.js
Normal file
24
tests/profile-page-render.test.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
describe('profile page compatibility', () => {
|
||||
test('renders the five static profile sections with route-first shortcuts', () => {
|
||||
const wxml = fs.readFileSync(path.join(process.cwd(), 'pages/profile/index.wxml'), 'utf8')
|
||||
const wxss = fs.readFileSync(path.join(process.cwd(), 'pages/profile/index.wxss'), 'utf8')
|
||||
|
||||
expect(wxml).not.toContain('placeholder-page')
|
||||
expect(wxml).toContain('profile-page')
|
||||
expect(wxml).toContain('{{userCard.title}}')
|
||||
expect(wxml).toContain('{{vipCard.title}}')
|
||||
expect(wxml).toContain('wx:for="{{assetItems}}"')
|
||||
expect(wxml).toContain('bindtap="handleAssetTap"')
|
||||
expect(wxml).toContain('{{recentRecord.emptyTitle}}')
|
||||
expect(wxml).toContain('wx:for="{{moreItems}}"')
|
||||
expect(wxml).toContain('bindtap="handleMoreTap"')
|
||||
|
||||
expect(wxss).toContain('.profile-page')
|
||||
expect(wxss).toContain('.profile-header')
|
||||
expect(wxss).toContain('.asset-grid')
|
||||
expect(wxss).toContain('.menu-list')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user