test(publish): scope zip picker in folder upload e2e

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
This commit is contained in:
XiaoSeS 2026-08-26 17:22:35 +08:00
parent 0fbc55f917
commit e1c18e8467

View file

@ -45,7 +45,9 @@ test.describe('Publish Flow UI (Real API)', () => {
})
await expect(namespaceTrigger).toContainText(`@${namespace.slug}`)
await page.locator('input[type="file"]').setInputFiles(packagePath)
// The publish form also exposes a second file input for folder selection.
// 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' })
await expect(confirmButton).toBeEnabled()