Skip to content

Commit

Permalink
see if this makes test less flaky (#6947)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Sep 21, 2022
1 parent 73ea7b4 commit 2af2a9d
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions packages/kit/test/apps/basics/test/client.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -904,18 +904,9 @@ test('+server.js next to +page.svelte works', async ({ page }) => {
await page.goto('/routing/endpoint-next-to-page');
expect(await page.textContent('p')).toBe('Hi');

await page.click('button:has-text("GET")');
await expect(page.locator('pre')).toHaveText('GET');

await page.click('button:has-text("PUT")');
await expect(page.locator('pre')).toHaveText('PUT');

await page.click('button:has-text("PATCH")');
await expect(page.locator('pre')).toHaveText('PATCH');

await page.click('button:has-text("POST")');
await expect(page.locator('pre')).toHaveText('POST');

await page.click('button:has-text("DELETE")');
await expect(page.locator('pre')).toHaveText('DELETE');
for (const method of ['GET', 'PUT', 'PATCH', 'POST', 'DELETE']) {
page.click(`button:has-text("${method}")`);
await page.waitForResponse('/routing/endpoint-next-to-page');
expect(await page.textContent('pre')).toBe(method);
}
});

0 comments on commit 2af2a9d

Please sign in to comment.