Skip to content

Commit 6e1173d

Browse files
committed
chore(ci): qualify final ESM and docs synchronization fixes
1 parent 4fc193a commit 6e1173d

2 files changed

Lines changed: 9 additions & 40 deletions

File tree

‎.github/workflows/ci-mts-typecheck-proof.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ permissions:
77
actions: read
88
jobs:
99
qualify:
10-
if: false
1110
runs-on: ubuntu-24.04
1211
timeout-minutes: 20
1312
steps:
@@ -19,6 +18,8 @@ jobs:
1918
run: python3 .github/scripts/prove-mts-typecheck.py
2019
- name: Run existing real filesystem CLI coverage
2120
run: bun run test:scripts scripts/prune-turbopack-cache.test.ts --reporter=default --reporter=json --outputFile.json="$RUNNER_TEMP/mts-cli-tests.json"
21+
- name: Type-check documentation and its acceptance harness
22+
run: bun run --cwd apps/docs type-check
2223
- name: Regenerate disjoint committed artifacts
2324
run: |
2425
python3 - <<'PYCODE'
@@ -43,8 +44,10 @@ jobs:
4344
scripts/tsconfig.mts.json
4445
.github/CI.md
4546
.github/workflows/checks.yml
47+
apps/docs/scripts/test-navigation-e2e.ts
4648
4749
docs-cold-search:
50+
if: false
4851
name: docs request deadline (${{ matrix.phase }})
4952
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-8vcpu-ubuntu-2404' || 'linux-x64-8-core' }}
5053
timeout-minutes: 45

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

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,35 +1756,6 @@ try {
17561756
'Search keyboard navigation, empty/error states and focus restoration',
17571757
async () => {
17581758
const page = await interactive.newPage()
1759-
const events: Array<Record<string, unknown>> = []
1760-
const started = performance.now()
1761-
const record = (event: Record<string, unknown>) => {
1762-
if (events.length < 30) events.push({ elapsedMs: performance.now() - started, ...event })
1763-
}
1764-
page.on('request', (request) => {
1765-
if (new URL(request.url()).pathname === '/api/search') record({ event: 'request', url: request.url() })
1766-
})
1767-
page.on('response', (response) => {
1768-
if (new URL(response.url()).pathname === '/api/search') record({ event: 'response', url: response.url(), status: response.status() })
1769-
})
1770-
page.on('requestfinished', (request) => {
1771-
if (new URL(request.url()).pathname === '/api/search') record({ event: 'finished', url: request.url(), timing: request.timing() })
1772-
})
1773-
page.on('requestfailed', (request) => {
1774-
if (new URL(request.url()).pathname === '/api/search') record({ event: 'failed', url: request.url(), failure: request.failure(), timing: request.timing() })
1775-
})
1776-
page.on('pageerror', (error) => record({ event: 'pageerror', error: error.message }))
1777-
let delayedTransfer: Promise<void> | undefined
1778-
await page.route(new URL('/api/search?query=Slack', target).href, (route) => {
1779-
delayedTransfer = (async () => {
1780-
const arrived = performance.now()
1781-
const response = await route.fetch()
1782-
await sleep(Math.max(0, 4870 - (performance.now() - arrived)))
1783-
await route.fulfill({ response })
1784-
record({ event: 'fixture-fulfilled', requestElapsedMs: performance.now() - arrived })
1785-
})()
1786-
return delayedTransfer
1787-
})
17881759
try {
17891760
await open(page, '/introduction')
17901761
const trigger = page.getByRole('button', {
@@ -1795,11 +1766,11 @@ try {
17951766
await page.keyboard.press('Control+k')
17961767
const search = page.getByRole('combobox', { name: 'Search documentation' })
17971768
await expect(search).toBeFocused()
1798-
const requested = process.env.DOCS_SEARCH_PROOF_PHASE === 'fixed'
1799-
? page.waitForRequest(new URL('/api/search?query=Slack', target).href, { timeout: 5000 })
1800-
: undefined
1801-
await search.fill('Slack')
1802-
if (requested) expect((await (await requested).response())?.ok()).toBe(true)
1769+
const [request] = await Promise.all([
1770+
page.waitForRequest(new URL('/api/search?query=Slack', target).href, { timeout: 5000 }),
1771+
search.fill('Slack'),
1772+
])
1773+
expect((await request.response())?.ok()).toBe(true)
18031774
await expect(page.getByRole('option').first()).toBeVisible()
18041775
await page.screenshot({ path: join(directory, 'search-results.png') })
18051776
const activeResult = await search.getAttribute('aria-activedescendant')
@@ -1826,12 +1797,7 @@ try {
18261797
await expect(
18271798
page.getByRole('button', { name: /^(Search documentation|Search docs)$/, exact: true })
18281799
).toBeFocused()
1829-
} catch (error) {
1830-
await delayedTransfer?.catch(() => {})
1831-
await page.screenshot({ path: join(directory, 'search-failure.png'), timeout: 3000 }).catch(() => {})
1832-
throw error
18331800
} finally {
1834-
await writeFile(join(directory, 'search-diagnostics.json'), JSON.stringify({ events, url: page.url(), query: await page.getByRole('combobox', { name: 'Search documentation' }).inputValue().catch(() => null), status: await page.getByRole('status').allTextContents().catch(() => []) }, null, 2))
18351801
await page.close()
18361802
}
18371803
}

0 commit comments

Comments
 (0)