-
Notifications
You must be signed in to change notification settings - Fork 1
waiting for index management section loading #91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
coutoPL
merged 1 commit into
master
from
fix/waiting_for_index_management_section_loading
May 18, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
In Cypress 14.x, cancy.get('selector').should('not.exist')pass immediately if the element is initially absent, and therefore miss an element that appears shortly after?💡 Result:
Yes,
cy.get('selector').should('not.exist')can pass immediately if the element is absent at the moment Cypress checks for it, which may lead to false positives if the element is intended to appear shortly after [1]. Cypress's retry-ability mechanism is designed to wait for an element to appear when using positive assertions (likeshould('exist')orshould('be.visible')) [2][3]. However, when using the negative assertionshould('not.exist'), Cypress checks the DOM and, if the element is not found, the assertion passes immediately [1]. It does not inherently wait to see if the element might appear later [1]. If you need to ensure an element does not appear after an asynchronous action (such as a network request or a UI update), you must explicitly control the timing of the assertion [4]. Common strategies include: 1. Waiting for the specific action to complete: Usecy.wait()with a network alias or wait for a specific state change before asserting that the element does not exist [4]. 2. Chaining assertions: If you expect an element to exist first and then disappear, assert its existence before asserting its non-existence [5]. 3. Adjusting timeouts: While increasing the timeout can sometimes help, it is generally better to use explicit synchronization (like waiting for a network request) to ensure the test is deterministic [4]. If you require an immediate check without any waiting (e.g., verifying an element is absent after a server-side render), you can explicitly set the timeout to 0 to disable retrying [2][3]:cy.get('selector', { timeout: 0 }).should('not.exist')[2][3]Citations:
waitingForSectionLoadingFinish()has a race condition: loader may appear after assertion passes.On line 110,
cy.get('[data-test-subj="sectionLoading"]', { timeout: 30000 }).should('not.exist')passes immediately if the loader is not present at that instant. It does not wait to detect if the loader appears later. If the loader starts loading slightly after this check, the flake remains unresolved. Add an explicit page-ready assertion first to ensure the page has stabilized, then verify the loader is absent.Suggested fix
static waitingForSectionLoadingFinish() { cy.log('Waiting for section loading'); + if (semver.gte(getKibanaVersion(), '8.0.0')) { + cy.get('[data-test-subj="indicesSearch"]', { timeout: 30000 }).should('be.visible'); + } else { + cy.get( + 'input[aria-label="This is a search bar. As you type, the results lower in the page will automatically filter."]', + { timeout: 30000 } + ).should('be.visible'); + } cy.get('[data-test-subj="sectionLoading"]', { timeout: 30000 }).should('not.exist'); }🤖 Prompt for AI Agents