Skip to content
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

Fix: Build fail due to async call #539

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

srijitcoder
Copy link
Collaborator

@srijitcoder srijitcoder commented Dec 20, 2023

What does this PR Fix

Add new external WMS/XYZ and JSON Layer - addExternalLayers:

CypressError: Timed out retrying after 4000ms: `cy.find()` failed because the page updated as a result of this command, but you tried to continue the command chain. The subject is no longer attached to the DOM, and Cypress cannot requery the page after commands such as `cy.find()`.

Common situations why this happens:

  • Your JS framework re-rendered asynchronously
  • Your app code reacted to an event firing and removed the element

Solved this by breaking up a chain -

cy.get(".search-icon").click();
cy.get(".add-layer-icon").first().click();

to (by adding ref - @apibtn to the async API button)

cy.get(".search-icon").as("apibtn").click();
cy.get("@apibtn").should("not.be.disabled");
cy.get(".add-layer-icon").first().click();

Solution from Github Action Log -

image

@silvester-pari silvester-pari merged commit 09d1e03 into main Dec 20, 2023
3 checks passed
@silvester-pari silvester-pari deleted the layercontrol/fix/build-fail-due-to-asyn-api branch December 20, 2023 13:00
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