Skip to content

Commit 61849e8

Browse files
committed
loading by default
1 parent f35304a commit 61849e8

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

packages/cdk/resources/Cognito.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,10 @@ export class Cognito extends Construct {
187187

188188
const callbackUrls = [
189189
`https://${props.fullCloudfrontDomain}/site/`,
190+
// FIXME: This is temporary, until we get routing fixed
190191
`https://${props.fullCloudfrontDomain}/site/auth_demo.html`,
191-
`https://${props.fullCloudfrontDomain}/auth_demo/`
192+
`https://${props.fullCloudfrontDomain}/auth_demo/`,
193+
`https://${props.fullCloudfrontDomain}/oauth2/idpresponse`
192194
]
193195

194196
const logoutUrls = [

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

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,6 @@ describe("SelectYourRolePage", () => {
3333
jest.clearAllMocks();
3434
});
3535

36-
it("renders a heading by default (not signed in) but eventually shows an error", async () => {
37-
// Not signed in
38-
renderWithAuth({
39-
isSignedIn: false,
40-
idToken: "",
41-
});
42-
43-
// Wait for error summary to appear
44-
await waitFor(() => {
45-
const errorHeading = screen.getByRole("heading", { name: /Error during role selection/i })
46-
expect(errorHeading).toBeInTheDocument();
47-
const errorText = screen.getByText("No login session found");
48-
expect(errorText).toBeInTheDocument();
49-
});
50-
});
51-
5236
it("renders loading state when signed in but fetch hasn't resolved yet", async () => {
5337
// Mock fetch to never resolve
5438
mockFetch.mockImplementation(() => new Promise(() => {}));
@@ -161,7 +145,7 @@ describe("SelectYourRolePage", () => {
161145
expect(confirmButton).toBeInTheDocument();
162146

163147
// Roles Without Access details expander
164-
const expander = screen.getByText("Roles without access");
148+
const expander = screen.getByText("View your roles without access to the clinical prescription tracking service.");
165149
expect(expander).toBeInTheDocument();
166150

167151
// Expand details if needed or just confirm the table is present

packages/cpt-ui/constants/ui-strings/CardStrings.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ export const SELECT_ROLE_PAGE_TEXT = {
3838
},
3939
alternativeMessage: "Alternatively, you can choose a new role below.",
4040
organisation: "Organisation",
41-
role: "Role"
41+
role: "Role",
42+
roles_without_access_table_title: "View your roles without access to the clinical prescription tracking service."
4243
}

0 commit comments

Comments
 (0)