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

marketing copy #3146

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,8 @@ $RECYCLE.BIN/
OverlayTool.tsx
overlayImages

/node_modules
/node_modules

# Nextjs Files
.next
next-env.d.ts
57 changes: 26 additions & 31 deletions frontend/cypress/e2e/faq-page.cy.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,42 @@
const faq_data = {
"training-explorer": [
"training",
"tuition-assistance-for-training",
"data-sources"
],
"training-explorer": ["training", "tuition-assistance-for-training", "data-sources"],
"eligible-training-provider-list": [
"etpl-program-general-information",
"etpl-information-for-students",
"etpl-information-for-providers",
],
"indemand-occupations": [
"indemand-occupation-list",
],
"private-career-schools": [
"private-career-schools"
]
}
"indemand-occupations": ["indemand-occupation-list"],
"private-career-schools": ["private-career-schools"],
};

const faq_groups = Object.keys(faq_data);


describe("FAQ Page", () => {
it("is accessible", () => {
cy.visit("/faq");
cy.injectAxe();

// TODO add My Career NJ back in after the content has been updated in Contentful

cy.contains("Get answers to all of your").should("exist");
cy.contains(
"Find quick answers to commonly asked questions about the New Jersey Training Explorer.",
).should("exist");
cy.checkA11y();
});

describe("default page", () => {
beforeEach(() => {
cy.visit("/faq");
})
});

it("should include default link in url", () => {
cy.url().should("include", "#training");
})
});

it("should have only default navigation group open", () => {
faq_groups.forEach((group, index) => {
if (index > 0) {
cy.shouldBeActive(`[data-testid="topic-${group}"]`,false);
cy.shouldBeActive(`[data-testid="topic-${group}"]`, false);
faq_data[group].forEach((topic) => {
cy.shouldBeVisible(`[data-testid="link-${topic}"]:visible`, false);
});
Expand Down Expand Up @@ -79,22 +72,24 @@ describe("FAQ Page", () => {
.should("have.class", "open")
.within(() => {
cy.get(`[data-testid="accordion-content-${index}"]`).should("exist");
cy.contains("The types of training you will find on this website range from private career schools, non-profit schools, community colleges, vocational schools, literacy programs, short-term occupational and skills training programs, and registered apprenticeships. There are also a select number of higher education programs on this list.").should("exist");
cy.contains(
"The types of training you will find on this website range from private career schools, non-profit schools, community colleges, vocational schools, literacy programs, short-term occupational and skills training programs, and registered apprenticeships. There are also a select number of higher education programs on this list.",
).should("exist");
});
}
})
});
});
})
});

describe("visiting faq page with specific #link in url", () => {
beforeEach(() => {
cy.visit("/faq#etpl-information-for-students");
})
});

it("should have correct navigation group visible", () => {
faq_groups.forEach((group) => {
cy.get(`[data-testid="topic-${group}"]`).should("exist");

if (group === "eligible-training-provider-list") {
cy.shouldBeActive(`[data-testid="topic-${group}"]`, true);
} else {
Expand Down Expand Up @@ -123,17 +118,18 @@ describe("FAQ Page", () => {
.should("not.have.class", "open")
.within(() => {
cy.get(`[data-testid="accordion-content-${index}"]:visible`).should("not.exist");
});;
});
} else {
cy.get(`[data-testid="accordion-${index}"]`)
.should("have.class", "open")
.within(() => {
cy.get(`[data-testid="accordion-content-${index}"]`)
.should("exist")
.invoke('text').should('have.length.gt', 0); // Due to the nature of the content, we can't predict the exact text
.invoke("text")
.should("have.length.gt", 0); // Due to the nature of the content, we can't predict the exact text
});
}
})
});
});
});

Expand Down Expand Up @@ -164,7 +160,7 @@ describe("FAQ Page", () => {
it("should change the url when clicked", () => {
cy.visit("/faq");
cy.url().should("include", "#training");

faq_groups.forEach((group, index) => {
if (index > 0) {
cy.get(`[data-testid="topic-${group}"]`).click();
Expand All @@ -178,7 +174,7 @@ describe("FAQ Page", () => {
cy.url().should("include", `#${topic}`);
});
}
})
});
});

