mirror of
https://github.com/iflytek/skillhub.git
synced 2026-08-28 11:25:00 +00:00
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:
parent
4e8430d305
commit
1de63edd8f
1 changed files with 9 additions and 1 deletions
|
|
@ -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()
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue