Investigate failures of "on dialog" and "wait for load state"

Open
#286 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
playwright, typescript
Domain
testing-qa

Research direction

Start in utils/page-utils.ts around the dialog handling at line 656 and the load-state wait at line 662, using the stack trace near line 522 as context. Investigate the intermittent failures in the Remote Desktop environment, where the hook runs for every test. Done means the auto-e2e tests no longer fail because a dialog was already handled or because this load-state wait timed out.

Written by the indexing model from the issue text.

Description

bug

Describe the bug
In the auto-e2e the tests sometimes fail due to:

dialog.accept: Cannot accept dialog which is already handled!
    at Page.<anonymous> (/home/auto-e2e-bkwp/wp-rocket-e2e/utils/page-utils.ts:522:30)

Here: https://github.com/wp-media/wp-rocket-e2e/blob/dd803247fe6ede122847267167fa84ea3e4ab99a/utils/page-utils.ts#L656

And due to a time-out when waiting for load state here: https://github.com/wp-media/wp-rocket-e2e/blob/dd803247fe6ede122847267167fa84ea3e4ab99a/utils/page-utils.ts#L662

This does not happen always and difficult to reproduce on local, could only see it on Remote Desktop server (where AutoE2E runs).

This doesn't seem to be happening for specific tests, any test can fail because the hook is executed for all tests.

Expected behavior
Tests shouldn't fail due to this

Screenshots

Image
Dominant language
TypeScript
Stars
1
Forks
1
Avg merge
3d 22h
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from wp-media/wp-rocket-e2e

All issues in wp-media/wp-rocket-e2e

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.