Skip to content

Commit dc1e5b4

Browse files
updating orgname sort field in frontend (#394)
1 parent 9c5416f commit dc1e5b4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

frontend/src/state/requests/organizations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import type { SortOption } from "../../@types/search"
77
export const ORGANIZATION_SORT_OPTIONS: Record<string, SortOption> = {
88
"name-asc": {
99
labelKey: "organizations.sort.name-asc",
10-
apiValue: "organizationtoname__name",
10+
apiValue: "primary_name",
1111
},
1212
"name-desc": {
1313
labelKey: "organizations.sort.name-desc",
14-
apiValue: "-organizationtoname__name",
14+
apiValue: "-primary_name",
1515
},
1616
} as const
1717

playwright/tests/user-journeys/organization-journey.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ test.describe("Organization Journey", () => {
7373
await expect(sortButton).toContainText("Name (A-Z)")
7474
await sortButton.click()
7575
await expect(page.locator("[role='listbox']")).toBeVisible()
76-
const sortPromise = page.waitForResponse("**fhir/Organization/?page=1&page_size=10&name=TEST&_sort=-organizationtoname__name")
76+
const sortPromise = page.waitForResponse("**fhir/Organization**")
7777
await page.getByRole("option", { name: "Name (Z-A)" }).click()
7878
await expect(sortButton).toContainText("Name (Z-A)")
7979
const sort = await sortPromise;
8080

81-
const page2Promise = page.waitForResponse("**fhir/Organization/?page=2&page_size=10&name=TEST&_sort=-organizationtoname__name")
81+
const page2Promise = page.waitForResponse("**fhir/Organization**")
8282
await page.getByLabel("Next Page").first().click()
8383
const page2 = await page2Promise;
8484

85-
const page3Promise = page.waitForResponse("**fhir/Organization/?page=3&page_size=10&name=TEST&_sort=-organizationtoname__name")
85+
const page3Promise = page.waitForResponse("**fhir/Organization**")
8686
await page.getByLabel("Next Page").first().click()
8787
const page3 = await page3Promise;
8888

0 commit comments

Comments
 (0)