Skip to content

Commit

Permalink
fix(e2e): [fileupload] 修复上传组件e2e测试用例报错 (#2741)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxi-20 authored Jan 6, 2025
1 parent db6334d commit 16644a5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ test('基本用法', async ({ page }) => {

await fileChooser.setFiles(currentPath)
await page.getByText('测试.jpg').isVisible()
await expect(lists).toHaveText('测试.jpg 按 delete 键可删除')
await expect(lists).toHaveText('测试.jpg按 delete 键可删除')
})
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ test('水印和加密弹窗', async ({ page }) => {

await fileChooser.setFiles(currentPath)
await page.getByText('测试.jpg').isVisible()
await expect(lists).toHaveText('测试.jpg 按 delete 键可删除')
await expect(lists).toHaveText('测试.jpg按 delete 键可删除')
})
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test('图片列表缩略图', async ({ page }) => {
const container = page.locator('#picture-list')
const upload = container.locator('.tiny-upload')
const lists = container.locator('.tiny-upload-list__item')
const item1 = container.getByText('test1 按 delete 键可删除')
const item1 = container.getByText('test1按 delete 键可删除')
const [fileChooser] = await Promise.all([page.waitForEvent('filechooser'), upload.click()])
const { width, height } = await item1.boundingBox()
const images = container.locator('.tiny-upload-list__item-thumbnail')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test('事件', async ({ page }) => {
const modals = page.locator('.tiny-modal')
const delButton = page
.getByRole('listitem')
.filter({ hasText: 'test1 按 delete 键可删除' })
.filter({ hasText: 'test1按 delete 键可删除' })
.getByTitle('删除文件')
.locator('svg')

Expand Down

0 comments on commit 16644a5

Please sign in to comment.