071faa482c
纳入 AGC Cargo workspace 的统一 rustfmt 检查与格式化入口 完成项目 TypeScript/Prettier 与 Rust 全量格式化 修复 Pingora expected executable 门禁的空白敏感误报 同步开发运维文档与 AGC skill pack 格式化忽略规则
30 lines
959 B
JavaScript
30 lines
959 B
JavaScript
import fs from 'node:fs';
|
|
import path from 'node:path';
|
|
|
|
import { describe, expect, test } from 'vitest';
|
|
|
|
const PAGE_DIR = path.resolve(process.cwd(), 'miniprogram/pages/web-view');
|
|
|
|
function readPageFile(fileName) {
|
|
return fs.readFileSync(path.join(PAGE_DIR, fileName), 'utf8');
|
|
}
|
|
|
|
describe('mini program web-view page background', () => {
|
|
test('keeps the native web-view host light when the mobile keyboard exposes it', () => {
|
|
const wxml = readPageFile('index.wxml');
|
|
const wxss = readPageFile('index.wxss');
|
|
|
|
expect(wxml).toContain('class="web-view-host"');
|
|
expect(wxml).not.toContain('class="web-view-page"');
|
|
expect(wxss).toContain('page');
|
|
expect(wxss).toContain('.web-view-host');
|
|
expect(wxss).toContain('background: #fffdf9;');
|
|
|
|
const webViewHostBlock = wxss.slice(
|
|
wxss.indexOf('.web-view-host'),
|
|
wxss.indexOf('.setup-screen'),
|
|
);
|
|
expect(webViewHostBlock).not.toContain('#0b0f14');
|
|
});
|
|
});
|