Skip to content

Commit 2836b10

Browse files
committed
fix(test): [select,checkbox,button] fix test
1 parent fa4e5e9 commit 2836b10

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

examples/sites/demos/pc/app/button/dynamic-disabled.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ test('测试禁用状态是否生效', async ({ page }) => {
1212
await expect(demo.locator('.tiny-button').first()).toBeDisabled()
1313
await expect(demo.locator('.tiny-button').first()).toHaveCSS('background-color', 'rgb(240, 240, 240)')
1414
await expect(demo.locator('.tiny-button').first()).toHaveCSS('color', 'rgb(194, 194, 194)')
15-
await expect(demo.locator('.tiny-button').first()).toHaveCSS('border-bottom-color', 'rgb(240, 240, 240)')
15+
await expect(demo.locator('.tiny-button').first()).toHaveCSS('border-bottom-color', 'rgb(219, 219, 219)')
1616
await expect(demo.getByRole('button', { name: '次要按钮' }).first()).toBeDisabled()
1717
await expect(demo.getByRole('button', { name: '主要按钮' }).first()).toBeDisabled()
1818
await expect(demo.getByRole('button', { name: '成功按钮' }).first()).toBeDisabled()

examples/sites/demos/pc/app/checkbox/basic-usage.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test('基础用法', async ({ page }) => {
55
await page.goto('checkbox#basic-usage')
66
const checkbox = await page.locator('.tiny-checkbox').first()
77
await expect(checkbox).toHaveClass(/is-checked/)
8-
await expect(checkbox.locator('.tiny-checkbox__inner svg path').first()).toHaveCSS('fill', 'rgb(20, 118, 255)')
8+
await expect(checkbox.locator('.tiny-checkbox__inner svg path').nth(1)).toHaveCSS('fill', 'rgb(20, 118, 255)')
99
await checkbox.click()
1010
await expect(checkbox).not.toHaveClass(/is-checked/)
1111
})

examples/sites/demos/pc/app/select/nest-radio-grid-much-data.spec.ts

+1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ test('下拉表格大数据', async ({ page }) => {
3232
await expect(row).toHaveCount(6)
3333
await row.nth(5).scrollIntoViewIfNeeded()
3434
await expect(row).toHaveCount(6)
35+
await page.waitForTimeout(500)
3536
await page.getByRole('row', { name: '华南区 12 广东省 广州市' }).getByRole('cell').first().click()
3637
})

0 commit comments

Comments
 (0)