diff --git a/frontends/main/src/app-pages/DashboardPage/CoursewareDisplay/OrganizationCards.test.tsx b/frontends/main/src/app-pages/DashboardPage/CoursewareDisplay/OrganizationCards.test.tsx
index 8e418041d0..5dcac8df1f 100644
--- a/frontends/main/src/app-pages/DashboardPage/CoursewareDisplay/OrganizationCards.test.tsx
+++ b/frontends/main/src/app-pages/DashboardPage/CoursewareDisplay/OrganizationCards.test.tsx
@@ -55,10 +55,6 @@ describe("OrganizationCards", () => {
return renderWithProviders()
}
- afterEach(() => {
- jest.clearAllMocks()
- })
-
it("renders nothing when user has no B2B organizations", () => {
setup({ organizations: [] })
@@ -133,8 +129,12 @@ describe("OrganizationCards", () => {
// Should show all contracts for the organization
// Each contract appears twice (mobile + desktop)
- expect(await screen.findAllByText("Contract 1")).toHaveLength(2)
- expect(screen.getAllByText("Contract 2")).toHaveLength(2)
+ expect(
+ await screen.findAllByRole("link", { name: "Contract 1" }),
+ ).toHaveLength(2)
+ expect(screen.getAllByRole("link", { name: "Contract 2" })).toHaveLength(
+ 2,
+ )
})
it("renders Continue buttons with correct organization URLs", async () => {
diff --git a/frontends/main/src/app-pages/DashboardPage/CoursewareDisplay/OrganizationCards.tsx b/frontends/main/src/app-pages/DashboardPage/CoursewareDisplay/OrganizationCards.tsx
index 970fcfe8ce..08a4c20de1 100644
--- a/frontends/main/src/app-pages/DashboardPage/CoursewareDisplay/OrganizationCards.tsx
+++ b/frontends/main/src/app-pages/DashboardPage/CoursewareDisplay/OrganizationCards.tsx
@@ -1,7 +1,7 @@
import React from "react"
import Image from "next/image"
import graduateLogo from "@/public/images/dashboard/graduate.png"
-import { Stack, Typography, styled, theme } from "ol-components"
+import { Stack, Typography, styled, theme, Link } from "ol-components"
import { useQuery } from "@tanstack/react-query"
import { DashboardCardRoot } from "./DashboardCard"
import { mitxUserQueries } from "api/mitxonline-hooks/user"
@@ -55,12 +55,17 @@ const CardRootStyled = styled(DashboardCardRoot)({
},
})
+const TitleLink = styled(Link)({
+ width: "100%",
+})
+
const CardContent = styled(Stack)({
display: "flex",
justifyContent: "space-between",
alignItems: "center",
padding: "16px",
width: "100%",
+ gap: "16px",
"&:not(:last-child)": {
borderBottom: `1px solid ${theme.custom.colors.lightGray2}`,
},
@@ -90,19 +95,20 @@ interface OrganizationContractsProps {
const OrganizationContracts: React.FC = ({
org,
}) => {
- const contractContent = org.contracts?.length
- ? org.contracts?.map((contract) => (
+ const contractContent =
+ org.contracts?.map((contract) => {
+ const href = organizationView(org.slug.replace("org-", ""))
+ return (
- {contract.name}
-
+
+ {contract.name}
+
+
Continue
- ))
- : null
+ )
+ }) ?? null
return (