Skip to content

Commit 8c665df

Browse files
committed
These tests still need resolving
1 parent bbff3cd commit 8c665df

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/cpt-ui/__tests__/SelectYourRolePage.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import "@testing-library/jest-dom";
22
import { render, screen, waitFor } from "@testing-library/react";
33
import SelectYourRolePage from "../app/selectyourrole/page";
44
import React from "react";
5-
import { AuthContext } from "@/context/AuthContext";
5+
import { AuthContext } from "@/context/AuthProvider";
66

77
// Mock `next/navigation` globally
88
jest.mock("next/navigation", () => ({
@@ -150,7 +150,7 @@ describe("SelectYourRolePage", () => {
150150

151151
// Expand details if needed or just confirm the table is present
152152
// For the table, look for the "Tech Org" text or the column values
153-
const orgCell = await screen.findByText(/Tech Org \(ODS: ORG456\)/i);
153+
const orgCell = await screen.findAllByText(/Tech Org \(ODS: ORG456\)/i);
154154
expect(orgCell).toBeInTheDocument();
155155

156156
const roleCell = await screen.findByText("Technician");

packages/cpt-ui/app/selectyourrole/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export default function SelectYourRolePage() {
116116
);
117117
}
118118

119-
const { title, caption, insetText, confirmButton, alternativeMessage, organisation, role } =
119+
const { title, caption, insetText, confirmButton, alternativeMessage, organisation, role, roles_without_access_table_title } =
120120
SELECT_ROLE_PAGE_TEXT;
121121

122122
return (
@@ -149,7 +149,7 @@ export default function SelectYourRolePage() {
149149
{/* Roles with access Section */}
150150
<Col width="two-thirds">
151151
<div className="section" >
152-
{trackerUserInfoData?.roles_without_access?.map((role, index) => (
152+
{trackerUserInfoData?.roles_with_access?.map((role, index) => (
153153
<EpsCard key={index}
154154
orgName={role.org_name ? role.org_name : "No Org Name"}
155155
odsCode={role.org_code ? role.org_code : "No ODS Code"}

0 commit comments

Comments
 (0)