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

[MR-3334] Update Guidance Text for Uploading Documents #1902

Merged
merged 17 commits into from
Sep 7, 2023
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
3 changes: 3 additions & 0 deletions services/app-web/src/components/FileUpload/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ export const SPACER_GIF =

export const ACCEPTED_SUBMISSION_FILE_TYPES =
'application/pdf,text/csv,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel.sheet.macroEnabled.12,application/vnd.ms-excel.template.macroEnabled.12,application/vnd.ms-excel.addin.macroEnabled.12'

export const ACCEPTED_RATE_CERTIFICATION_FILE_TYPES =
'application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document'
5 changes: 4 additions & 1 deletion services/app-web/src/components/FileUpload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ export type { S3FileData } from './FileUpload'

export { UploadErrorAlert } from './UploadErrorAlert/UploadErrorAlert'
export { FileUpload } from './FileUpload'
export { ACCEPTED_SUBMISSION_FILE_TYPES } from './constants'
export {
ACCEPTED_SUBMISSION_FILE_TYPES,
ACCEPTED_RATE_CERTIFICATION_FILE_TYPES,
} from './constants'
export {
hasNoLoadingFiles,
hasNoFileErrors,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ describe('ContractDetails', () => {
)

// check hint text
await screen.findByText('Supporting documents can be added later.')
await screen.findByText(
'Supporting documents can be added later. If you have additional contract actions, you must submit them in a separate submission.'
)
await screen.findByRole('link', { name: /Document definitions/ })

// check file input presences
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,13 +530,6 @@ export const ContractDetails = ({
<span
className={styles.guidanceTextBlock}
>
<span className="text-ink">
Upload one contract only.
</span>
<span className="text-ink">
Supporting documents can be
added later.
</span>
<Link
aria-label="Document definitions and requirements (opens in new window)"
href={'/help#key-documents'}
Expand All @@ -546,10 +539,16 @@ export const ContractDetails = ({
Document definitions and
requirements
</Link>
<span className="padding-top-05">
Supporting documents can be
added later. If you have
additional contract actions, you
must submit them in a separate
submission.
</span>
<span className="padding-top-1">
This input only accepts PDF,
CSV, DOC, DOCX, XLS, XLSX, XLSM
files.
CSV, DOC, DOCX, XLS, XLSX files.
</span>
</span>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('Documents', () => {
)

const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)
expect(input).toBeInTheDocument()
await userEvent.upload(input, [TEST_DOC_FILE])
Expand All @@ -89,7 +89,7 @@ describe('Documents', () => {
)

const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)
expect(input).toBeInTheDocument()
expect(input).toHaveAttribute('accept', ACCEPTED_SUBMISSION_FILE_TYPES)
Expand Down Expand Up @@ -195,7 +195,7 @@ describe('Documents', () => {
}
)
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)
await userEvent.upload(input, [TEST_DOC_FILE])
await userEvent.upload(input, [TEST_PDF_FILE])
Expand Down Expand Up @@ -231,7 +231,7 @@ describe('Documents', () => {
}
)
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)

await userEvent.upload(input, [TEST_XLS_FILE])
Expand Down Expand Up @@ -281,7 +281,7 @@ describe('Documents', () => {
}
)
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)
await userEvent.upload(input, [TEST_DOC_FILE])
await userEvent.upload(input, [TEST_PDF_FILE])
Expand Down Expand Up @@ -328,7 +328,7 @@ describe('Documents', () => {
)

const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)
await userEvent.upload(input, [TEST_PDF_FILE])
await userEvent.upload(input, [TEST_DOC_FILE])
Expand Down Expand Up @@ -393,7 +393,7 @@ describe('Documents', () => {
)

const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)

await userEvent.upload(input, [TEST_DOC_FILE])
Expand Down Expand Up @@ -449,7 +449,7 @@ describe('Documents', () => {
name: 'Continue',
})
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)

await userEvent.upload(input, [TEST_DOC_FILE])
Expand Down Expand Up @@ -481,7 +481,7 @@ describe('Documents', () => {
name: 'Continue',
})
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)
const targetEl = screen.getByTestId('file-input-droptarget')

Expand Down Expand Up @@ -514,7 +514,7 @@ describe('Documents', () => {
}
)
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)
const saveAsDraftButton = screen.getByRole('button', {
name: 'Save as draft',
Expand Down Expand Up @@ -597,7 +597,7 @@ describe('Documents', () => {
})

const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)
const targetEl = screen.getByTestId('file-input-droptarget')

Expand Down Expand Up @@ -687,7 +687,7 @@ describe('Documents', () => {
name: 'Save as draft',
})
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)

await userEvent.upload(input, [TEST_DOC_FILE])
Expand Down Expand Up @@ -719,7 +719,7 @@ describe('Documents', () => {
name: 'Save as draft',
})
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)
const targetEl = screen.getByTestId('file-input-droptarget')

Expand Down Expand Up @@ -778,7 +778,7 @@ describe('Documents', () => {
}
)
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)
const saveAsDraftButton = screen.getByRole('button', {
name: 'Save as draft',
Expand Down Expand Up @@ -831,7 +831,7 @@ describe('Documents', () => {
name: 'Back',
})
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)

await userEvent.upload(input, [TEST_DOC_FILE])
Expand Down Expand Up @@ -863,7 +863,7 @@ describe('Documents', () => {
name: 'Back',
})
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)
const targetEl = screen.getByTestId('file-input-droptarget')

Expand Down Expand Up @@ -923,7 +923,7 @@ describe('Documents', () => {
}
)
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)
const backButton = screen.getByRole('button', {
name: 'Back',
Expand Down Expand Up @@ -1005,7 +1005,7 @@ describe('Documents', () => {
)

const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)

await userEvent.upload(input, [TEST_DOC_FILE])
Expand Down Expand Up @@ -1057,7 +1057,7 @@ describe('Documents', () => {
)

const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)

await userEvent.upload(input, [TEST_DOC_FILE])
Expand Down Expand Up @@ -1175,7 +1175,7 @@ describe('Documents', () => {
name: 'Continue',
})
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)

expect(input).toBeInTheDocument()
Expand Down Expand Up @@ -1238,7 +1238,7 @@ describe('Documents', () => {
name: 'Continue',
})
const input = screen.getByLabelText(
'Upload any additional supporting documents'
'Upload contract-supporting documents'
)
expect(input).toBeInTheDocument()
await userEvent.upload(input, [TEST_DOC_FILE])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export const Documents = ({
<FileUpload
id="documents"
name="documents"
label="Upload any additional supporting documents"
label="Upload contract-supporting documents"
renderMode={supportingDocsByRate ? 'list' : 'table'}
hint={
<>
Expand All @@ -311,9 +311,13 @@ export const Documents = ({
>
Document definitions and requirements
</Link>
<span>
<span className="padding-top-05">
Upload any supporting documents related to
the contract.
</span>
<span className="padding-top-1">
This input only accepts PDF, CSV, DOC, DOCX,
XLS, XLSX, XLSM files.
XLS, XLSX files.
</span>
</>
}
Expand Down
Loading
Loading