playwright/packages
Yury Semikhatsky 82981a8091
fix: interception id not found error in route.continue (#29180)
We stopped catching all exceptions in
https://github.com/microsoft/playwright/pull/28539 in hope that we'll
get loadingFailed even before Fetch.continue/fulfill command's error.
Turns out this is racy and may fail if the test cancels the request
while we are continuing it. The following test could in theory reproduce
it if stars align and the timing is good:

```js
it('page.continue on canceled request', async ({ page }) => {
  let resolveRoute;
  const routePromise = new Promise<Route>(f => resolveRoute = f);
  await page.route('http://test.com/x', resolveRoute);

  const evalPromise = page.evaluate(async () => {
    const abortController = new AbortController();
    (window as any).abortController = abortController;
    return fetch('http://test.com/x', { signal: abortController.signal }).catch(e => 'cancelled');
  });
  const route = await routePromise;
  void page.evaluate(() => (window as any).abortController.abort());
  await new Promise(f => setTimeout(f, 10));
  await route.continue();
  const req = await evalPromise;
  expect(req).toBe('cancelled');
});
```

Fixes https://github.com/microsoft/playwright/issues/29123
2024-01-25 16:54:42 -08:00
..
html-reporter fix: tolerate wrongly-typed annotations (#29162) 2024-01-25 11:35:17 -08:00
playwright fix: make TeleSuite.project work for all suites (#29177) 2024-01-25 13:44:08 -08:00
playwright-browser-chromium chore: mark version 1.42.0-next (#28973) 2024-01-13 00:20:27 +01:00
playwright-browser-firefox chore: mark version 1.42.0-next (#28973) 2024-01-13 00:20:27 +01:00
playwright-browser-webkit chore: mark version 1.42.0-next (#28973) 2024-01-13 00:20:27 +01:00
playwright-chromium chore: split cli processing into cli endpoint and program (#29131) 2024-01-23 15:22:09 -08:00
playwright-core fix: interception id not found error in route.continue (#29180) 2024-01-25 16:54:42 -08:00
playwright-ct-core chore: automatically detect the dev server (#29176) 2024-01-25 11:46:47 -08:00
playwright-ct-react chore(ct): use sticky test server if available (#29136) 2024-01-25 08:36:13 -08:00
playwright-ct-react17 chore(ct): use sticky test server if available (#29136) 2024-01-25 08:36:13 -08:00
playwright-ct-solid chore(ct): use sticky test server if available (#29136) 2024-01-25 08:36:13 -08:00
playwright-ct-svelte chore(ct): use sticky test server if available (#29136) 2024-01-25 08:36:13 -08:00
playwright-ct-vue chore(ct): use sticky test server if available (#29136) 2024-01-25 08:36:13 -08:00
playwright-ct-vue2 chore(ct): use sticky test server if available (#29136) 2024-01-25 08:36:13 -08:00
playwright-firefox chore: split cli processing into cli endpoint and program (#29131) 2024-01-23 15:22:09 -08:00
playwright-test chore: split cli processing into cli endpoint and program (#29131) 2024-01-23 15:22:09 -08:00
playwright-webkit chore: split cli processing into cli endpoint and program (#29131) 2024-01-23 15:22:09 -08:00
protocol/src feat: page.handleLocator that closes any interstitial pages/dialogs (#29029) 2024-01-19 12:35:00 -08:00
recorder chore: make asLocator() always safe (#28207) 2023-11-16 16:31:34 -08:00
trace/src feat(trace): show target point for raw mouse apis (#28459) 2023-12-07 06:27:49 -08:00
trace-viewer fix(recorder): disallow external imports (#29129) 2024-01-23 11:29:40 -08:00
web fix(ct): move import list into the compilation cache data (#28986) 2024-01-16 19:31:19 -08:00
.eslintrc-with-ts-config.js lint: prevent object string concatenation (#23172) 2023-05-19 15:17:43 -07:00
.eslintrc.js chore: replace process.exit with graceful closure (#24242) 2023-07-24 08:29:29 -07:00