Skip to content

Commit

Permalink
Merge pull request #73 from mcode/backoffice
Browse files Browse the repository at this point in the history
723 - Build workflow for back-office staff
  • Loading branch information
plarocque4 authored Nov 4, 2024
2 parents b965c3f + d20a8ef commit 564b833
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions EnvironmentVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
- `VITE_CDS_SERVICE`
- `VITE_CLIENT`
- `VITE_CLIENT_SCOPES`
- `VITE_USE_DEFAULT_USER`
- `VITE_DEFAULT_USER`
- `VITE_EHR_BASE`
- `VITE_EHR_LINK`
Expand Down Expand Up @@ -219,6 +220,7 @@
- `VITE_CDS_SERVICE`
- `VITE_CLIENT`
- `VITE_CLIENT_SCOPES`
- `VITE_USE_DEFAULT_USER`
- `VITE_DEFAULT_USER`
- `VITE_EHR_BASE`
- `VITE_EHR_SERVER`
Expand Down
7 changes: 4 additions & 3 deletions tests/useCase1/uc1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test("UC1: content appears in SMART on FHIR, fill out patient enroll form", asyn

// 1a. Sign in
await page.getByRole('button', { name: /Launch/ }).click();
await testUtilKeycloakLogin({ page: page });
await testUtilKeycloakLogin({ page: page, username: "janedoe", password: "jane" });

// 1c1. Expect blank state.
await expect(page).toHaveTitle(/EHR/);
Expand All @@ -34,9 +34,10 @@ test("UC1: content appears in SMART on FHIR, fill out patient enroll form", asyn
// 1b. Clear any lingering state in the database.
await page.getByRole('button', { name: 'Settings' }).click();
await page.getByRole('button', { name: 'Reset PIMS Database' }).click();
await page.getByRole('button', { name: 'Clear In-Progress Forms' }).click();
await page.getByRole('button', { name: 'Clear EHR In-Progress Forms' }).click();
await page.getByRole('button', { name: 'Reset REMS-Admin Database' }).click();
await page.getByRole('button', { name: 'Clear EHR MedicationDispenses' }).click();
await page.getByRole('button', { name: 'Clear EHR Dispense Statuses' }).click();
await page.getByRole('button', { name: 'Clear EHR Tasks' }).click();
await page.getByRole('button', { name: 'Reconnect EHR' }).click();


Expand Down
4 changes: 2 additions & 2 deletions tests/util/keycloakLogin.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Page, expect } from "@playwright/test";

/* Ideally these would be sourced from the testing environment, but constants are fine too. */
const USERNAME = "alice";
const PASSWORD = "alice";
const USERNAME = "janedoe";
const PASSWORD = "jane";

/** Attempts to log into a fresh Keycloak page using a hard-coded username/password, or the one specified in the call. */
export async function testUtilKeycloakLogin(props: { page: Page; username?: string; password?: string }) {
Expand Down

0 comments on commit 564b833

Please sign in to comment.