Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Fill Fields" button to query page, add FHIR Server drop down, & collapse demo and test user journeys #2549

Merged
merged 23 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9230ef0
add fill fields, remove autofill
m-goggins Sep 12, 2024
3114e63
remove userJourney
m-goggins Sep 12, 2024
bdbe3e0
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Sep 12, 2024
55a71e0
remove connection string
m-goggins Sep 12, 2024
b37d006
Add advanced button to fhir servers
m-goggins Sep 12, 2024
41799c2
rename custom styles
m-goggins Sep 12, 2024
56fbf1a
Merge branch 'marcelle/2527/remove-autopop' of https:/CDC…
m-goggins Sep 12, 2024
85bcecf
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Sep 12, 2024
c04622a
Merge branch 'main' of https:/CDCgov/phdi into marcelle/2…
m-goggins Sep 13, 2024
7f14799
merge cleanup
m-goggins Sep 13, 2024
bee885b
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Sep 13, 2024
b87d6cc
update e2e tests for new workflows
m-goggins Sep 13, 2024
ef7d7ec
Merge branch 'marcelle/2527/remove-autopop' of https:/CDC…
m-goggins Sep 13, 2024
4b74c28
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Sep 13, 2024
e303cb0
Merge branch 'main' of https:/CDCgov/phdi into marcelle/2…
m-goggins Sep 16, 2024
edd3cdc
Merge branch 'main' of https:/CDCgov/phdi into marcelle/2…
m-goggins Sep 16, 2024
56b361a
add back brandon's select option
m-goggins Sep 16, 2024
3f14f94
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Sep 16, 2024
4f2115f
add back default value
m-goggins Sep 16, 2024
c2d1c4e
remove useEffect
m-goggins Sep 16, 2024
f707d3d
Merge branch 'marcelle/2527/remove-autopop' of https:/CDC…
m-goggins Sep 16, 2024
f33223e
remove useEffect
m-goggins Sep 16, 2024
963fa64
[pre-commit.ci] auto fixes from pre-commit hooks
pre-commit-ci[bot] Sep 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions containers/tefca-viewer/e2e/query_workflow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ test.describe("querying with the TryTEFCA viewer", () => {
await page
.getByLabel("Patient", { exact: true })
.selectOption("newborn-screening-referral");
await page.getByRole("button", { name: "Fill fields" }).click();
await page.getByLabel("First Name").fill("Watermelon");
await page.getByLabel("Last Name").fill("McGee");
await page.getByLabel("Date of Birth").fill("2024-07-12");
await page.getByLabel("Medical Record Number").fill("18091");
await page.getByLabel("Phone Number").fill("5555555555");

await page.getByRole("button", { name: "Search for patient" }).click();

// Make sure we have a results page with a single patient
Expand Down Expand Up @@ -98,6 +98,10 @@ test.describe("querying with the TryTEFCA viewer", () => {
await page
.getByLabel("Query", { exact: true })
.selectOption("social-determinants");
await page.getByRole("button", { name: "Advanced" }).click();
await page
.getByLabel("FHIR Server (QHIN)", { exact: true })
.selectOption("HELIOS Meld: Direct");

await page.getByLabel("First Name").fill("Ellie");
await page.getByLabel("Last Name").fill("Williams");
Expand Down Expand Up @@ -125,6 +129,7 @@ test.describe("querying with the TryTEFCA viewer", () => {
await page
.getByLabel("Patient", { exact: true })
.selectOption("sti-syphilis-positive");
await page.getByRole("button", { name: "Fill fields" }).click();

// Delete last name and MRN to force phone number as one of the 3 fields
await page.getByLabel("Last Name").clear();
Expand All @@ -150,6 +155,7 @@ test.describe("querying with the TryTEFCA viewer", () => {
await page
.getByLabel("Query", { exact: true })
.selectOption("social-determinants");
await page.getByRole("button", { name: "Fill fields" }).click();
await page.getByRole("button", { name: "Search for patient" }).click();
await expect(
page.getByRole("heading", { name: "Query Results" }),
Expand All @@ -161,6 +167,7 @@ test.describe("querying with the TryTEFCA viewer", () => {
}) => {
await page.getByRole("button", { name: "Go to the demo" }).click();
await page.getByLabel("Query", { exact: true }).selectOption("chlamydia");
await page.getByRole("button", { name: "Fill fields" }).click();
await page.getByLabel("Phone Number").fill("");
await page.getByRole("button", { name: "Search for patient" }).click();
await expect(
Expand Down Expand Up @@ -190,17 +197,9 @@ test.describe("Test the user journey of a 'tester'", () => {
await expect(
page.getByRole("heading", { name: "Search for a Patient", exact: true }),
).toBeVisible();
await expect(
page.getByRole("heading", { name: "Query information", exact: true }),
).toBeVisible();
await expect(page.getByLabel("Query", { exact: true })).toBeVisible();
await expect(
page.getByLabel("FHIR Server (QHIN)", { exact: true }),
).toBeVisible();
await expect(
page.getByRole("heading", { name: "Patient information", exact: true }),
).toBeVisible();
await expect(page.getByLabel("Patient", { exact: true })).toBeVisible();
await expect(page.getByRole("button", { name: "Advanced" })).toBeVisible();
});

test("Query for patient using auto-filled data", async ({ page }) => {
Expand All @@ -227,6 +226,7 @@ test.describe("Test the user journey of a 'tester'", () => {
await page
.getByLabel("Query", { exact: true })
.selectOption("Newborn screening follow-up");
await page.getByRole("button", { name: "Advanced" }).click();
await page
.getByLabel("FHIR Server (QHIN)", { exact: true })
.selectOption("HELIOS Meld: Direct");
Expand All @@ -253,6 +253,7 @@ test.describe("Test the user journey of a 'tester'", () => {
await page
.getByLabel("Query", { exact: true })
.selectOption("Chlamydia case investigation");
await page.getByRole("button", { name: "Advanced" }).click();
await page
.getByLabel("FHIR Server (QHIN)", { exact: true })
.selectOption("JMC Meld: Direct");
Expand Down
1 change: 0 additions & 1 deletion containers/tefca-viewer/src/app/database-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const dbConfig: PoolConfig = {
user: process.env.POSTGRES_USER,
password: process.env.POSTGRES_PASSWORD,
host: process.env.POSTGRES_HOST,
connectionString: process.env.DATABASE_URL,
m-goggins marked this conversation as resolved.
Show resolved Hide resolved
port: Number(process.env.POSTGRES_PORT),
database: process.env.POSTGRES_DB,
max: 10, // Maximum # of connections in the pool
Expand Down
Loading
Loading