Skip to content

Commit 5700d48

Browse files
committed
poor man's CI re-run
1 parent ae80436 commit 5700d48

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/prefetch.spec.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,12 @@ test('can prefetch link on focus', async ({ page, browser }) => {
9898
await page.goto('prefetch/2')
9999
requests.listen(page)
100100
// If they just do a quick focus, it shouldn't make the request
101-
await page.getByRole('link', { exact: true, name: 'On Hover (Default)' }).focus()
102-
await page.getByRole('link', { exact: true, name: 'On Hover (Default)' }).blur()
101+
const link = page.getByRole('link', { exact: true, name: 'On Hover (Default)' })
102+
await link.focus()
103+
await link.blur()
103104
expect(requests.requests.length).toBe(0)
104105

105-
await page.getByRole('link', { exact: true, name: 'On Hover (Default)' }).focus()
106+
await link.focus()
106107
await page.waitForTimeout(80)
107108
expect(requests.requests.length).toBe(1)
108109
await isPrefetchPage(page, 2)
@@ -126,8 +127,7 @@ test('can prefetch link on focus', async ({ page, browser }) => {
126127

127128
requests.listen(page2)
128129

129-
const link = page2.getByRole('link', { exact: true, name: 'On Hover (Default)' })
130-
const box = await link.boundingBox()
130+
const box = await page2.getByRole('link', { exact: true, name: 'On Hover (Default)' }).boundingBox()
131131
expect(box).not.toBeNull()
132132
page2.touchscreen.tap(box!.x, box!.y)
133133
await page2.waitForTimeout(75)

0 commit comments

Comments
 (0)