Repository navigation
Aditya Dhayapulay - Jobs Component: Add required Terms and Conditions checkbox - #5651
adit24dhaya wants to merge 4 commits into
Conversation
✅ 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 on Node 20.19.4 with the backend running on development. Ran the new test file: npx vitest run src/components/Collaboration/tests/JobApplicationForm.terms.test.jsx. Tested /job-application logged out in dark mode and logged in as Admin in light mode, at desktop width and at 320px and 375px in Chrome device mode. Kept the Network tab open and did not submit a real application.
Verified working
- All 8 tests in JobApplicationForm.terms.test.jsx pass.
- The "I agree to terms and conditions" checkbox sits right above Submit and starts unchecked. While it is unchecked Submit is greyed out and clicking it does nothing.
- With the box checked and fields empty Submit is enabled and the existing "Please fill out this field." validation still shows.
- Space toggles the checkbox and Submit follows the state.
- Tab reaches the terms link and shows a visible focus outline.
- The link opens onecommunityglobal.org/terms-and-conditions/ in a new tab and the form keeps its state.
- At 320px the label and hint wrap and the checkbox and Submit stay inside the form card. At 375px everything fits on one line.
- Readable in dark mode and light mode.
Issues found
None
snehitakandula
left a comment
There was a problem hiding this comment.
Reviewed on this PR's branch (pr-5651) at commit d811245, frontend only, with backend on development. Tested /job-application as Admin and as Volunteer, in light and dark mode. I didn't submit a real application.
-
Tests: 8/8 passing
npx vitest run src/components/Collaboration/__tests__/JobApplicationForm.terms.test.jsxpasses all 8 tests, including keeping the agreement after an API failure and keeping Submit disabled while a submission is in flight. -
Checkbox behavior
- The "I agree to terms and conditions" checkbox appears above Submit, unchecked, with the hint "Required before submitting your application." Submit is greyed out.
- Checking the box enables Submit, and unchecking it disables Submit again.
-
Volunteer role: logged in as a Volunteer, the checkbox shows and works the same way.
-
Dark mode: the label, terms link, and hint are readable, and Submit is visibly disabled until the box is checked.
These add the uncheck and Volunteer cases to @AlekyaJogini's checks.
Screenshots:
Light mode, unchecked (Submit disabled):

