Files
ssw-mvp/docs/e2e/cases/TC-COMPAT-005.mjs
T
admin 3247e9fd15 init: ssw-mvp initial commit
- boot/ (Java/Maven, JNPF 7.0) — 移除旧的 boot/.git,源码直接纳入仓库
- web/ (Vue 3 + Vite + Ant Design Vue, pnpm)
- docs/, scard/, nax/
- refs/INDEX.md + refs/国标/(其余 refs/* 开源子仓库不纳入)
- 已忽略: connector_data/, jweb/, log/, web/{dist,node_modules,.pnpm}, boot/*/target/, .DS_Store, .idea, .vscode
2026-08-05 18:29:12 +08:00

26 lines
898 B
JavaScript

/**
* TC-COMPAT-005 · 不同分辨率布局正常
* Q-COMPAT 兼容性 · 正向 · P1
* 预期:界面在不同分辨率下可正常显示
*/
export const meta = {
tc: 'TC-COMPAT-005',
req: 'Q-COMPAT',
title: '不同分辨率布局正常',
type: '正向',
priority: 'P1',
needs: ['fe']
}
export async function run(t) {
await t.login()
// 浏览器内做 3 档分辨率切换
for (const [w, h] of [[1920, 1080], [1440, 900], [1280, 720]]) {
await t.page.setViewportSize({ width: w, height: h })
await t.goto('/tds/connectors')
await t.expectVisible('.crud-page', `${w}x${h} 下页面布局存在`)
const tableW = await t.page.locator('.ant-table').first().evaluate((el) => el.getBoundingClientRect().width)
t.assert(tableW > 200, `${w}x${h} 下表格宽度 ${Math.round(tableW)}px,未被挤压到不可用`)
t.shot(`TC-COMPAT-005-${w}x${h}`)
}
}