Skip to content

Using the [S] shortcut during a paused state produces some strange behavior #6867

Closed
@Regnander

Description

@Regnander

Current behavior:

When cy.pause() is called the user is unable to press the stop button since it's not found in the toolbar in this state, so in order to stop the test, they must click the continue button to resume the test before being able to press the stop button:

a

However, if you use the stop shortcut (S), the test will stop and the reset button will show up in the toolbar alongside the continue button and the "PAUSED" badge as if Cypress just entered a limbo state between being paused and stopped:

b

From this point when you click the continue button, the test will remain stopped but the timer will start counting again as if the test is running:

c

Desired behavior:

I expected the shortcut to affect the toolbar the same way as the GUI button and remove the continue button.

Test code to reproduce

context('...', () => {
    it('...', () => {
        cy.pause()
        // Press [S] to stop the test here!
        cy.log('Hello world! 🖐')
    })
})

Versions

Cypress 4.2.0 (might work in earlier versions)
Windows 10
Electron (whatever version Cypress has)

Activity

jennifer-shehane

jennifer-shehane commented on Mar 30, 2020

@jennifer-shehane
Member

Yeah, definitely an edge case we did not consider. I can recreate this behavior from the provided test code above.

Original PR adding the keyboard shortcuts is here: #3943

Should likely disable the shortcut if paused.

IvoKkk

IvoKkk commented on Apr 19, 2020

@IvoKkk
cypress-bot

cypress-bot commented on May 26, 2020

@cypress-bot
Contributor

The code for this is done in cypress-io/cypress#7266, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

cypress-bot

cypress-bot commented on Jun 8, 2020

@cypress-bot
Contributor

Released in 4.8.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.8.0, please open a new issue.

locked as resolved and limited conversation to collaborators on Jun 8, 2020
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

    good first issueGood for newcomerspkg/reporterThis is due to an issue in the packages/reporter directorytype: unexpected behaviorUser expected result, but got another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @jennifer-shehane@Regnander@IvoKkk

      Issue actions

        Using the [S] shortcut during a paused state produces some strange behavior · Issue #6867 · cypress-io/cypress