playwright/tests/library/inspector
Rui Figueira 73ffaf65d7
fix(codegen): fill action prevents omnibox navigation recording (#29790)
This PR is a fix proposal for a bug when trying to record a omnibox
navigation after a recorded action (e.g., `fill`).

The following test, included in this PR, reproduces the problem:

```ts
  test('should record omnibox navigations after recordAction', async ({ page, openRecorder, server }) => {
    const recorder = await openRecorder();
    await recorder.setContentAndWait(`<textarea></textarea>`);
    await Promise.all([
      recorder.waitForOutput('JavaScript', 'fill'),
      page.locator('textarea').fill('Hello world'),
    ]);
    // for performed actions, 5 seconds is the time needed to ensure they are committed
    await page.waitForTimeout(5000);
    await page.goto(server.PREFIX + `/empty.html`);
    await recorder.waitForOutput('JavaScript', `await page.goto('${server.PREFIX}/empty.html');`);
  });
```

After performed actions (e.g., `click`), it successfully records the
navigation as long as there's at least a 5 sec. gap between both
actions. That happens because after that 5 sec. interval the performed
action is automatically commited and therefore the navigation is not
stored as a signal of that action.

The proposed fix for recorded actions also forces that action to be
automatically commited after 5 sec (for testing, I'm using 500ms to
speed up the test execution).
2024-03-04 12:31:03 -08:00
..
cli-codegen-1.spec.ts fix(codegen): fill action prevents omnibox navigation recording (#29790) 2024-03-04 12:31:03 -08:00
cli-codegen-2.spec.ts chore: make csharp library codegen more csharp like (#28663) 2023-12-15 10:24:26 -08:00
cli-codegen-3.spec.ts fix(codegen): assertValue works with disabled input (#29205) 2024-01-27 14:54:22 -08:00
cli-codegen-csharp.spec.ts test: codegen #28663 follow-up (#28673) 2023-12-15 12:05:13 -08:00
cli-codegen-java.spec.ts JUnit codegen (#29424) 2024-02-20 11:08:53 -08:00
cli-codegen-javascript.spec.ts fix(codegen): comment-out generated expects for library scripts (#28118) 2023-11-13 16:56:27 -08:00
cli-codegen-pytest.spec.ts test: unflake inspector-cli tests (#22347) 2023-04-12 09:37:24 -07:00
cli-codegen-python-async.spec.ts test: unflake inspector-cli tests (#22347) 2023-04-12 09:37:24 -07:00
cli-codegen-python.spec.ts test: unflake inspector-cli tests (#22347) 2023-04-12 09:37:24 -07:00
cli-codegen-test.spec.ts test: unflake inspector-cli tests (#22347) 2023-04-12 09:37:24 -07:00
console-api.spec.ts fix(console-api): locator filter with hasText (#29563) 2024-02-20 17:35:11 +01:00
inspectorTest.ts JUnit codegen (#29424) 2024-02-20 11:08:53 -08:00
pause.spec.ts chore: make tests strict (1) (#27731) 2023-10-23 09:31:30 -07:00