it("changes active link when url is changed", () => {
Expand All @@ -189,7 +185,7 @@ describe("FAQ Page", () => {
cy.shouldBeVisible(`[data-testid="link-${topic}"]:visible`, true);
cy.shouldBeActive(`[data-testid="link-${topic}"]:visible`, true);
cy.navHasOneActiveLink("#faqNav");
})
});
} else {
faq_data[group].forEach((topic) => {
cy.visit(`/faq#${topic}`);
Expand All @@ -198,8 +194,7 @@ describe("FAQ Page", () => {
cy.navHasOneActiveLink("#faqNav");
});
}
})
});
});
})

});
});
11 changes: 9 additions & 2 deletions frontend/src/faq-page/FaqPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export const FaqPage = (props: Props): ReactElement<Props> => {
title: data
? `${data?.page?.title} | ${process.env.REACT_APP_SITE_NAME}`
: `Frequently Asked Questions | ${process.env.REACT_APP_SITE_NAME}`,
pageDescription: data?.page?.pageDescription || "Get answers to all of your My Career NJ questions",
pageDescription:
data?.page?.pageDescription || "Get answers to all of your My Career NJ questions",
image: data?.page?.ogImage?.url || pageImage,
keywords: data?.page?.keywords || [
"FAQ",
Expand All @@ -58,7 +59,13 @@ export const FaqPage = (props: Props): ReactElement<Props> => {
<Layout client={props.client} theme="support" seo={seoObject}>
{data && (
<>
<PageBanner {...data.page.pageBanner} date={data.page.sys.publishedAt} />
<PageBanner
{...data.page.pageBanner}
date={data.page.sys.publishedAt}
title="Your success matters."
message={undefined}
description="Find quick answers to commonly asked questions about the New Jersey Training Explorer."
/>
<FaqCollection items={data?.page.categoriesCollection.items} />

<CtaBanner
Expand Down
11 changes: 6 additions & 5 deletions frontend/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const en = {
ExplorerPage: {
bannerSubheading: "Find classes to help you qualify for in-demand jobs.",
bannerMessageCopy:
"Imagine having a personal guide to help you choose the best training for your future. New Jersey Training Explorer makes it easy to find the classes and skills training programs you need. Check out the catalog of vetted schools and courses that will boost your skills—so youll be ready to take on new career opportunities.",
"Imagine having a personal guide to help you choose the best training for your future. New Jersey Training Explorer makes it easy to find the classes and skills training programs you need. Check out the catalog of vetted schools and courses that will boost your skills—so you'll be ready to take on new career opportunities.",
header: "Power up your search to find your next training opportunity",
sectionOneHeader: "Get Started",
sectionOneText:
Expand Down Expand Up @@ -138,9 +138,10 @@ export const en = {
},
InDemandPage: {
pageTitle: "In-Demand Occupations",
header: "In-Demand Occupations",
header:
"Cut out the guesswork and make your next career move count with New Jersey's most in-demand jobs.",
description:
"This is a list of occupations expected to have the most openings in the future in the State of New Jersey. Trainings related to occupations on this list can be eligible for funding by the State. Some occupations qualify for local or regional wavers and are noted below.",
"What makes this list valuable? We've done the research to make it easier for you to discover New Jersey's most in-demand, fastest growing jobs in careers. Find the training you may need on the New Training Explorer to power up your career and open doors to your next opportunity.",
descriptionTextLink: "Learn more about local and regional waivers",
typeaheadPlaceholder: "Search for occupations",
},
Expand All @@ -151,7 +152,7 @@ export const en = {
headerText:
"Find training to better prepare you for a promotion, better job, or even a career change",
searchBoxPlaceholder: "Enter occupation, certification, provider, or SOC code",
swimLaneHeader: "Helpful how-tos",
swimLaneHeader: "Helpful how-to's",
columnOneHeader: "For Training Seekers",
columnTwoHeader: "For Counselors and Coaches",
columnThreeHeader: "For Training Providers",
Expand Down Expand Up @@ -336,6 +337,6 @@ export const en = {
"To sign up for this training opportunity, please contact the provider at the details below.",
trainingStepOneDescription: "Search by occupation, provider, and more",
trainingStepTwoDescription: "Filter and compare results",
trainingStepThreeDescription: "Visit training providers website to enroll",
trainingStepThreeDescription: "Visit training provider's website to enroll",
},
};
8 changes: 7 additions & 1 deletion frontend/src/training-provider-page/TrainingProviderPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ export const TrainingProviderPage = (props: Props): ReactElement<Props> => {
<>
{data && (
<Layout client={props.client} theme="training" seo={seoObject}>
<PageBanner {...data.page.pageBanner} date={data.page.sys.publishedAt} />
<PageBanner
{...data.page.pageBanner}
title="Advancing excellence among New Jersey's training providers."
description="Find the resources and tools you need to build high-quality training programs."
date={data.page.sys.publishedAt}
/>

<TabContent items={data?.page.tabs.items} />
</Layout>
)}
Expand Down
Loading