fix: fix e2e errors of dialog-select and modal (#4256)
* fix: fix dialog-select e2e error * fix: 修改model-event e2e测试 * fix: 还原文件
This commit is contained in:
parent
c94102a989
commit
c6783e2b7c
|
|
@ -11,7 +11,8 @@ test('dialogSelect 设置多选状态', async ({ page }) => {
|
|||
const trs = await page.locator('.tiny-grid table tbody tr').all()
|
||||
for (let i = 0; i < trs.length; i++) {
|
||||
const classes = await trs[i].getAttribute('class')
|
||||
if (i === 1) {
|
||||
// 第1行,2行都选被中
|
||||
if (i === 0 || i === 1) {
|
||||
expect(classes?.includes('row__selected')).toBeTruthy()
|
||||
} else {
|
||||
expect(classes?.includes('row__selected')).toBeFalsy()
|
||||
|
|
|
|||
|
|
@ -10,6 +10,6 @@ test('弹窗的事件', async ({ page }) => {
|
|||
await expect(content.nth(1)).toHaveText(/cancel 事件触发了/)
|
||||
await page.getByRole('button', { name: '打开带事件弹窗' }).nth(1).click()
|
||||
await page.getByRole('button', { name: '确定' }).click()
|
||||
await expect(content.nth(2)).toHaveText(/hide 事件触发了/)
|
||||
await expect(content.nth(2)).toHaveText(/confirm 事件触发了/)
|
||||
await expect(content.filter({ hasText: /hide 事件触发了/ })).toBeVisible()
|
||||
await expect(content.filter({ hasText: /confirm 事件触发了/ })).toBeVisible()
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue