mirror of
https://github.com/langgenius/dify.git
synced 2026-07-25 13:38:31 +08:00
fix(agent-v2): link API reference to agent guide (#39534)
This commit is contained in:
parent
8ef002f624
commit
dcd40d603c
@ -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
|
||||
})
|
||||
|
||||
@ -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'])}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user