Skip to content

Commit

Permalink
10476-story: bump up additional order text to 256 chars and switch In…
Browse files Browse the repository at this point in the history
…dex/index to Document/document
  • Loading branch information
Mwindo committed Sep 9, 2024
1 parent 595b1be commit 8b7f454
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
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

0 comments on commit 8b7f454

Please sign in to comment.