feat: 修改前端显示
This commit is contained in:
@@ -56,6 +56,27 @@ test('manages a task and reads a real run log', async ({ page, request }) => {
|
||||
path: 'test-results/dashboard-task-editor.png',
|
||||
fullPage: true,
|
||||
})
|
||||
const addArgumentButton = newTaskDialog.getByRole('button', {
|
||||
name: '+ 添加参数',
|
||||
})
|
||||
await addArgumentButton.focus()
|
||||
await page.keyboard.press('Enter')
|
||||
await newTaskDialog
|
||||
.getByPlaceholder('参数名 (如 --mode 或 -v)')
|
||||
.fill('--mode')
|
||||
await newTaskDialog
|
||||
.getByPlaceholder('参数值 (可选,无值可留空)')
|
||||
.fill('full')
|
||||
await newTaskDialog
|
||||
.getByText('调用预览 (Runtime Preview)')
|
||||
.scrollIntoViewIfNeeded()
|
||||
await expect(
|
||||
newTaskDialog.getByText('--mode full', { exact: false }),
|
||||
).toBeVisible()
|
||||
await page.screenshot({
|
||||
path: 'test-results/dashboard-task-editor-runtime.png',
|
||||
fullPage: true,
|
||||
})
|
||||
await page.keyboard.press('Escape')
|
||||
await expect(newTaskDialog).toBeHidden()
|
||||
|
||||
@@ -75,7 +96,7 @@ test('manages a task and reads a real run log', async ({ page, request }) => {
|
||||
name: '编辑任务 [e2e_echo]',
|
||||
})
|
||||
await expect(editor).toBeVisible()
|
||||
const nameInput = editor.getByLabel('任务名称')
|
||||
const nameInput = editor.getByLabel('名称')
|
||||
await nameInput.fill('E2E updated')
|
||||
await editor.getByRole('button', { name: '保存修改' }).click()
|
||||
await expect(page.getByText('E2E updated')).toBeVisible()
|
||||
|
||||
Reference in New Issue
Block a user