•  
      request #14514 Improve reliability of the tracker workflow end-to-end test
    Infos
    #14514
    Joris MASSON (jmasson)
    2020-02-10 11:30
    2020-02-07 10:04
    15761
    Details
    Improve reliability of the tracker workflow end-to-end test

    Sometimes, the tracker workflow end-to-end test can fail with the following error:

    CypressError: Timed out retrying: Expected to find element: '[data-test-action=delete-transition]', but never found it.

    This happens because the transition is the only one for its state. In this situation, tracker admins are asked to confirm the deletion of the transition because it will erase all configuration for its state. In this case, the selector does not match, the following data-test is present instead:

    [data-test-action=confirm-delete-transition]

    In our test scenario, we create two transitions for our state precisely to skip this confirmation. Unfortunately, the end-to-end test "spams" clicks to create transitions, but our application code is designed to "not do anything" while an async operation is ongoing. If you create a transition, do not wait for it to be created and rapidly click on another "create transition" button, the second one will be ignored.
    It is what sometimes happens in our end-to-end test, depending on the CI server load. The test should wait on the network request to finish before creating or deleting transitions.

    Dev tools
    Empty
    Empty
    • [ ] enhancement
    • [x] internal improvement
    Empty
    Stage
    Joris MASSON (jmasson)
    Closed
    2020-02-10
    Attachments
    Empty
    References

    Follow-ups