mirror of
https://github.com/iflytek/skillhub.git
synced 2026-11-14 09:01:16 +00:00
test(e2e): follow two-step publish confirmation in publish flow
The publish page now opens a confirmation dialog from "Next: confirm"; drive that step before clicking "Confirm Publish". Signed-off-by: 千乘妍 (Xiaoyaner) <xiaoyaner0201@users.noreply.github.com>
This commit is contained in:
parent
d6a76e5fe8
commit
044a2801b9
1 changed files with 7 additions and 1 deletions
|
|
@ -49,7 +49,13 @@ test.describe('Publish Flow UI (Real API)', () => {
|
|||
// Scope this regression test to the existing ZIP picker.
|
||||
await page.locator('input[type="file"][accept*=".zip"]').setInputFiles(packagePath)
|
||||
await expect(page.getByText(path.basename(packagePath))).toBeVisible()
|
||||
const confirmButton = page.getByRole('button', { name: 'Confirm Publish' })
|
||||
// Publishing is a two-step flow: review the form, then confirm in the dialog.
|
||||
const nextButton = page.getByRole('button', { name: 'Next: confirm' })
|
||||
await expect(nextButton).toBeEnabled()
|
||||
await nextButton.click()
|
||||
const confirmDialog = page.getByRole('dialog')
|
||||
await expect(confirmDialog).toContainText(`@${namespace.slug}/${skillName}`)
|
||||
const confirmButton = confirmDialog.getByRole('button', { name: 'Confirm Publish' })
|
||||
await expect(confirmButton).toBeEnabled()
|
||||
const publishResponsePromise = page.waitForResponse(
|
||||
(response) =>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue