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

10476: Slight changes to Status Report Order #5361

Merged
merged 3 commits into from
Sep 12, 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
2 changes: 1 addition & 1 deletion cypress/local-only/support/statusReportOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const messages = {
},
};
export const expectedPdfLines = [
'On June 28, 2024, a status report was filed (Index no. 5). For cause, it is',
'On June 28, 2024, a status report was filed (Document no. 5). For cause, it is',
`ORDERED that the parties shall file a further status report by ${formatNow(FORMATS.MONTH_DAY_YEAR)}. It is further`,
'ORDERED that this case is stricken from the trial session. It is further',
'ORDERED that jurisdiction is retained by the undersigned. It is further',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ describe('file status report order', () => {
const today = formatNow(FORMATS.MMDDYYYY);
const formattedToday = formatNow(FORMATS.MONTH_DAY_YEAR);
const firstPdfLineJustThisCase =
'On June 28, 2024, a status report was filed (Index no.';
'On June 28, 2024, a status report was filed (Document no.';
const firstPdfLineForAllCasesInGroup =
'On June 28, 2024, a status report was filed (Lead case index no.';
'On June 28, 2024, a status report was filed (Lead case document no.';

describe('judge', () => {
beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion shared/src/business/entities/StatusReportOrderForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class StatusReportOrderForm extends JoiValidationEntity {
);

static VALIDATION_RULES = {
additionalOrderText: JoiValidationConstants.STRING.max(80)
additionalOrderText: JoiValidationConstants.STRING.max(256)
.optional()
.allow(null, ''),
docketEntryDescription: JoiValidationConstants.STRING.max(80)
Expand Down
14 changes: 7 additions & 7 deletions web-api/storage/fixtures/seed/efcms-local.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('prepareStatusReportOrderAction,', () => {
.getUtilities()
.formatDateString(dueDate, FORMATS.MONTH_DAY_YEAR);
const statusReportIndex = 4;
const expectedFiledLine = `<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Index no. ${statusReportIndex}). For cause, it is</p>`;
const expectedFiledLine = `<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Document no. ${statusReportIndex}). For cause, it is</p>`;

it('prepare status report with no options selected', async () => {
const result = await runAction(prepareStatusReportOrderAction, {
Expand Down Expand Up @@ -54,7 +54,7 @@ describe('prepareStatusReportOrderAction,', () => {
STATUS_REPORT_ORDER_OPTIONS.jurisdictionOptions.retained;
const orderType = STATUS_REPORT_ORDER_OPTIONS.orderTypeOptions.statusReport;
const strickenFromTrialSessions = true;
const expectedFullText = `<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Index no. 4). For cause, it is</p><p class="indent-paragraph">ORDERED that the parties shall file a further status report by ${dueDateFormatted}. It is further</p><p class="indent-paragraph">ORDERED that this case is stricken from the trial session. It is further</p><p class="indent-paragraph">ORDERED that jurisdiction is retained by the undersigned. It is further</p><p class="indent-paragraph">ORDERED that Test Additional Order Text</p>`;
const expectedFullText = `<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Document no. 4). For cause, it is</p><p class="indent-paragraph">ORDERED that the parties shall file a further status report by ${dueDateFormatted}. It is further</p><p class="indent-paragraph">ORDERED that this case is stricken from the trial session. It is further</p><p class="indent-paragraph">ORDERED that jurisdiction is retained by the undersigned. It is further</p><p class="indent-paragraph">ORDERED that Test Additional Order Text</p>`;

const result = await runAction(prepareStatusReportOrderAction, {
modules: {
Expand Down Expand Up @@ -82,11 +82,11 @@ describe('prepareStatusReportOrderAction,', () => {
it.each([
[
STATUS_REPORT_ORDER_OPTIONS.issueOrderOptions.allCasesInGroup,
`<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Lead case index no. ${statusReportIndex}). For cause, it is</p>`,
`<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Lead case document no. ${statusReportIndex}). For cause, it is</p>`,
],
[
STATUS_REPORT_ORDER_OPTIONS.issueOrderOptions.justThisCase,
`<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Index no. 4). For cause, it is</p>`,
`<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Document no. 4). For cause, it is</p>`,
],
])(
'should have correct output for lead case with issue order %s',
Expand Down Expand Up @@ -117,11 +117,11 @@ describe('prepareStatusReportOrderAction,', () => {
it.each([
[
STATUS_REPORT_ORDER_OPTIONS.jurisdictionOptions.retained,
`<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Index no. 4). For cause, it is</p><p class="indent-paragraph">ORDERED that jurisdiction is retained by the undersigned.</p>`,
`<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Document no. 4). For cause, it is</p><p class="indent-paragraph">ORDERED that jurisdiction is retained by the undersigned.</p>`,
],
[
STATUS_REPORT_ORDER_OPTIONS.jurisdictionOptions.restored,
`<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Index no. 4). For cause, it is</p><p class="indent-paragraph">ORDERED that this case is restored to the general docket.</p>`,
`<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Document no. 4). For cause, it is</p><p class="indent-paragraph">ORDERED that this case is restored to the general docket.</p>`,
],
])(
'should have correct output for jurisdiction %s',
Expand Down Expand Up @@ -149,11 +149,11 @@ describe('prepareStatusReportOrderAction,', () => {
it.each([
[
STATUS_REPORT_ORDER_OPTIONS.orderTypeOptions.statusReport,
`<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Index no. 4). For cause, it is</p><p class="indent-paragraph">ORDERED that the parties shall file a further status report by ${dueDateFormatted}.</p>`,
`<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Document no. 4). For cause, it is</p><p class="indent-paragraph">ORDERED that the parties shall file a further status report by ${dueDateFormatted}.</p>`,
],
[
STATUS_REPORT_ORDER_OPTIONS.orderTypeOptions.stipulatedDecision,
`<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Index no. 4). For cause, it is</p><p class="indent-paragraph">ORDERED that the parties shall file a status report or proposed stipulated decision by ${dueDateFormatted}.</p>`,
`<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Document no. 4). For cause, it is</p><p class="indent-paragraph">ORDERED that the parties shall file a status report or proposed stipulated decision by ${dueDateFormatted}.</p>`,
],
])('should have correct output for order type %s', async (input, output) => {
const result = await runAction(prepareStatusReportOrderAction, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export const prepareStatusReportOrderAction = ({
const filedLine =
isLeadCase &&
issueOrder === STATUS_REPORT_ORDER_OPTIONS.issueOrderOptions.allCasesInGroup
? `<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Lead case index no. ${statusReportIndex}). For cause, it is</p>`
: `<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Index no. ${statusReportIndex}). For cause, it is</p>`;
? `<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Lead case document no. ${statusReportIndex}). For cause, it is</p>`
: `<p class="indent-paragraph">On ${statusReportFilingDateFormatted}, a status report was filed (Document no. ${statusReportIndex}). For cause, it is</p>`;

const orderTypeLine =
hasOrderType &&
Expand Down
4 changes: 2 additions & 2 deletions web-client/src/views/StatusReportOrder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export const StatusReportOrder = connect(
autoCapitalize="none"
className="usa-textarea maxw-none height-8 usa-character-count__field"
id="additional-order-text"
maxLength={80}
maxLength={256}
name="additionalOrderText"
value={form.additionalOrderText}
onChange={e => {
Expand All @@ -368,7 +368,7 @@ export const StatusReportOrder = connect(
}}
></textarea>
<CharactersRemainingHint
maxCharacters={80}
maxCharacters={256}
stringToCount={form.additionalOrderText}
/>
</div>
Expand Down
Loading