Skip to content

Conversation

@Anemy
Copy link
Member

@Anemy Anemy commented Dec 31, 2025

COMPASS-10205

This should hopefully fix the flake in this test, my hunch is that we were checking for the value of the document before the view had swapped which caused occasional failures.

Here are my investigation notes:
One test failed on “expected undefined to equal '"10101010"'” on line 778

expect(modifiedResult.phoneNumber).to.be.equal('"10101010"');

The other test failed on “expected [ …(4) ] to have a length of +0 but got 4” line 777
expect(fieldValues).to.have.lengthOf(fieldNames.length);

So the field values exist, but not field names yet. I am thinking it's a the race between the two requests for the field names and field values even. (names happens first and it’s length 0).

So the runFindOperation isn’t checking for the expected status in the respective view when the view is swapped (here it's JSON -> list view).

From the screenshots, which happen after the check, it looks like it’s the right content being shown.

Copilot AI review requested due to automatic review settings December 31, 2025 21:50
@Anemy Anemy requested a review from a team as a code owner December 31, 2025 21:50
@Anemy Anemy requested a review from mabaasit December 31, 2025 21:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a flaky end-to-end test by adding a wait condition to ensure documents are fully rendered after a view swap from JSON to list view.

  • Adds explicit wait for document list entry to be displayed before reading document content
  • Prevents race condition between view swap completion and value verification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants