Skip to content

Navigation: Fix flakey tests on the Navigation block spec. #33077

@vcanales

Description

@vcanales

Description

Follow up for #33074.

Navigation block tests fail intermittently, and are being hard to debug. The fact that they're working differently depending on the system they run on suggests that we'll have to refactor them to avoid race conditions, and ensure that we're waiting for elements to load before looking for them.

Step-by-step reproduction instructions

See here for an example of a failed run.

In order to check if these tests fail for you locally, you have to:

  1. Create a production build npm run build
  2. Run the failing spec npm run test-e2e packages/e2e-tests/specs/experiments/blocks/navigation.test.js

Expected behaviour

Tests should pass! 🟢 There shouldn't be a problem finding elements or loaded scripts.

Actual behaviour

Tests failing randomly, seemingly depending on the system they're being run on.

Metadata

Metadata

Assignees

Labels

[Block] NavigationAffects the Navigation Block[Type] Automated TestingTesting infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.[Type] EnhancementA suggestion for improvement.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions