Repository navigation
Prajwal fix resume upload requirement and label consistency across job roles - #5660
PrajwalpGM256 wants to merge 2 commits into
Conversation
Fixes bug #53 Fix: resume upload is now required for every role with one 'Upload Resume *' label; previously the default 'Seeking Software Position' role allowed submitting without a resume and labels varied by role. Refactor: moved isResumeQuestion to jobApplicationQuestionUtils and fixed its ASCII-only regex so 'résumé' is matched. Tests: added unit tests for the resume requirement and resume question detection.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
AlekyaJogini
left a comment
There was a problem hiding this comment.
Reviewed by Alekya.
How I tested
Checked out the PR branch (commit b5b9a93, 3 files) on Node 20.19.4 with the backend on development. Ran npx vitest run src/components/Collaboration. Opened /job-application logged out in an Incognito window (light mode) and logged in as my Admin test account (dark mode). I did not submit an application.
Verified working
- 10 test files, 112 tests pass.
- Logged out, the resume field reads "Upload Resume *" with no "(optional)".
- With the software position's questions loaded the label is the same. Choosing a PDF shows the file name, size, a Remove button and a "Resume selected" toast and Remove clears it back to "No file selected".
- The label and file controls are readable in dark mode. The white asterisk is the pre-existing dark-mode issue mentioned in the description.
Issues found
None.
Not tested
- Every role in the dropdown (I checked no position and the software position)
- A successful submission with a resume attached
snehitakandula
left a comment
There was a problem hiding this comment.
Reviewed on this PR's branch (pr-5660) at commit b5b9a93, frontend only, with backend on development. Tested /job-application as Admin in light mode. I didn't submit an application with a file.
Verified:
- Default role: the resume field reads "Upload Resume *", with no "(optional)".
- Submission is blocked without a resume (not covered in the earlier review). On another role with its own questions loaded ("1. Phone / WhatsApp", "2. City & Timezone"), clicking Submit with no file is stopped at the resume field, and the label is the same "Upload Resume *".
- No merge conflicts with
development, even though this form file is also changed in #5651 and #5653.
Minor (non-blocking): after clicking Submit without a resume, the browser's native "Please select a file." bubble appears on the file input and stops the submission, so the missing-fields toast listing "Resume" (step 5 of the test steps) doesn't appear. The submission is still prevented, but the test step may need updating, or the native required attribute could be removed so the custom toast handles it.
Screenshots:
*"Upload Resume " on the default role:

Submit blocked without a resume ("Please select a file."):
Approving.
AaditTrivedi
left a comment
There was a problem hiding this comment.
Reviewed by Aadit Trivedi.
The branch has a merge conflict with development in src/components/Collaboration/JobApplicationForm/JobApplicationForm.jsx (checked with git merge-tree). That file was recently changed on development, including the email validation work from #5649, and #5651 and #5653 also change it.
Required action
Please update the branch with development and resolve the conflict, keeping the newer email validation and form behavior. I'll review the resume requirement changes once it's updated.
rahulrubugunday
left a comment
There was a problem hiding this comment.
I have reviewed your PR locally (b5b9a93, backend on development). The resume requirement works as described, but the branch needs to be updated with development.
- /job-application: all 36 positions show "Upload Resume *", including SEEKING SOFTWARE POSITION.
- Submitting with no file lists Resume in the missing-fields toast and nothing is sent. With a PDF attached, Resume drops off the list. After Remove it is listed again.
- Readable in dark and light mode. npx vitest run src/components/Collaboration: 112/112 pass.
Needs changes:
- Merge conflicts with development in JobApplicationForm.jsx and jobApplicationQuestionUtils.js. Development has since added getUploadSizeError / MAX_UPLOAD_BYTES (5 MB limit) and passes optional, required and error={resumeFileError} to the resume upload. The resolved version needs to keep the 5 MB check and error message while making the resume always required.
…sume_upload_label_validation # Conflicts: # src/components/Collaboration/JobApplicationForm/JobApplicationForm.jsx # src/components/Collaboration/JobApplicationForm/jobApplicationQuestionUtils.js
2e6a17a
|
|
@AaditTrivedi @rahulrubugunday merged
Retested on Node 22: "Upload Resume *" on all roles, a file over 5 MB shows "File too large, max 5 MB.", and submit is blocked without a resume.
|
iAbhi001
left a comment
There was a problem hiding this comment.
Reviewed PR #5660 locally on commit 2e6a17a (Node 22, macOS, backend on development).
Verified Working:
- Unit Tests: Ran
npx vitest run src/components/Collaboration— all tests pass. - Label & Required Consistency: Navigated to
/job-application; confirmed the resume field consistently displaysUpload Resume *(with no(optional)) across both the default role and custom roles. - File Size Limit: Uploading a file exceeding 5 MB displays the inline error
File too large, max 5 MB.and rejects the selection. - Validation Enforcement: Attempting to submit without a resume is successfully blocked.
- Valid Attachment & Removal: Attaching a valid file under 5 MB updates the state correctly, and the Remove action clears it back to required.
No issues found.
RevathiSrini
left a comment
There was a problem hiding this comment.
Reviewed PR #5660 locally on commit b5b9a9319. Verified that resume uploads are mandatory across different job roles and that submission is blocked without a resume. Tested uploading and removing a resume, checked for duplicate resume questions, and confirmed that the form works correctly in both light and dark modes. All 16 unit tests passed, and the functionality worked as expected. Screenshots are attached for reference.
There was a problem hiding this comment.
Reviewed commit 2e6a17a. The resume is now required independently of each role’s question template, and the upload label is consistent. I checked all three changed files and confirmed the merge retains the 5 MB size validation and existing email validation. In a logged-out local run, SEEKING SOFTWARE POSITION, GENERAL, and DATA ANALYST APPLICATION each showed “Upload Resume *”; the empty file input was marked required and invalid. npx vitest run src/components/Collaboration passed 141/141 tests, including the new resume tests and upload-size tests. No blocking issues found.
RohSrik
left a comment
There was a problem hiding this comment.
Reviewed PR #5660 locally on commit (b5b9a9319)]
I verified that the Upload Resume * label appears consistently across job roles, including City Center Geodesic Dome Autodesk Inventor Simulations, and that submitting without a resume triggers the required-file validation.
I also confirmed that a valid PDF/DOCX under 5 MB is accepted and the Remove option is available. The over-5-MB rejection, successful submission, and validation after removing a resume were not fully tested.
I checked the form in dark mode and ran npx vitest run src/components/Collaboration. All 141 tests passed across 13 test files.
The functionality tested is working as expected. No issues found.






Description
Fixes # 53 (bug list priority medium) — Jobs Component: Resume Upload Requirement & Label Inconsistencies Across Job Roles
On
/job-application, the resume upload was only required when a role's form template happened to contain a required "resume" question. As a result, the default role ("APPLIED THROUGH SITE - SEEKING SOFTWARE POSITION") showed "Upload Resume (optional)" and allowed submission without a resume, while other roles required it and the label text varied by role.This PR makes the resume mandatory for every role and uses a single "Upload Resume *" label, matching the other required fields.
Related PRS (if any):
None — frontend only.
Main changes explained:
JobApplicationForm.jsx:formRequiresResumeUpload; resume is now always required in submit validation.Upload Resumelabel with the shared required asterisk (removes the "(optional)" variant).collectMissingRequiredFieldsfor unit testing.jobApplicationQuestionUtils.js:isResumeQuestionhere so it's shared withisJobApplicationFileUploadQuestion(previously duplicated regex).\bis ASCII-only in JS, so "résumé" never matched. Now uses Unicode-aware boundaries.__tests__/jobApplicationResumeRequirement.test.js:isResumeQuestionmatches Resume / Résumé / CV / Curriculum Vitae and ignores partial words ("Resumes", "cvs").How to test:
.nvmrc), run "npm install", then "npm run start:local"/job-application(no login needed)npx vitest run src/components/Collaboration— all tests passScreenshots or videos of changes:
Before:
After:
Note:
public/index.csssetsbody.dark-mode * { color: #fff !important }. This is pre-existing and affects every required field.formId_1_respondent_1onjobapplications. This is unrelated to this PR; use a different name per test submission.