Skip to content

Testing library command timeouts doesn't register with the timeout-bar in the Cypress test-runner #217

Closed
@Svish

Description

@Svish
  • cypress-testing-library version: 8.0.2
  • node version: 14.17.0
  • npm (or yarn) version: 6.14.13

What you did:

Added a timeout to findByRole, like this:

    cy.findByRole('button', {
      name: 'Not existing',
      timeout: 120_000,
    }).click();

What happened:

The timeout-bar of running/waiting testing-library commands in the Cypress test-runner finishes way before 120 seconds are up. Looks to take around 10 seconds for it to finish? This is the progress-bar I'm talking about:

image

If I use timeout on regular cypress commands, like cy.get('foobar', { timeout: 120_000 }), then the timeout-bar works correctly and does take 120 seconds to pass.

Problem description:

The timeout-option of testing-library commands doesn't seem to register correctly with the timeout-bar in the Cypress test-runner, like other commands do.

Suggested solution:

Timeout option on testing-library commands, should work and display the same as for other commands in the Cypress test-runner.

Activity

JavierMartinz

JavierMartinz commented on Sep 2, 2022

@JavierMartinz

Any workaround for this? I'm also experiencing this issue.

added a commit that references this issue on Nov 15, 2022
6e67ce7
added a commit that references this issue on Nov 15, 2022
8d66009
github-actions

github-actions commented on Nov 15, 2022

@github-actions

🎉 This issue has been resolved in version 8.0.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @Svish@JavierMartinz

      Issue actions

        Testing library command timeouts doesn't register with the timeout-bar in the Cypress test-runner · Issue #217 · testing-library/cypress-testing-library