-
Notifications
You must be signed in to change notification settings - Fork 279
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(e2e): [cascader,color-picker,crop] fix cascader color-picker crop components e2e-test error #2746
fix(e2e): [cascader,color-picker,crop] fix cascader color-picker crop components e2e-test error #2746
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import { test, expect } from '@playwright/test' | |
test('自定义节点内容', async ({ page }) => { | ||
page.on('pageerror', (exception) => expect(exception).toBeNull()) | ||
await page.goto('cascader-panel#custom-option-content') | ||
await expect(page.getByText('指南自定义 (2) 组件自定义 (6)')).toBeVisible() | ||
await page.getByRole('menuitem', { name: '指南自定义 (2)' }).click() | ||
await expect(page.getByText('安装自定义 (4) 开发自定义 (2)')).toBeVisible() | ||
await expect(page.getByText('指南自定义(2)组件自定义(6)')).toBeVisible() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the text expectations are correctly aligned with the actual output to avoid test failures. |
||
await page.getByRole('menuitem', { name: '指南自定义(2)' }).click() | ||
await expect(page.getByText('安装自定义(4)开发自定义(2)')).toBeVisible() | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ const propsAuto = ref({ | |
setTimeout(() => { | ||
const nodes = Array.from({ length: level + 1 }).map(() => ({ | ||
value: ++id, | ||
label: `选项${id}`, | ||
label: `选项 ${id}`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the text expectations are correctly aligned with the actual output to avoid test failures. |
||
leaf: level >= 2 | ||
})) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ export default { | |
setTimeout(() => { | ||
const nodes = Array.from({ length: level + 1 }).map(() => ({ | ||
value: ++id, | ||
label: `选项${id}`, | ||
label: `选项 ${id}`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the text expectations are correctly aligned with the actual output to avoid test failures. |
||
leaf: level >= 2 | ||
})) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ const propsAuto = ref({ | |
setTimeout(() => { | ||
const nodes = Array.from({ length: level + 1 }).map(() => ({ | ||
value: ++id, | ||
label: `选项${id}`, | ||
label: `选项 ${id}`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the text expectations are correctly aligned with the actual output to avoid test failures. |
||
leaf: level >= 2 | ||
})) | ||
// 通过调用 resolve 将子节点数据返回,通知组件数据加载完成 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ export default { | |
setTimeout(() => { | ||
const nodes = Array.from({ length: level + 1 }).map(() => ({ | ||
value: ++id, | ||
label: `选项${id}`, | ||
label: `选项 ${id}`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the text expectations are correctly aligned with the actual output to avoid test failures. |
||
leaf: level >= 2 | ||
})) | ||
// 通过调用 resolve 将子节点数据返回,通知组件数据加载完成 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ test('可清空', async ({ page }) => { | |
page.on('pageerror', (exception) => expect(exception).toBeNull()) | ||
await page.goto('cascader#clearable') | ||
const text = await page.getByRole('textbox', { name: '请选择' }).inputValue() | ||
await expect(text).toEqual('指南 + 安装 + 项目登记') | ||
await expect(text).toEqual('指南+安装+项目登记') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the text expectations are correctly aligned with the actual output to avoid test failures. |
||
await page.locator('.tiny-input__suffix-inner > .tiny-svg').click() | ||
const textClear = await page.getByRole('textbox', { name: '请选择' }).inputValue() | ||
await expect(textClear).toEqual('') | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ test('多选', async ({ page }) => { | |
page.on('pageerror', (exception) => expect(exception).toBeNull()) | ||
await page.goto('cascader#default-multiple') | ||
const multiple = page.locator('.tiny-cascader-multiple') | ||
const multipleText = page.getByText('指南 /安装 /项目登记指南 /安装 /安装 CLI 指南 /开发 /引入组件') | ||
const multipleText = page.getByText('指南 /安装 /项目登记指南 /安装 /安装 CLI指南 /开发 /引入组件') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the text expectations are correctly aligned with the actual output to avoid test failures. |
||
await expect(multiple).toBeVisible() | ||
await expect(multipleText).toBeVisible() | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,7 @@ test('测试预定义颜色', async ({ page }) => { | |
await expect(page.getByRole('button', { name: '预定义颜色' })).toBeVisible() | ||
await page.getByRole('button', { name: '预定义颜色' }).click() | ||
await expect(page.locator('.tiny-color-select-panel__predefine > div:nth-child(8)')).toBeVisible() | ||
await page.getByText('取消选择预定义颜色 Append predefine').click() | ||
await page.getByText('取消选择预定义颜色 Append predefine').click() | ||
await page.getByText('取消选择预定义颜色 Append predefine').click() | ||
await page.getByText('取消选择预定义颜色Append predefine').click() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the text expectations are correctly aligned with the actual output to avoid test failures. |
||
await page.getByRole('button', { name: '选择' }).click() | ||
await page.getByRole('button', { name: 'Append predefine color' }).click() | ||
await page.locator('.tiny-color-picker__inner').click() | ||
|
@@ -25,5 +23,5 @@ test('测试预定义颜色', async ({ page }) => { | |
await page.locator('.tiny-color-select-panel__predefine > div:nth-child(8)').click() | ||
await page.getByRole('button', { name: '选择' }).click() | ||
await page.locator('.tiny-color-picker__inner').click() | ||
await page.getByText('取消选择预定义颜色 Append predefine').click() | ||
await page.getByText('取消选择预定义颜色Append predefine').click() | ||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,5 @@ test('获取裁剪后的图片数据', async ({ page }) => { | |
await page.getByRole('button', { name: '获取裁剪后的图片数据' }).click() | ||
|
||
// 待补充验证:弹窗内数据 | ||
await expect(page.getByText('Blob: 337877')).toHaveCount(1) | ||
await expect(page.getByText('Blob:337877')).toHaveCount(1) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ensure that the text expectations are correctly aligned with the actual output to avoid test failures. |
||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the text expectations are correctly aligned with the actual output to avoid test failures.