From 67f7fca04ae2949bcb409597038929d6fe281647 Mon Sep 17 00:00:00 2001 From: Madhura Date: Wed, 25 Feb 2026 15:01:19 +0000 Subject: [PATCH 1/9] Remove events from signup form --- .../elements/inputs/RegistrationEmailPreference.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/app/components/elements/inputs/RegistrationEmailPreference.tsx b/src/app/components/elements/inputs/RegistrationEmailPreference.tsx index 9fc300b8ff..ceb8284e6f 100644 --- a/src/app/components/elements/inputs/RegistrationEmailPreference.tsx +++ b/src/app/components/elements/inputs/RegistrationEmailPreference.tsx @@ -13,8 +13,7 @@ interface RegistrationEmailPreferenceProps { type EmailPreferenceDescriptions = { assignments: string; - news: string; - events: string; + newsAndUpdates: string; }; export const RegistrationEmailPreference = ({ @@ -29,13 +28,11 @@ export const RegistrationEmailPreference = ({ property: "ASSIGNMENTS", condition: userRole === "STUDENT", }, - { key: "news", property: "NEWS_AND_UPDATES" }, - { key: "events", property: "EVENTS" }, + { key: "newsAndUpdates", property: "NEWS_AND_UPDATES" }, ]; const isaacEmailPreferenceDescriptions: EmailPreferenceDescriptions = { assignments: "Receive assignment notifications from your teacher.", - news: "Be the first to know about new topics, new platform features, and our fantastic competition giveaways.", - events: "Get valuable updates on our free student workshops happening near you.", + newsAndUpdates: "Be the first to know about new topics, platform features, competitions and free student events.", }; return ( From 4a87b977a2fe6740b8274d743589881a6d30ea5e Mon Sep 17 00:00:00 2001 From: Madhura Date: Wed, 25 Feb 2026 16:20:14 +0000 Subject: [PATCH 2/9] Fix the email preferences in signup form --- .../elements/inputs/RegistrationEmailPreference.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/components/elements/inputs/RegistrationEmailPreference.tsx b/src/app/components/elements/inputs/RegistrationEmailPreference.tsx index ceb8284e6f..9491bb3bd0 100644 --- a/src/app/components/elements/inputs/RegistrationEmailPreference.tsx +++ b/src/app/components/elements/inputs/RegistrationEmailPreference.tsx @@ -25,10 +25,11 @@ export const RegistrationEmailPreference = ({ const preferences = [ { key: "assignments", + label: "Assignments", property: "ASSIGNMENTS", condition: userRole === "STUDENT", }, - { key: "newsAndUpdates", property: "NEWS_AND_UPDATES" }, + { key: "newsAndUpdates", label: "News and Updates", property: "NEWS_AND_UPDATES" }, ]; const isaacEmailPreferenceDescriptions: EmailPreferenceDescriptions = { assignments: "Receive assignment notifications from your teacher.", @@ -47,7 +48,7 @@ export const RegistrationEmailPreference = ({ const description = isaacEmailPreferenceDescriptions[preference.key as keyof EmailPreferenceDescriptions]; return preference.condition === undefined || preference.condition ? ( - {preference.key.charAt(0).toUpperCase() + preference.key.slice(1)} + {preference.label} {description} Date: Thu, 26 Feb 2026 09:44:13 +0000 Subject: [PATCH 3/9] Remove description line for teacher accounts --- src/app/components/elements/panels/UserEmailPreferences.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/components/elements/panels/UserEmailPreferences.tsx b/src/app/components/elements/panels/UserEmailPreferences.tsx index 6fd46abc5d..ac30707b57 100644 --- a/src/app/components/elements/panels/UserEmailPreferences.tsx +++ b/src/app/components/elements/panels/UserEmailPreferences.tsx @@ -56,8 +56,7 @@ export const UserEmailPreference = ({

Get important information about the Isaac {SITE_SUBJECT_TITLE} programme delivered to your inbox. These settings can be changed at any time. Expect a monthly newsletter featuring news, updates, and event announcements. - Assignment notifications will be sent as needed by your teacher.{" "} - {userIsStudent && "Assignment notifications will be sent as needed by your teacher."} + {userIsStudent && " Assignment notifications will be sent as needed by your teacher."}

From fe0fa5d6909b3396a9555e2fd79639440531ff47 Mon Sep 17 00:00:00 2001 From: Madhura Date: Thu, 26 Feb 2026 10:05:09 +0000 Subject: [PATCH 4/9] Fix tests for events --- src/test/pages/StudentRegistration.test.tsx | 4 ++-- src/test/utils.tsx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/pages/StudentRegistration.test.tsx b/src/test/pages/StudentRegistration.test.tsx index 2902b30e94..40acb36539 100644 --- a/src/test/pages/StudentRegistration.test.tsx +++ b/src/test/pages/StudentRegistration.test.tsx @@ -48,7 +48,7 @@ describe("Student Registration", () => { examBoard, assignmentPreferences, newsPreferences, - events, + // events, submitButton, recaptcha, } = formFields; @@ -66,7 +66,7 @@ describe("Student Registration", () => { examBoard(), assignmentPreferences(), newsPreferences(), - events(), + // events(), submitButton(), recaptcha(), ].forEach((each) => expect(each).toBeVisible()); diff --git a/src/test/utils.tsx b/src/test/utils.tsx index e03bc42532..8d8cece554 100644 --- a/src/test/utils.tsx +++ b/src/test/utils.tsx @@ -182,7 +182,7 @@ export const getFormFields = () => { verificationInfo: () => screen.getByRole("textbox", { name: /url of a page/i }), assignmentPreferences: () => screen.queryByRole("cell", { name: /receive assignment/i }), newsPreferences: () => screen.getByRole("radio", { name: /no for news_and_updates/i }), - events: () => screen.getByRole("radio", { name: /no for events/i }), + // events: () => screen.getByRole("radio", { name: /no for events/i }), additionalInfo: () => screen.getByRole("textbox", { name: /any other information/i }), otherInfo: () => screen.getByRole("textbox", { name: /other information/i }), submitButton: () => screen.getByRole("button", { name: "Register my account" }), @@ -209,7 +209,7 @@ export const fillFormCorrectly = async (correctly: boolean, role: "teacher" | "s stage, verificationInfo, newsPreferences, - events, + // events, otherInfo, recaptcha, } = formFields; @@ -223,7 +223,7 @@ export const fillFormCorrectly = async (correctly: boolean, role: "teacher" | "s await fillTextField(password(), registrationUserData.password); await fillTextField(confirmPassword(), registrationUserData.password); await userEvent.click(newsPreferences()); - await userEvent.click(events()); + // await userEvent.click(events()); await userEvent.click(noSchool()); await selectOption(stage(), registrationUserData.stage); await fillTextField(otherInfo(), "extra information"); @@ -249,7 +249,7 @@ export const fillFormCorrectly = async (correctly: boolean, role: "teacher" | "s password, confirmPassword, newsPreferences, - events, + // events, recaptcha, } = formFields; await fillTextField(givenName(), registrationUserData.givenName); @@ -263,7 +263,7 @@ export const fillFormCorrectly = async (correctly: boolean, role: "teacher" | "s await fillTextField(password(), registrationUserData.password); await fillTextField(confirmPassword(), registrationUserData.password); await userEvent.click(newsPreferences()); - await userEvent.click(events()); + // await userEvent.click(events()); } else { await fillTextField(password(), registrationUserData.wrongPassword); await fillTextField(confirmPassword(), registrationUserData.wrongPassword); From 037f7db06be85fb29f54ce490cc18b902ff2d4d8 Mon Sep 17 00:00:00 2001 From: Madhura Date: Thu, 26 Feb 2026 10:11:23 +0000 Subject: [PATCH 5/9] Fix teacher registration tests for events --- src/test/pages/TeacherRegistration.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/pages/TeacherRegistration.test.tsx b/src/test/pages/TeacherRegistration.test.tsx index 9caf205881..1698c901ee 100644 --- a/src/test/pages/TeacherRegistration.test.tsx +++ b/src/test/pages/TeacherRegistration.test.tsx @@ -80,7 +80,7 @@ describe("Teacher Registration", () => { stage, examBoard, newsPreferences, - events, + // events, submitButton, verificationInfo, additionalInfo, @@ -103,7 +103,7 @@ describe("Teacher Registration", () => { stage(), examBoard(), newsPreferences(), - events(), + // events(), submitButton(), verificationInfo(), additionalInfo(), @@ -172,7 +172,7 @@ describe("Teacher Registration", () => { EMAIL_PREFERENCE: { NEWS_AND_UPDATES: false, ASSIGNMENTS: true, - EVENTS: false, + // EVENTS: false, }, }), expect.objectContaining([ From 5b223eee2a76834e370d94c0c734ff19848f6c04 Mon Sep 17 00:00:00 2001 From: Madhura Date: Thu, 26 Feb 2026 10:26:13 +0000 Subject: [PATCH 6/9] fix registration email preference tests --- .../RegistrationEmailPreference.test.tsx | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/test/components/elements/inputs/RegistrationEmailPreference.test.tsx b/src/test/components/elements/inputs/RegistrationEmailPreference.test.tsx index a50ac2ea0a..e41546a1fc 100644 --- a/src/test/components/elements/inputs/RegistrationEmailPreference.test.tsx +++ b/src/test/components/elements/inputs/RegistrationEmailPreference.test.tsx @@ -5,18 +5,18 @@ import { TestUserRole, renderTestEnvironment } from "../../../utils"; describe("RegistrationEmailPreference", () => { const mockSetEmailPreferences = jest.fn(); - const preferences = ["NEWS_AND_UPDATES", "ASSIGNMENTS", "EVENTS"]; + const preferences = ["NEWS_AND_UPDATES", "ASSIGNMENTS"]; const getOptions = { assignments: () => screen.getByText("Assignments"), news: () => screen.getByText("News"), - events: () => screen.getByText("Events"), + // events: () => screen.getByText("Events"), assignmentsDescription: () => screen.getByText("Receive assignment notifications from your teacher."), newsDescription: () => screen.getByText( "Be the first to know about new topics, new platform features, and our fantastic competition giveaways.", ), - eventsDescription: () => screen.getByText("Get valuable updates on our free student workshops happening near you."), + // eventsDescription: () => screen.getByText("Get valuable updates on our free student workshops happening near you."), }; const setupTest = (role: TestUserRole, props = {}) => { @@ -36,15 +36,8 @@ describe("RegistrationEmailPreference", () => { it("renders correct options for student registration", () => { setupTest("STUDENT"); - const { assignments, news, events, assignmentsDescription, newsDescription, eventsDescription } = getOptions; - const allOptions = [ - assignments(), - assignmentsDescription(), - news(), - newsDescription(), - events(), - eventsDescription(), - ]; + const { assignments, news, assignmentsDescription, newsDescription } = getOptions; + const allOptions = [assignments(), assignmentsDescription(), news(), newsDescription()]; allOptions.forEach((option) => { expect(option).toBeInTheDocument(); }); @@ -52,8 +45,8 @@ describe("RegistrationEmailPreference", () => { it("renders correct options for teacher registration", () => { setupTest("TEACHER"); - const { news, newsDescription, events, eventsDescription } = getOptions; - [news(), newsDescription(), events(), eventsDescription()].forEach((option) => { + const { news, newsDescription } = getOptions; + [news(), newsDescription()].forEach((option) => { expect(option).toBeInTheDocument(); }); const assignmentsOption = screen.queryByText("Assignments"); @@ -79,7 +72,7 @@ describe("RegistrationEmailPreference", () => { it("if form submission is attempted but not all preferences are selected, affected options are marked as invalid, and 'required' feedback shows", () => { setupTest("STUDENT", { submissionAttempted: true, - emailPreferences: { ASSIGNMENTS: false, EVENTS: true }, + emailPreferences: { ASSIGNMENTS: false }, }); const newsPreferenceTrueLabel = screen.getByLabelText(/Yes.*for NEWS_AND_UPDATES/); const newsPreferenceFalseLabel = screen.getByLabelText(/No.*for NEWS_AND_UPDATES/); @@ -96,7 +89,6 @@ describe("RegistrationEmailPreference", () => { submissionAttempted: true, emailPreferences: { ASSIGNMENTS: false, - EVENTS: true, NEWS_AND_UPDATES: true, }, }); From d28c99f317c4c767b2522bf11d695a75cfd9f729 Mon Sep 17 00:00:00 2001 From: Madhura Date: Thu, 26 Feb 2026 10:39:02 +0000 Subject: [PATCH 7/9] Change all occurences of news to News and updates --- src/app/services/validation.ts | 2 +- .../RegistrationEmailPreference.test.tsx | 18 ++++++++---------- src/test/pages/StudentRegistration.test.tsx | 1 - 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/app/services/validation.ts b/src/app/services/validation.ts index 610a792c27..8f8e1023f3 100644 --- a/src/app/services/validation.ts +++ b/src/app/services/validation.ts @@ -360,7 +360,7 @@ export const getPasswordInfo = (password: string) => { export const validateEmailPreferences = (emailPreferences?: UserEmailPreferences | null) => { return ( emailPreferences && - [emailPreferences.ASSIGNMENTS, emailPreferences.EVENTS, emailPreferences.NEWS_AND_UPDATES].reduce( + [emailPreferences.ASSIGNMENTS, emailPreferences.NEWS_AND_UPDATES].reduce( // Make sure all expected values are either true or false (prev, next) => prev && (next === true || next === false), true, diff --git a/src/test/components/elements/inputs/RegistrationEmailPreference.test.tsx b/src/test/components/elements/inputs/RegistrationEmailPreference.test.tsx index e41546a1fc..2e5d25712b 100644 --- a/src/test/components/elements/inputs/RegistrationEmailPreference.test.tsx +++ b/src/test/components/elements/inputs/RegistrationEmailPreference.test.tsx @@ -9,14 +9,12 @@ describe("RegistrationEmailPreference", () => { const getOptions = { assignments: () => screen.getByText("Assignments"), - news: () => screen.getByText("News"), - // events: () => screen.getByText("Events"), + newsAndUpdates: () => screen.getByText("News and Updates"), assignmentsDescription: () => screen.getByText("Receive assignment notifications from your teacher."), - newsDescription: () => + newsAndUpdatesDescription: () => screen.getByText( - "Be the first to know about new topics, new platform features, and our fantastic competition giveaways.", + "Be the first to know about new topics, platform features, competitions and free student events.", ), - // eventsDescription: () => screen.getByText("Get valuable updates on our free student workshops happening near you."), }; const setupTest = (role: TestUserRole, props = {}) => { @@ -36,8 +34,8 @@ describe("RegistrationEmailPreference", () => { it("renders correct options for student registration", () => { setupTest("STUDENT"); - const { assignments, news, assignmentsDescription, newsDescription } = getOptions; - const allOptions = [assignments(), assignmentsDescription(), news(), newsDescription()]; + const { assignments, newsAndUpdates, assignmentsDescription, newsAndUpdatesDescription } = getOptions; + const allOptions = [assignments(), assignmentsDescription(), newsAndUpdates(), newsAndUpdatesDescription()]; allOptions.forEach((option) => { expect(option).toBeInTheDocument(); }); @@ -45,8 +43,8 @@ describe("RegistrationEmailPreference", () => { it("renders correct options for teacher registration", () => { setupTest("TEACHER"); - const { news, newsDescription } = getOptions; - [news(), newsDescription()].forEach((option) => { + const { newsAndUpdates, newsAndUpdatesDescription } = getOptions; + [newsAndUpdates(), newsAndUpdatesDescription()].forEach((option) => { expect(option).toBeInTheDocument(); }); const assignmentsOption = screen.queryByText("Assignments"); @@ -79,7 +77,7 @@ describe("RegistrationEmailPreference", () => { expect(newsPreferenceTrueLabel).toBeInvalid(); expect(newsPreferenceFalseLabel).toBeInvalid(); const emailPreferenceFeedback = screen.getByText("required", { - selector: "#news-feedback", + selector: "#newsAndUpdates-feedback", }); expect(emailPreferenceFeedback).toBeInTheDocument(); }); diff --git a/src/test/pages/StudentRegistration.test.tsx b/src/test/pages/StudentRegistration.test.tsx index 40acb36539..67be55ec8e 100644 --- a/src/test/pages/StudentRegistration.test.tsx +++ b/src/test/pages/StudentRegistration.test.tsx @@ -110,7 +110,6 @@ describe("Student Registration", () => { EMAIL_PREFERENCE: { NEWS_AND_UPDATES: false, ASSIGNMENTS: true, - EVENTS: false, }, }), expect.objectContaining([ From 96bcc958c26da4ee401fa25c4a7681a14474763b Mon Sep 17 00:00:00 2001 From: Madhura Date: Thu, 26 Feb 2026 10:46:03 +0000 Subject: [PATCH 8/9] Remove commented code --- src/test/pages/TeacherRegistration.test.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/test/pages/TeacherRegistration.test.tsx b/src/test/pages/TeacherRegistration.test.tsx index 1698c901ee..876a3d33c2 100644 --- a/src/test/pages/TeacherRegistration.test.tsx +++ b/src/test/pages/TeacherRegistration.test.tsx @@ -80,7 +80,6 @@ describe("Teacher Registration", () => { stage, examBoard, newsPreferences, - // events, submitButton, verificationInfo, additionalInfo, @@ -103,7 +102,6 @@ describe("Teacher Registration", () => { stage(), examBoard(), newsPreferences(), - // events(), submitButton(), verificationInfo(), additionalInfo(), @@ -172,7 +170,6 @@ describe("Teacher Registration", () => { EMAIL_PREFERENCE: { NEWS_AND_UPDATES: false, ASSIGNMENTS: true, - // EVENTS: false, }, }), expect.objectContaining([ From cec4e3f11893854337fb952d10095a7972e77b6d Mon Sep 17 00:00:00 2001 From: Madhura Date: Thu, 26 Feb 2026 10:55:17 +0000 Subject: [PATCH 9/9] Remove unwanted code --- src/test/utils.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/test/utils.tsx b/src/test/utils.tsx index 8d8cece554..8ceb1c4002 100644 --- a/src/test/utils.tsx +++ b/src/test/utils.tsx @@ -182,7 +182,6 @@ export const getFormFields = () => { verificationInfo: () => screen.getByRole("textbox", { name: /url of a page/i }), assignmentPreferences: () => screen.queryByRole("cell", { name: /receive assignment/i }), newsPreferences: () => screen.getByRole("radio", { name: /no for news_and_updates/i }), - // events: () => screen.getByRole("radio", { name: /no for events/i }), additionalInfo: () => screen.getByRole("textbox", { name: /any other information/i }), otherInfo: () => screen.getByRole("textbox", { name: /other information/i }), submitButton: () => screen.getByRole("button", { name: "Register my account" }), @@ -209,7 +208,6 @@ export const fillFormCorrectly = async (correctly: boolean, role: "teacher" | "s stage, verificationInfo, newsPreferences, - // events, otherInfo, recaptcha, } = formFields; @@ -223,7 +221,6 @@ export const fillFormCorrectly = async (correctly: boolean, role: "teacher" | "s await fillTextField(password(), registrationUserData.password); await fillTextField(confirmPassword(), registrationUserData.password); await userEvent.click(newsPreferences()); - // await userEvent.click(events()); await userEvent.click(noSchool()); await selectOption(stage(), registrationUserData.stage); await fillTextField(otherInfo(), "extra information"); @@ -249,7 +246,6 @@ export const fillFormCorrectly = async (correctly: boolean, role: "teacher" | "s password, confirmPassword, newsPreferences, - // events, recaptcha, } = formFields; await fillTextField(givenName(), registrationUserData.givenName); @@ -263,7 +259,6 @@ export const fillFormCorrectly = async (correctly: boolean, role: "teacher" | "s await fillTextField(password(), registrationUserData.password); await fillTextField(confirmPassword(), registrationUserData.password); await userEvent.click(newsPreferences()); - // await userEvent.click(events()); } else { await fillTextField(password(), registrationUserData.wrongPassword); await fillTextField(confirmPassword(), registrationUserData.wrongPassword);