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

Retry is not working when it is added in describe block -2nd attempt hangs forever #27958

Closed
cihanaygunes opened this issue Oct 2, 2023 · 6 comments
Labels
stale no activity on this issue for a long period

Comments

@cihanaygunes
Copy link

cihanaygunes commented Oct 2, 2023

Current behavior

Retry option is not working when i add it in describe block. First attempt fails, however during the second attempt, it hangs in there and stays forever doing nothing. Neither it fails the test or passes. Here is what my test looks like.

image

Desired behavior

The test should be run and/or fails after some time.

Test code to reproduce

const story = 'Do something';

describe(
${story},
{
retries: 1,
},
() => {
beforeEach(async () => {
await stageTestData(Scenario.secretWay, house.secretAddress, brand?.name);
});

it('should do some validations', { tags: ['@regression', '@house'] }, () => {
cy.visit('www.something.com');
cy.login();
cy.get('[data-testid=some-secret-id]').click();
cy.get('.serviceCompletion', { timeout: 0 }).get('[data-testid=submit]').should('have.length', 1);
});
});

Cypress Version

13.2.0

Node version

v20.3.1

Operating System

macOS Venture - Version 13.6

Debug Logs

No response

Other

No response

@jennifer-shehane
Copy link
Member

@cihanaygunes Is this hanging something that began happening on a more recent version of Cypress? Was this something that was every working?

@cihanaygunes
Copy link
Author

Hey @jennifer-shehane. No, it is a new initiation. So, it is not something that it was working before.

@jennifer-shehane
Copy link
Member

@cihanaygunes Did you upgrade from a previous version where this was not happening? We’ll need more info, since we can’t recreate the issue given your example. It’s likely something very specific to your setup since this is not a widespread reported issue.

@cihanaygunes
Copy link
Author

@jennifer-shehane. Hmm interesting. I remember reading several similar issues although they were in earlier versions. To answer your question; I did not upgrade from a previous version. This was never working because as i mentioned this was not tried with older versions. Unfortunately, I am unable to share more details other than what i provided above (That was the frame of the test).

FYI - We found a workaround to use cy.request instead of await/async axios call. And moved the call as a command in test's body rather than having it in beforeEach hook. Thank you for your response.

@cypress-app-bot
Copy link
Collaborator

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Apr 2, 2024
@cypress-app-bot
Copy link
Collaborator

This issue has been closed due to inactivity.

@cypress-app-bot cypress-app-bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale no activity on this issue for a long period
Projects
None yet
Development

No branches or pull requests

3 participants