fix(agent-v2): link API reference to agent guide (#39534)

This commit is contained in:
yyh 2026-07-24 18:14:27 +08:00 committed by GitHub
parent 8ef002f624
commit dcd40d603c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -149,7 +149,7 @@ When('I open the Agent v2 API Reference', async function (this: DifyWorld) {
const apiReferenceLink = page.getByRole('link', { name: 'API Reference' })
await expect(apiReferenceLink).toBeVisible()
await expect(apiReferenceLink).toHaveAttribute('href', /\/api-reference\/guides\/get-started/)
await expect(apiReferenceLink).toHaveAttribute('href', /\/api-reference\/guides\/agent/)
await expect(apiReferenceLink).toHaveAttribute('target', '_blank')
const [apiReferencePage] = await Promise.all([
@ -164,7 +164,7 @@ Then('the Agent v2 API Reference should open in a new tab', async function (this
const apiReferencePage = this.agentBuilder.accessPoint.apiReferencePage
if (!apiReferencePage) throw new Error('No Agent v2 API Reference page was opened.')
await expect(apiReferencePage).toHaveURL(/\/api-reference\/guides\/get-started/)
await expect(apiReferencePage).toHaveURL(/\/api-reference\/guides\/agent/)
await apiReferencePage.close()
this.agentBuilder.accessPoint.apiReferencePage = undefined
})

View File

@ -88,7 +88,7 @@ export function ServiceApiAccessCard({ agentId }: { agentId: string }) {
</span>
</Button>
<a
href={docLink('/api-reference/guides/get-started')}
href={docLink('/api-reference/guides/agent')}
target="_blank"
rel="noreferrer"
aria-label={t(($) => $['agentDetail.access.serviceApi.actions.apiReference'])}