Skip to content

Commit c32d75a

Browse files
committed
test(docs): select the visible API example in browser checks
1 parent d7ae1eb commit c32d75a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎apps/docs/scripts/test-navigation-e2e.ts‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,9 @@ try {
752752
await open(page, '/api-reference/workflows/listWorkflows')
753753
const trigger = page.getByRole('button', { name: /^Response example:/ })
754754
await trigger.scrollIntoViewIfNeeded()
755-
const selectedRegion = page.getByRole('region', { name: 'Response', exact: true })
755+
const selectedRegion = page
756+
.getByRole('region', { name: 'Response', exact: true })
757+
.filter({ visible: true })
756758
const initialPanel = await selectedRegion.getAttribute('id')
757759
await trigger.focus()
758760
await page.keyboard.press('Enter')
@@ -859,7 +861,10 @@ try {
859861
.first()
860862
.click()
861863
await expect(language).toHaveAccessibleName(/^Request example: Python/)
862-
const request = page.getByRole('region', { name: 'Request', exact: true }).locator('code')
864+
const request = page
865+
.getByRole('region', { name: 'Request', exact: true })
866+
.filter({ visible: true })
867+
.locator('code')
863868
const originalSample = await request.textContent()
864869
const formats = page.getByRole('tablist', {
865870
name: '200 response content type',

0 commit comments

Comments
 (0)