Dark mode, unchecked (Submit disabled):
Approving.
rahulrubugunday
left a comment
There was a problem hiding this comment.
Tested locally on pr-5651 at d811245 as Admin on /job-application, in light and dark mode. Branch merges cleanly with development.
“I agree to terms and conditions *” appears directly above Submit, unchecked by default, with the hint “Required before submitting your application.”
Submit your application is disabled while the box is unchecked, becomes enabled when checked, and is disabled again when unchecked.
The “terms and conditions” link points to https://onecommunityglobal.org/terms-and-conditions/ and opens in a new tab.
The checkbox, label, link and disabled/enabled button are readable in both light and dark mode.
AaditTrivedi
left a comment
There was a problem hiding this comment.
Reviewed by Aadit Trivedi.
Checked out the PR (no conflicts with development) and ran JobApplicationForm.terms.test.jsx: 8/8 passing.
Verified
- The job application form now requires agreeing to the terms and conditions: submitting without the checkbox shows "Please agree to the terms and conditions before submitting." and moves focus to the checkbox.
- The checkbox is accessible: it has a matching label,
aria-invalidreflects the error, andaria-describedbypoints to the hint or error text. The form also hasaria-label="Job application". - The checkbox and error reset when the form resets.
Pointer, not blocking
- #5653 also changes
JobApplicationForm.jsxand currently has conflicts, so whichever merges second will need to resolve them.
Approving.
iAbhi001
left a comment
There was a problem hiding this comment.
Tested locally on pr-5651 at d811245 frontend-only with backend on development on /job-application in both light and dark mode. All 8 tests in the terms test suite pass, the mandatory terms checkbox renders properly right above Submit, and the submit button stays disabled until the box is checked. Keyboard focus, external link routing to the policy page in a new tab, and mobile responsive behavior all look solid. However, requesting changes because GitHub is reporting a merge conflict with development in JobApplicationForm.module.css. Please rebase onto the latest development branch and resolve the conflict so this can be merged.
Add an unchecked required terms checkbox above Submit and link the existing organization policy. Disable submission without agreement and guard the submit handler so applicants must explicitly acknowledge the terms. Reset agreement after success, retain it on failed requests, and cover gating, reset and retry with isolated component tests. Keep styles scoped and support mobile, dark mode and keyboard focus. Task: Jobs Component item 51 — Missing Terms and Conditions Checkbox (Figma node 91-774).
d4f4112
d811245 to
d4f4112
Compare
shubhamjakhete
left a comment
There was a problem hiding this comment.
Checked out the PR at d4f4112 and ran the tests (frontend only, no UI testing).
- Branch merges cleanly with the latest development, so the earlier merge conflict is resolved.
- JobApplicationForm.terms.test.jsx: 10/10 passing (the dark/light mode cases run twice, so Vitest counts 10 instead of 8).
- All tests in src/components/Collaboration still pass (110/110).
Approving.
muthapriyanka
left a comment
There was a problem hiding this comment.
I reviewed the changes for PR #5651. The required terms checkbox is placed before Submit, prevents submission when unchecked, and resets after a successful submission while preserving the applicant’s entries after a failed request. The focused tests cover these behaviors. I found no blocking issues and approve the PR.
Preserve the original Google Doc request so reviewers can compare the implementation with the assigned requirements.
080a837
Restore the previous file tree at the author's request; retain the images locally for manual attachment.
Bring in the current development fixes, including the stable Activity List clock fixture. Make duplicate-submission tests accept the required terms before submitting so they exercise the intended success and error paths. Preserve required consent and the existing form behavior. PR #5651; Task 51 / action item 1505
|
Fixed the CI failures in All 2,653 source tests pass (14 skipped), including both previously failing submission tests. Build and repository-wide lint pass with zero lint errors. The consent requirement is unchanged. All three GitHub test jobs, Sonar Quality Gate and the preview build now pass. |
|




Description
Original task request
Original task in Google Docs
Complete task captured directly from the original document; the requested wording is unchanged.
Addresses Task 51 (High Priority): Jobs Component — Missing "Terms and Conditions" Checkbox on Job Application Form (Figma Discrepancy).
The approved design includes a mandatory “I agree to terms and conditions” checkbox immediately before Submit on
/job-application. The control and policy agreement text were missing, allowing applicants to submit without checking an acknowledgement. This change adds the linked checkbox and blocks frontend submission until it is checked.Task description · Figma node 91-774
Related PRs
None. Frontend only; no backend, API payload, database, email or CAPTCHA changes.
Main changes
How to test
npm run start:skip-tests./job-application, choose a role and scroll to the bottom. No login is required for the public form.Validation
CI follow-up — October 26, 2026
At commit
3e50f3a9ea, updated the branch with development252a015a6cand made duplicate-submission test fixtures check the required terms box before submitting. This also brings in development's stable-clock fix for the Activity List test. Required consent behavior is preserved.All three GitHub test jobs, Sonar Quality Gate and the Netlify preview passed on this commit. The browser evidence below was recorded during earlier feature validation; no new UI behavior was added in this CI follow-up.
Earlier feature validation
Validation repeated after rebasing the single task commit onto development
850e10973a:Additional isolated Chromium checks cover 34 expanded scenarios (eight widths, both themes, anonymous/Owner users, plus Administrator CSS 200% zoom), nine responsive/retry scenarios and two new-tab controls. Sixty-six scoped axe scans cover the new checkbox, label, hint/error and Submit controls. Requests are mocked and external browser traffic blocked. The public terms URL was independently HEAD-checked (HTTP 200).
Screenshots or videos
Nine code/UI screenshots and a short captioned development walkthrough are prepared locally for the weekly submission. They are not attached to this PR yet; no local file paths are being presented as uploaded media.
Notes and testing limits
npm run lintalso scans ignored local review fixtures that are not included in this PR; tracked JavaScript was checked separately.