feat: migrate static pages to native tabbar
This commit is contained in:
33
tests/mingli-bazi-page-render.test.js
Normal file
33
tests/mingli-bazi-page-render.test.js
Normal file
@@ -0,0 +1,33 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
describe('mingli bazi page compatibility', () => {
|
||||
test('renders larger hero, form and result sections with native-compatible layout', () => {
|
||||
const wxml = fs.readFileSync(
|
||||
path.join(process.cwd(), 'packages/mingli/pages/bazi/index.wxml'),
|
||||
'utf8'
|
||||
)
|
||||
const wxss = fs.readFileSync(
|
||||
path.join(process.cwd(), 'packages/mingli/pages/bazi/index.wxss'),
|
||||
'utf8'
|
||||
)
|
||||
|
||||
expect(wxml).toContain('hero-card__eyebrow')
|
||||
expect(wxml).toContain('hero-card__meta')
|
||||
expect(wxml).toContain('panel-header')
|
||||
expect(wxml).toContain('field-block__value')
|
||||
expect(wxml).toContain('result-card__grid')
|
||||
|
||||
expect(wxss).toContain('.hero-card__eyebrow')
|
||||
expect(wxss).toContain('.hero-card__meta')
|
||||
expect(wxss).toContain('.panel-header__title')
|
||||
expect(wxss).toContain('.field-block__value')
|
||||
expect(wxss).toContain('.result-card__grid')
|
||||
expect(wxss).toContain('padding: 36rpx 24rpx 96rpx;')
|
||||
expect(wxss).toContain('padding: 34rpx 28rpx;')
|
||||
expect(wxss).toContain('font-size: 46rpx;')
|
||||
expect(wxss).toContain('font-size: 34rpx;')
|
||||
expect(wxss).not.toContain('display: grid')
|
||||
expect(wxss).not.toContain('gap:')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user