test(e2e): assert both SkillHub CLI and ClawHub install commands

The install command UI now defaults to the SkillHub CLI tab with the
ClawHub command hidden under a second tab, so the previous assertion
for `npx clawhub install <slug>` no longer found visible text.
This commit is contained in:
Cheney 2026-05-19 17:12:29 +08:00
parent 4e8430d305
commit 1de63edd8f

View file

@ -40,7 +40,15 @@ test.describe('Public Skill Detail Anonymous Access (Real API)', () => {
await expect(page).not.toHaveURL(/\/login\?returnTo=/)
await expect(page.getByRole('heading', { name: current.skillName, exact: true })).toBeVisible()
await expect(page.getByText('Install', { exact: true })).toBeVisible()
await expect(page.getByText(new RegExp(`npx clawhub install ${current.skill.slug}`))).toBeVisible()
await expect(
page.getByText(new RegExp(`skillhub install ${current.skill.namespace}/${current.skill.slug}`)),
).toBeVisible()
await expect(page.getByRole('button', { name: 'Copy' }).first()).toBeVisible()
await page.getByRole('tab', { name: 'ClawHub' }).click()
await expect(
page.getByText(new RegExp(`npx clawhub install ${current.skill.namespace}--${current.skill.slug}`)),
).toBeVisible()
})
})