Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10501 Hotfix to PROD: chambers users as message recipients #5396

Merged
merged 3 commits into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions cypress/local-only/support/pages/document-qc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,22 @@ export const fillOutMessageField = () => {
cy.get('#message').clear().type("I don't appreciate your lack of sarcasm.");
};

export const enterSubject = () => {
cy.get('#subject').clear().type('Demeanor');
export const enterSubject = (subject?: string) => {
cy.get('#subject')
.clear()
.type(subject || 'Demeanor');
};

export const sendMessage = () => {
cy.get('#confirm').click();
};

export const forwardMessage = (messageSubject: string) => {
cy.get('#tab-case-messages').click();
cy.contains('a', messageSubject).click();
cy.get('#button-forward').click();
};

export const progressIndicatorDoesNotExist = () => {
cy.get('.progress-indicator').should('not.exist');
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import {
createMessage,
enterSubject,
fillOutMessageField,
forwardMessage,
goToDocumentNeedingQC,
openCompleteAndSendMessageDialog,
selectChambers,
selectRecipient,
selectSection,
sendMessage,
} from '../../../support/pages/document-qc';
import { goToCase } from '../../../../helpers/caseDetail/go-to-case';
import { loginAsDocketClerk } from '../../../../helpers/authentication/login-as-helpers';
import { v4 } from 'uuid';

describe('BUG: chambers dropdown should be populated in message modals', () => {
const chambersSection = 'buchsChambers';
const recipient = 'Judge Buch';
const caseNumber = '103-20';
const messageToForwardSubject = v4();

before(() => {
// Send a message that we will forward later.
// We do this here rather than in the message forward test itself because
// judgesChambers are cached, so the message forward test could
// "pass" when it shouldn't if we create a message (and populate cache) first.
loginAsDocketClerk();
goToCase(caseNumber);
createMessage();
selectSection('Docket');
selectRecipient('Test Docketclerk');
enterSubject(messageToForwardSubject);
fillOutMessageField();
sendMessage();
});

it('should have nonempty chambers section in create new message modal', () => {
loginAsDocketClerk();
goToCase(caseNumber);
createMessage();

selectSection('Chambers');
selectChambers(chambersSection);
selectRecipient(recipient);
});

it('should have nonempty chambers sections in forward message modal', () => {
loginAsDocketClerk();
goToCase(caseNumber);
forwardMessage(messageToForwardSubject);

selectSection('Chambers');
selectChambers(chambersSection);
selectRecipient(recipient);
});

it('should have nonempty chambers sections in docket QC complete and send message modal', () => {
cy.login('docketclerk', '/document-qc/section/inbox');
cy.get('.big-blue-header').should('exist');
goToDocumentNeedingQC();
openCompleteAndSendMessageDialog();

selectSection('Chambers');
selectChambers(chambersSection);
selectRecipient(recipient);
});
});
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { clearModalStateAction } from '../actions/clearModalStateAction';
import { generateTitleAction } from '../actions/FileDocument/generateTitleAction';
import { getCaseAction } from '../actions/getCaseAction';
import { getJudgesChambersSequence } from '@web-client/presenter/sequences/getJudgesChambersSequence';
import { isWorkItemAlreadyCompletedAction } from '../actions/isWorkItemAlreadyCompletedAction';
import { refreshExternalDocumentTitleFromEventCodeAction } from '../actions/FileDocument/refreshExternalDocumentTitleFromEventCodeAction';
import { setAlertErrorAction } from '../actions/setAlertErrorAction';
Expand Down Expand Up @@ -29,6 +30,7 @@ export const openCompleteAndSendMessageModalSequence = [
],
success: [
clearModalStateAction,
getJudgesChambersSequence,
refreshExternalDocumentTitleFromEventCodeAction,
setPreviousDocumentDocketEntryAction,
generateTitleAction,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { clearModalStateAction } from '../actions/clearModalStateAction';
import { getJudgesChambersSequence } from '@web-client/presenter/sequences/getJudgesChambersSequence';
import { getMostRecentMessageInThreadAction } from '../actions/getMostRecentMessageInThreadAction';
import { setForwardMessageModalDialogModalStateAction } from '../actions/WorkItem/setForwardMessageModalDialogModalStateAction';
import { setShowModalFactoryAction } from '../actions/setShowModalFactoryAction';

export const openForwardMessageModalSequence = [
clearModalStateAction,
getMostRecentMessageInThreadAction,
getJudgesChambersSequence,
setForwardMessageModalDialogModalStateAction,
setShowModalFactoryAction('ForwardMessageModal'),
];
Loading