ustaxcourt / ef-cms

An Electronic Filing / Case Management System.
https://dawson.ustaxcourt.gov/
Other
85 stars 45 forks source link

FLAKY TEST: `noticeOfChangeOfAddressQCJourney.test.ts` #3986

Open rachelschneiderman opened 9 months ago

rachelschneiderman commented 9 months ago

Path to Test File

web-client/integration-tests/noticeOfChangeOfAddressQCJourney.test.ts

Readout of the failure

image

Sometimes the failure occurs in the step practitionerUpdatesAddress in the last expectation (see below) because state.alertSuccess was undefined when that test step was executed.

expect(cerebralTest.getState('alertSuccess')).toMatchObject({
      message: 'Changes saved.',
    });

What were you working on?

https://github.com/ustaxcourt/ef-cms/pull/3979

Notes

Definition of Done (Updated 4-14-21)

Engineering

mmarcotte commented 9 months ago

Observed on another PR. Failed action

AIL web-client/integration-tests/noticeOfChangeOfAddressQCJourney.test.ts (473.761 s)
  ● Console

    console.log
      Waited 14000ms for the userContactEditProgress.inProgress to hide

      at log (integration-tests/helpers.ts:1035:11)

    console.log
      Waited 0ms for the progressIndicator.waitingForResponse to hide

      at log (integration-tests/helpers.ts:1035:11)

  ● noticeOfChangeOfAddressQCJourney › practitioner updates address

    thrown: "Exceeded timeout of 70000 ms for a test.
    Add a timeout value to this test to increase the timeout, if this is a long-running test. See https://jestjs.io/docs/api#testname-fn-timeout."

      4 |
      5 | export const practitionerUpdatesAddress = cerebralTest => {
    > 6 |   return it('practitioner updates address', async () => {
        |          ^
      7 |     await cerebralTest.runSequence('gotoUserContactEditSequence');
      8 |
      9 |     await cerebralTest.runSequence('updateFormValueSequence', {

      at it (integration-tests/journey/practitionerUpdatesAddress.ts:6:10)
      at integration-tests/noticeOfChangeOfAddressQCJourney.test.ts:63:29
      at Object.describe (integration-tests/noticeOfChangeOfAddressQCJourney.test.ts:16:1)

  ● noticeOfChangeOfAddressQCJourney › Docket Clerk QCs NCA for case with paper service

    expect(received).toMatchObject(expected)

    Matcher error: received value must be a non-null object

    Received has value: undefined

      41 |     );
      42 |
    > 43 |     expect(noticeOfChangeOfAddressQCItem).toMatchObject({
         |                                           ^
      44 |       docketEntry: { documentTitle: 'Notice of Change of Address' },
      45 |     });
      46 |

      at toMatchObject (integration-tests/journey/docketClerkQCsNCAForCaseWithPaperService.ts:43:43)
      at call (integration-tests/journey/docketClerkQCsNCAForCaseWithPaperService.ts:2:1)
      at Generator.tryCatch (integration-tests/journey/docketClerkQCsNCAForCaseWithPaperService.ts:2:1)
      at Generator._invoke [as next] (integration-tests/journey/docketClerkQCsNCAForCaseWithPaperService.ts:2:1)
      at asyncGeneratorStep (integration-tests/journey/docketClerkQCsNCAForCaseWithPaperService.ts:2:1)
      at asyncGeneratorStep (integration-tests/journey/docketClerkQCsNCAForCaseWithPaperService.ts:2:1)
Absolutestunna commented 9 months ago

Observed in this PR as well. Here's the action

Screenshot 2023-09-25 at 10 03 51 AM
Absolutestunna commented 9 months ago

Findings:

We conducted an experiment to add privatePractitioner 2 to cases and the results are as follows:

  1. private practitioner 2 - 65.927s, 60.372s, 59.462s
  2. private practitioner - 78.802s, 76.104s, 76.637s

Based on the time difference, we have made the adjustments to use privatePractitioner2@example.com to reduce the time the test takes to run. Here's the PR: https://github.com/ustaxcourt/ef-cms/pull/4002