Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

NewLabRequest.test.tsx is flaky #2654

Open
DrewGregory opened this issue Apr 18, 2021 · 4 comments
Open

NewLabRequest.test.tsx is flaky #2654

DrewGregory opened this issue Apr 18, 2021 · 4 comments
Labels
🐛bug issue/pull request that documents/fixes a bug
Projects
Milestone

Comments

@DrewGregory
Copy link
Contributor

Please read this entire template before posting any issue. If you ignore these instructions
and post an issue here that does not follow the instructions, your issue might be closed,
locked, and assigned the missing discussion label.

🐛 Bug Report

The NewLabRequest form layout › should clear visit when patient is changed test spuriously times out. In addition, on save › should save the lab request and navigate to "/labs/:id" spuriously has visitsInput assume a display value of [""] instead of the desired string. The test output is included below.

To Reproduce

Steps to reproduce the behavior:

Run npm run test:ci src/__tests__/labs/requests/NewLabRequest.test.tsx several times until you encounter the error.

Paste your code here:

New Lab Request  on save  should save the lab request and navigate to "/labs/:id"

    expect(element).toHaveDisplayValue()

    Expected element to have display value:
      visit_type at 2021-04-18 01:58 PM
    Received:
      [""]

      157 |         }),
      158 |       )
    > 159 |       expect(visitsInput).toHaveDisplayValue(
          |                           ^
      160 |         `${expectedVisits[0].type} at ${format(
      161 |           new Date(expectedVisits[0].startDateTime),
      162 |           'yyyy-MM-dd hh:mm a',

Expected behavior

All the tests should pass.

Your Environment

  • node version: v12.18.4
  • os: Mac
@matteovivona matteovivona added the 🐛bug issue/pull request that documents/fixes a bug label Apr 19, 2021
@matteovivona matteovivona added this to To do in Version 2.0 via automation Apr 19, 2021
@matteovivona matteovivona added this to the v2.0 milestone Apr 19, 2021
@morrme
Copy link
Member

morrme commented May 25, 2021

@DrewGregory Are you going to be working on this?

@DrewGregory
Copy link
Contributor Author

I have not taken this on yet. If someone would like to take this on, feel free to add a comment to this task, and we can assign the issue to you. Otherwise, I might take this on once we wrap up some other HR GitHub issues.

@ezhoureal
Copy link

I ran the test 6 times but didn't encounter the bug

@ezhoureal
Copy link

I'll try to fix this issue if that's ok

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛bug issue/pull request that documents/fixes a bug
Projects
Version 2.0
  
To do
Development

Successfully merging a pull request may close this issue.

4 participants