🐛 fix: 防止下载检测按钮和状态标签纵向换行

* 保持单文件检测按钮和状态标签单行,避免窄列挤成竖排
* 补充浏览器按钮高度与标签换行断言,关闭移动菜单后检查布局
This commit is contained in:
orion committed 2026-09-19 01:42:11 +08:00
1 parent 3d70f67cf7
commit f2e78986bc
3 files changed
+8 -3

No files matched your search

+5
View File
@@ -40,6 +40,9 @@ const site = process.env.FCB_TEST_URL || 'https://filetest.orionc.me'
await expect(rows).toHaveCount(10)
await expect(page.getByLabel('自动检测当前页')).toHaveValue('0')
assert.equal(calls.length, 0)
const singleButton = rows.first().getByRole('button', { name: '检测可下载状态', exact: true })
assert.ok((await singleButton.boundingBox()).height < 60, 'Single-file check button must stay on one line')
assert.equal(await rows.first().getByRole('status').evaluate(el => getComputedStyle(el).whiteSpace), 'nowrap')
await table.getByRole('button', { name: '刷新列表', exact: true }).click();await expect(rows).toHaveCount(10)
await table.getByRole('button', { name: '下一页', exact: true }).click();await expect(rows.first()).toContainText('TEST1011')
await page.clock.install();await page.clock.fastForward(3600000);await page.clock.resume();assert.equal(calls.length, 0)
@@ -57,6 +60,8 @@ const site = process.env.FCB_TEST_URL || 'https://filetest.orionc.me'
await expect.poll(() => active).toBe(0);assert.equal(calls.length, 1)
await page.setViewportSize({ width: 390, height: 844 });await expect(page.getByTitle('检测全部文件,包括未显示的分页')).toBeVisible()
assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1))
const closeMenu = page.getByRole('button', { name: '关闭菜单', exact: true })
if (await closeMenu.first().isVisible()) await closeMenu.first().click()
await page.screenshot({ path: '/tmp/fcb-manual-check-mobile.png' })
await page.setViewportSize({ width: 1440, height: 1000 });await page.screenshot({ path: '/tmp/fcb-manual-check-desktop.png' })
assert.deepEqual(errors, []);console.log('PASS: no checks on entry/refresh/pagination/time; single, selected, all 25 across pages, serial requests, cancel, mobile layout.')