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

[Copy] Updates admin page with job advertisement information #12485

Merged
merged 26 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
265db6c
Update French copy
mnigh Jan 13, 2025
b0e69cb
Update English Describes selecting a advertisement details for a process
mnigh Jan 13, 2025
57c15d8
Update and consolidate Label for process English, French title
mnigh Jan 13, 2025
0ac832b
Replace opportunityLength with employmentDuration
mnigh Jan 13, 2025
b6cd6db
Update English Null message on sections for edit pool page
mnigh Jan 13, 2025
847e8a6
Update legend to use processMessages.closingDate
mnigh Jan 14, 2025
d205a1c
Fix container
mnigh Jan 14, 2025
78dfb1c
Remove space
mnigh Jan 14, 2025
d0b3755
Update Subtitle for the pool closing date dialog
mnigh Jan 14, 2025
b4d537f
Update First paragraph for the pool closing date dialog
mnigh Jan 14, 2025
53632ee
Update Second paragraph for pool closing date dialog
mnigh Jan 14, 2025
1a2a2b5
Update Describes selecting additional requirements for a process
mnigh Jan 14, 2025
6598b55
Update to sentence case
mnigh Jan 14, 2025
5be2f41
Update Describes selecting essentials skills for a process
mnigh Jan 14, 2025
01cc8e5
Update Sub title for basic information
mnigh Jan 14, 2025
810d674
Update Describes the 'your impact' section of a process' advertisement
mnigh Jan 14, 2025
c14f0bc
Update Describes the 'work tasks' section of a process' advertisement
mnigh Jan 14, 2025
61f34a5
Update Title for common questions
mnigh Jan 14, 2025
886ea98
Update Sub title for common questions
mnigh Jan 14, 2025
c56d199
Update Describes the 'what to expect after applying' section of a pro…
mnigh Jan 14, 2025
c599f31
Updates Describes the 'what to expect after admission' section of a p…
mnigh Jan 14, 2025
f4ffd6a
Update playwright tests
mnigh Jan 14, 2025
2ea22e7
Update playwright test
mnigh Jan 14, 2025
1d9781c
Merge branch 'main' into 12420-copy-advertisement-admin
mnigh Jan 14, 2025
14d6ae5
Consolidate Process number string
mnigh Jan 15, 2025
2bd7a75
Update French Describes the 'what to expect after applying' section o…
mnigh Jan 15, 2025
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
8 changes: 4 additions & 4 deletions apps/playwright/tests/admin/process-action-create.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ test("Create pool", async ({ appPage }) => {
.selectOption({ label: "IT-04 (Information Technology)" });

await appPage.page
.getByRole("textbox", { name: /job title \(en\)/i })
.getByRole("textbox", { name: /job title \(english\)/i })
.fill(`${PROCESS_TITLE} (EN)`);

await appPage.page
.getByRole("textbox", { name: /job title \(fr\)/i })
.getByRole("textbox", { name: /job title \(french\)/i })
.fill(`${PROCESS_TITLE} (FR)`);

await appPage.page
.getByRole("combobox", { name: /length of opportunity/i })
.getByRole("combobox", { name: /employment duration/i })
.selectOption({ label: "Various" });

await appPage.page
Expand All @@ -78,7 +78,7 @@ test("Create pool", async ({ appPage }) => {
.click();

const closingDate = appPage.page.getByRole("group", {
name: /end date/i,
name: /closing date/i,
});
await closingDate.getByRole("spinbutton", { name: /year/i }).fill("2500");
await closingDate
Expand Down
6 changes: 3 additions & 3 deletions apps/playwright/tests/admin/process-action-update.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ test.describe("Update pool", () => {
.getByRole("button", { name: /edit advertisement details/i })
.click();
await appPage.page
.getByRole("textbox", { name: /job title \(en\)/i })
.getByRole("textbox", { name: /job title \(english\)/i })
.fill("Update pool test (EN)");
await appPage.page
.getByRole("textbox", { name: /job title \(fr\)/i })
.getByRole("textbox", { name: /job title \(french\)/i })
.fill("Update pool test (FR)");
await appPage.page
.getByRole("combobox", { name: /work stream/i })
Expand All @@ -54,7 +54,7 @@ test.describe("Update pool", () => {
.click();

const closingDate = appPage.page.getByRole("group", {
name: /end date/i,
name: /closing date/i,
});
await closingDate.getByRole("spinbutton", { name: /year/i }).fill("2500");
await closingDate
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/ToggleForm/NullDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const NullDisplay = ({ title, content, optional }: NullDisplayProps) => {
description: "Null message on sections for edit pool page.",
})
: intl.formatMessage({
defaultMessage: "You haven't filled this information out yet.",
id: "xsIcls",
defaultMessage: "You haven't filled out this information yet.",
id: "D3so/C",
description: "Null message on sections for edit pool page.",
})}
</p>
Expand Down
132 changes: 60 additions & 72 deletions apps/web/src/lang/fr.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions apps/web/src/messages/processMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ const messages = defineMessages({
id: "9pYlYz",
description: "Label for a process' stream",
},
opportunityLength: {
defaultMessage: "Length of opportunity",
id: "08rkLr",
description: "Label for a process' opportunity employment duration",
employmentDuration: {
defaultMessage: "Employment duration",
id: "0Z7Ux8",
description: "Label for process employment duration",
},
titleEn: {
defaultMessage: "Specific title (English)",
id: "QISMlC",
description: "Label for a process' English title",
defaultMessage: "Job title (English)",
id: "FMPqfb",
description: "Label for process English title",
},
titleFr: {
defaultMessage: "Specific title (French)",
id: "m7ppfC",
description: "Label for a process' French title",
defaultMessage: "Job title (French)",
id: "r9cJmW",
description: "Label for process French title",
},
processNumber: {
defaultMessage: "Process number",
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/pages/Pools/EditPoolPage/EditPoolPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ export const EditPoolForm = ({
whatToExpectAdmission: pool.whatToExpectAdmission,
}), // Add understanding classification (#8831) validation here
title: intl.formatMessage({
defaultMessage: "Common questions",
id: "RahVQS",
defaultMessage: "More information",
id: "sGT8ER",
description: "Title for common questions",
}),
subtitle: intl.formatMessage({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,47 +46,40 @@ const ClosingDateDialog = ({ title }: { title: ReactNode }): JSX.Element => {
})}
</Dialog.Header>
<Dialog.Body>
<div
data-h2-display="base(flex)"
data-h2-gap="base(x.5)"
data-h2-flex-direction="base(column)"
data-h2-align-items="base(flex-start)"
>
<p>
{intl.formatMessage({
<p data-h2-margin-bottom="base(x.5)">
{intl.formatMessage({
defaultMessage:
"In order to provide an equitable opportunity for all Canadians to apply to a position, deadlines close at <strong>11:59PM Pacific time</strong> on the date you select. When shown to applicants, we ask them to apply on or before the date you've chosen to avoid confusion around time zones.",
id: "9EnhFG",
description: "First paragraph for the pool closing date dialog",
})}
</p>
<p data-h2-margin-bottom="base(x.5)">
{intl.formatMessage({
defaultMessage:
"For example, if the deadline chosen is March 1st, 2024, applicants would see “Apply on or before March 1st, 2024”, with a hard deadline of 11:59PM Pacific time. For an applicant in the Eastern time zone, this would mean that they can technically apply before 2:59AM on March 2nd.",
id: "C9jYms",
description: "Second paragraph for pool closing date dialog",
})}
</p>
<p>
{intl.formatMessage(
{
defaultMessage:
"In order to provide an equitable opportunity for all Canadians to apply to a position, deadlines close at <strong>11:59PM Pacific time</strong> on the date you select. When shown to applicants, we ask them to apply on or before the date you've chosen to avoid confusion around time zones.",
id: "9EnhFG",
description: "First paragraph for the pool closing date dialog",
})}
</p>
<p>
{intl.formatMessage({
defaultMessage:
"For example, if the deadline chosen is March 1st, 2024, applicants would see “Apply on or before March 1st, 2024”, with a hard deadline of 11:59PM Pacific time. For an applicant in the Eastern time zone, this would mean that they can technically apply before 2:59AM on March 2nd.",
id: "C9jYms",
description: "Second paragraph for pool closing date dialog",
})}
</p>
<p data-h2-display="base(flex)">
{intl.formatMessage(
{
defaultMessage:
"Have further questions? Feel free to <link>reach out to our team</link> for more information.",
id: "07p+1J",
description: "Third paragraph for pool closing date dialog",
},
{
link: (chunks: ReactNode) =>
generateLink(
routes.support(),
{ referrer: window.location.href },
chunks,
),
},
)}
</p>
</div>
"Have further questions? Feel free to <link>reach out to our team</link> for more information.",
id: "07p+1J",
description: "Third paragraph for pool closing date dialog",
},
{
link: (chunks: ReactNode) =>
generateLink(
routes.support(),
{ referrer: window.location.href },
chunks,
),
},
)}
</p>
<Dialog.Footer>
<Dialog.Close>
<Button color="secondary">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import {
} from "@gc-digital-talent/graphql";

import useDeepCompareEffect from "~/hooks/useDeepCompareEffect";
import { getExperienceFormLabels } from "~/utils/experienceUtils";
import {
hasEmptyRequiredFields,
hasInvalidRequiredFields,
} from "~/validators/process/closingDate";
import useToggleSectionInfo from "~/hooks/useToggleSectionInfo";
import ToggleForm from "~/components/ToggleForm/ToggleForm";
import processMessages from "~/messages/processMessages";

import { useEditPoolContext } from "../EditPoolContext";
import Display from "./Display";
Expand Down Expand Up @@ -68,7 +68,6 @@ const ClosingDateSection = ({
onSave,
}: ClosingDateSectionProps): JSX.Element => {
const intl = useIntl();
const experienceFormLabels = getExperienceFormLabels(intl);
const pool = getFragment(EditPoolClosingDate_Fragment, poolQuery);
const emptyRequired = hasEmptyRequiredFields(pool);
const invalidRequired = hasInvalidRequiredFields(pool);
Expand Down Expand Up @@ -169,7 +168,7 @@ const ClosingDateSection = ({
<div data-h2-margin-bottom="base(x1)">
<DateInput
id="endDate"
legend={experienceFormLabels.endDate}
legend={intl.formatMessage(processMessages.closingDate)}
name="endDate"
disabled={formDisabled}
rules={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ const CoreRequirementsSection = ({

const subtitle = intl.formatMessage({
defaultMessage:
"This section covers requirements such as remote work, on-site locations, language and security.",
id: "LKZV/V",
"This section covers requirements such as remote work, on-site locations, language, and security.",
id: "+qkjh+",
description: "Describes selecting additional requirements for a process.",
});

Expand Down Expand Up @@ -219,8 +219,8 @@ const CoreRequirementsSection = ({
name="specificLocationEn"
type="text"
label={intl.formatMessage({
defaultMessage: "Specific Location (English)",
id: "A2VzLX",
defaultMessage: "Specific location (English)",
id: "bEY1qp",
description:
"Label for a pool advertisements specific English Location",
})}
Expand All @@ -244,8 +244,8 @@ const CoreRequirementsSection = ({
name="specificLocationFr"
type="text"
label={intl.formatMessage({
defaultMessage: "Specific Location (French)",
id: "PH+6C9",
defaultMessage: "Specific location (French)",
id: "4tGRa+",
description:
"Label for a pool advertisements specific French Location",
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ const EssentialSkillsSection = ({

const subtitle = intl.formatMessage({
defaultMessage:
"Select the skills that you are looking for in applicants. Any skill selected here will be required for any applicant to apply. To increase the diversity of applications try to keep the selected number of skills to a minimum.",
id: "VKvAfu",
"Select the skills that you're looking for in applicants. Skills selected here are required for an applicant to be considered for the role. To increase the diversity of applications, please try to keep the selected number of skills to a minimum.",
id: "7gTBjD",
description: "Describes selecting essentials skills for a process.",
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const Display = ({
</ToggleForm.FieldDisplay>
<ToggleForm.FieldDisplay
hasError={!opportunityLength}
label={intl.formatMessage(processMessages.opportunityLength)}
label={intl.formatMessage(processMessages.employmentDuration)}
>
{getLocalizedName(opportunityLength?.label, intl)}
</ToggleForm.FieldDisplay>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ const PoolNameSection = ({

const subtitle = intl.formatMessage({
defaultMessage:
"This section covers the process' basics, including classification, job title, and closing date.",
id: "pQGDiR",
"This section covers the process's basics, including classification, job title, and closing date.",
id: "7Yacsa",
description: "Describes selecting a advertisement details for a process.",
});

Expand Down Expand Up @@ -405,24 +405,14 @@ const PoolNameSection = ({
id="specificTitleEn"
name="specificTitleEn"
type="text"
label={intl.formatMessage({
defaultMessage: "Job title (EN)",
id: "XiODnT",
description:
"Label for a pool advertisements specific English title",
})}
label={intl.formatMessage(processMessages.titleEn)}
disabled={formDisabled}
/>
<Input
id="specificTitleFr"
name="specificTitleFr"
type="text"
label={intl.formatMessage({
defaultMessage: "Job title (FR)",
id: "bkAzZm",
description:
"Label for a pool advertisements specific French title",
})}
label={intl.formatMessage(processMessages.titleFr)}
disabled={formDisabled}
/>
</div>
Expand All @@ -444,7 +434,7 @@ const PoolNameSection = ({
<Select
id="opportunityLength"
name="opportunityLength"
label={intl.formatMessage(processMessages.opportunityLength)}
label={intl.formatMessage(processMessages.employmentDuration)}
nullSelection={intl.formatMessage(
uiMessages.nullSelectionOption,
)}
Expand All @@ -459,11 +449,7 @@ const PoolNameSection = ({
id="processNumber"
name="processNumber"
type="text"
label={intl.formatMessage({
defaultMessage: "Process Number",
id: "1E0RiD",
description: "Label for a pools process number",
})}
label={intl.formatMessage(processMessages.processNumber)}
context={intl.formatMessage({
defaultMessage:
"This process number is obtained from your HR shop",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ const WhatToExpectAdmissionSection = ({

const subtitle = intl.formatMessage({
defaultMessage:
'This question helps applicants understand what it means to be in a recruitment "pool" and what they should expect as qualified candidates.',
id: "Q2uL2b",
"This information helps applicants understand what it means to be in a recruitment process and what they should expect as qualified candidates.",
id: "zLuuVe",
description:
"Describes the 'what to expect after admission' section of a process' advertisement.",
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ const WhatToExpectSection = ({

const subtitle = intl.formatMessage({
defaultMessage:
"This information lets applicants know what they can expect after they apply, such as further exams, meeting with managers directly and possible timelines.",
id: "ww+trY",
"This information lets applicants know what they can expect after they apply, such as further exams, meeting with managers directly, and possible timelines.",
id: "+/ZsxX",
description:
"Describes the 'what to expect after applying' section of a process' advertisement.",
});
Expand Down
8 changes: 4 additions & 4 deletions packages/i18n/src/lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@
"defaultMessage": "Région de l'Ontario (excluant Ottawa)",
"description": "The work region of Canada described as Ontario."
},
"CYirJF": {
"defaultMessage": "Vous devez indiquer le lieu précis en anglais et en français si l'annonce ne vise pas un poste à distance.",
"description": "Error message that advertisement locations must be filled in English and French."
},
"ChFxsM": {
"defaultMessage": "Région de l'Atlantique (Nouveau-Brunswick, Terre-Neuve-et-Labrador, Nouvelle-Écosse et Île-du-Prince-Édouard.)",
"description": "The work region of Canada described as Atlantic."
Expand Down Expand Up @@ -847,10 +851,6 @@
"defaultMessage": "Jour",
"description": "Label for a day of the month input field"
},
"aMkZ80": {
"defaultMessage": "Vous devez indiquer le lieu précis en anglais et en français si l’annonce ne vise pas un poste à distance.",
"description": "Error message that advertisement locations must be filled in English and French."
},
"aTHtqQ": {
"defaultMessage": "Obtention d’un diplôme",
"description": "Option for education requirement, graduation with degree"
Expand Down
4 changes: 2 additions & 2 deletions packages/i18n/src/messages/apiMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ export const apiMessages: Record<string, MessageDescriptor> = defineMessages({
},
PoolLocationRequired: {
defaultMessage:
"You must fill Specific Location in English and French if advertisement is not remote.",
id: "aMkZ80",
"You must fill Specific location in English and French if advertisement is not remote.",
id: "CYirJF",
description:
"Error message that advertisement locations must be filled in English and French.",
},
Expand Down
Loading