Skip to content

Commit 05d67e5

Browse files
authored
fix(dialog-select): modify e2e test (#3793)
1 parent 47a150c commit 05d67e5

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

examples/sites/demos/pc/app/dialog-select/nest-tree-single.spec.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@ test('dialogSelect 树单选', async ({ page }) => {
1313
expect(iconNode?.includes('tiny-checkbox')).toBe(false)
1414

1515
let current
16-
current = await page.getByText('201一级')
16+
current = await page.getByRole('treeitem', { name: '二级 4' }).locator('label')
1717
await current.click()
18-
expect(await current.locator('input[type="radio"]').isChecked()).toBe(true)
18+
expect(current).toHaveClass(/is-checked/)
1919

20-
current = await page.getByRole('treeitem', { name: '二级 6' }).locator('label')
21-
await current.click()
22-
expect(await current.locator('input[type="radio"]').isChecked()).toBe(true)
23-
current = await page.getByText('201一级')
24-
expect(await current.locator('input[type="radio"]').isChecked()).toBe(false)
20+
current = await page.getByText('二级 5')
21+
await expect(current).not.toHaveClass(/is-checked/)
2522
})

0 commit comments

Comments
 (0)