Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(grid): [grid] fix grid error e2e test #2815

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/sites/demos/pc/app/grid/editor/custom-edit.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import { test, expect } from '@playwright/test'
test('多行编辑', async ({ page }) => {
page.on('pageerror', (exception) => expect(exception).toBeNull())
await page.goto('grid-editor#editor-custom-edit')
await expect(page.getByRole('textbox', { name: 'GFD 科技有限公司', exact: true })).toBeVisible()
await expect(page.getByRole('cell', { name: 'GFD 科技有限公司' }).getByRole('textbox')).toBeVisible()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from checking for a textbox with an exact name match to checking for a textbox within a cell is a good improvement for test robustness. However, ensure that the new cell names ('GFD 科技有限公司' and 'WWWW 科技有限公司') are consistently present in the test environment to avoid false negatives.

await expect(page.getByRole('cell', { name: 'WWWW 科技有限公司' }).getByRole('textbox')).toBeVisible()
})
Loading