Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
acouch committed May 15, 2024
1 parent 76ee897 commit ba7ae0e
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 12 deletions.
20 changes: 13 additions & 7 deletions frontend/src/app/process/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,28 @@ import BetaAlert from "src/components/AppBetaAlert";
import Breadcrumbs from "src/components/Breadcrumbs";
import PageSEO from "src/components/PageSEO";
import { Metadata } from "next";
import ProcessIntro from "src/pages/content/ProcessIntro";
import ProcessInvolved from "src/pages/content/ProcessInvolved";
import ProcessMilestones from "src/pages/content/ProcessMilestones";
import { getTranslations } from "next-intl/server";
import ProcessIntro from "src/components/content/ProcessIntro";
import ProcessInvolved from "src/components/content/ProcessInvolved";
import ProcessMilestones from "src/components/content/ProcessMilestones";
import { useTranslations } from "next-intl";
import { unstable_setRequestLocale } from "next-intl/server";

export async function generateMetadata() {
const t = await getTranslations({ locale: "en" });
export function generateMetadata() {
// TODO: Enable once [locale] folder created, see: https://next-intl-docs.vercel.app/docs/getting-started/app-router/with-i18n-routing
// const t = await getTranslations({ locale: "en" });
const meta: Metadata = {
title: t("Process.page_title"),
// title: t("Process.page_title"),
title: "Process | Simpler.Grants.gov",
description:
"A one‑stop shop for all federal discretionary funding to make it easy for you to discover, understand, and apply for opportunities.",
};

return meta;
}

export default function Process() {
// TODO: Remove when https://github.com/amannn/next-intl/issues/663 lands.
unstable_setRequestLocale("en");
const t = useTranslations("Process");

return (
Expand Down
2 changes: 1 addition & 1 deletion frontend/stories/components/ProcessContent.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Meta } from "@storybook/react";
import ProcessContent from "src/pages/content/ProcessIntro";
import ProcessContent from "src/components/content/ProcessIntro";

const meta: Meta<typeof ProcessContent> = {
title: "Components/Content/Process Content",
Expand Down
2 changes: 1 addition & 1 deletion frontend/tests/components/ProcessIntro.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from "tests/react-utils";
import ProcessIntro from "src/pages/content/ProcessIntro";
import ProcessIntro from "src/components/content/ProcessIntro";

describe("Process Content", () => {
it("Renders without errors", () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/tests/components/ProcessInvolved.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from "tests/react-utils";
import ProcessInvolved from "src/pages/content/ProcessInvolved";
import ProcessInvolved from "src/components/content/ProcessInvolved";

describe("Process Content", () => {
it("Renders without errors", () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/tests/components/ProcessMilestones.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from "tests/react-utils";
import ProcessMilestones from "src/pages/content/ProcessMilestones";
import ProcessMilestones from "src/components/content/ProcessMilestones";

describe("Process Content", () => {
it("Renders without errors", () => {
Expand Down
4 changes: 3 additions & 1 deletion frontend/tests/pages/process.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { render, screen, waitFor } from "tests/react-utils";
import { screen, waitFor } from "tests/react-utils";
import { render } from "@testing-library/react";

import { axe } from "jest-axe";
import Process from "src/app/process/page";

Expand Down

0 comments on commit ba7ae0e

Please sign in to comment.