'CypressError: Timed out retrying after 4050ms: `cy.click()` failed because this element is being covered by another element:

I got this error in Jenkins build at too many places. But in my local repo is working fine all the test cases.

describe('Blueprints', () => {
  beforeEach(() => {
    server = mockServer({ environment: 'test', trackRequests: true });
    server.createList('blueprint', 100);

    cy.visit('/');
    cy.url().should('contain', urls.home);
    cy.findByTestId(testIds.blueprintsTab).click();
    // Verify table is done loading new results
    cy.findByTestId(testIds.blueprintsTable).find(testIds.loadingSpinner).should('not.exist');
  });

jenkins build:

Blueprints
12:38:22        "before each" hook for "verify labels on blueprint screen":
12:38:22      CypressError: Timed out retrying after 4050ms: `cy.click()` failed because this element:
12:38:22 
12:38:22 `<div tabindex="0" data-active="false" data-test-id="setup-service-tabs-blueprints-tab" class="StyledBox-sc-13pk1d4-0 caAwuv TabBox-sc-g5z5ox jqVoaH" style="pointer-events: auto;">...</div>`
12:38:22 
12:38:22 is being covered by another element:
12:38:22 
12:38:22 `<iframe style="position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; border: none; z-index: 2147483647;"></iframe>`
12:38:22 
12:38:22 Fix this problem, or use {force: true} to disable error checking.
12:38:22 
12:38:22 https://on.cypress.io/element-cannot-be-interacted-with
12:38:22 
12:38:22 Because this error occurred during a `before each` hook we are skipping the remaining tests in the current suite: `Blueprints`

Local repo running tests:

Spec                                                     Tests  Passing  Failing  Pending  Skipped
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ √  integration-test/Blueprints.ts           00:53       19       19        -        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    √  All specs passed!                        00:53       19       19        -        -        -

How do I fix this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source