fix(test): 修复云盘上传设置测试断言

- 使用 .first().toBeVisible() 替代 toHaveCount(1)
- 页面有多个包含「云盘上传」的元素
This commit is contained in:
Joftal committed 2026-08-06 14:10:50 +08:00
1 parent 82391d8afa
commit c88bfb3495
1 file changed
+1 -1
+1 -1
View File
@@ -31,7 +31,7 @@ test.describe('设置页面测试', () => {
test('云盘上传设置已显示', async ({ page }) => {
await expect(page.getByRole('main')).toBeVisible();
await expect(page.getByText('云盘上传')).toHaveCount(1);
await expect(page.getByText('云盘上传').first()).toBeVisible();
});
test('输入框可以编辑', async ({ page }) => {