text: import { docketClerkCreatesATrialSession } from './journey/docketClerkCreatesATrialSession';
  import { docketClerkRemovesCaseFromTrial } from './journey/docketClerkRemovesCaseFromTrial';
  import { docketClerkViewsSectionInboxHighPriority } from './journey/docketClerkViewsSectionInboxHighPriority';
  import { docketClerkViewsSectionInboxNotHighPriority } from './journey/docketClerkViewsSectionInboxNotHighPriority';
  import { docketClerkViewsTrialSessionList } from './journey/docketClerkViewsTrialSessionList';
  import {
    fakeFile,
    loginAs,
    refreshElasticsearchIndex,
    setupTest,
    uploadPetition,
    wait,
  } from './helpers';
  import { petitionerFilesDocumentForCase } from './journey/petitionerFilesDocumentForCase';
  import { petitionsClerkSetsATrialSessionsSchedule } from './journey/petitionsClerkSetsATrialSessionsSchedule';
  
  const cerebralTest = setupTest();
  
  describe('petitioner files document', () => {
    beforeAll(() => {
      jest.setTimeout(30000);
    });
  
    afterAll(() => {
      cerebralTest.closeSocket();
    });
  
    loginAs(cerebralTest, 'petitioner@example.com');
    it('Create case', async () => {
      const caseDetail = await uploadPetition(cerebralTest);
      expect(caseDetail.docketNumber).toBeDefined();
      cerebralTest.docketNumber = caseDetail.docketNumber;
    });
  
    const trialLocation = `Jacksonville, Florida, ${Date.now()}`;
  
    loginAs(cerebralTest, 'docketclerk@example.com');
    docketClerkCreatesATrialSession(cerebralTest, { trialLocation });
    docketClerkViewsTrialSessionList(cerebralTest);
  
    loginAs(cerebralTest, 'petitionsclerk@example.com');
    petitionsClerkSetsATrialSessionsSchedule(cerebralTest);
    it('manually add the case to the session', async () => {
      await cerebralTest.runSequence('gotoCaseDetailSequence', {
        docketNumber: cerebralTest.docketNumber,
      });
      await cerebralTest.runSequence('openAddToTrialModalSequence');
      await cerebralTest.runSequence('updateModalValueSequence', {
        key: 'trialSessionId',
        value: cerebralTest.trialSessionId,
      });
  
      await cerebralTest.runSequence('addCaseToTrialSessionSequence');
      await wait(1000);
    });
  
    loginAs(cerebralTest, 'petitioner@example.com');
    petitionerFilesDocumentForCase(cerebralTest, fakeFile);
  
    loginAs(cerebralTest, 'docketclerk@example.com');
    docketClerkViewsSectionInboxHighPriority(cerebralTest);
    docketClerkRemovesCaseFromTrial(cerebralTest);
  
    it('refresh elasticsearch index', async () => {
      await refreshElasticsearchIndex();
    });
  
    docketClerkViewsSectionInboxNotHighPriority(cerebralTest);
  });
  