Skip to content

Commit 8e22b83

Browse files
more response assertions (#392)
1 parent c0902c0 commit 8e22b83

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,18 @@ 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**")
7677
await page.getByRole("option", { name: "Name (Z-A)" }).click()
78+
const sort = await sortPromise;
7779
await expect(sortButton).toContainText("Name (Z-A)")
7880

81+
const page2Promise = page.waitForResponse("**/fhir/Organization**")
7982
await page.getByLabel("Next Page").first().click()
80-
await expect(page).toHaveURL(/page=2/)
83+
const page2 = await page2Promise;
8184

82-
const responsePromise = page.waitForResponse("**/fhir/Organization**")
85+
const page3Promise = page.waitForResponse("**/fhir/Organization**")
8386
await page.getByLabel("Next Page").first().click()
84-
const response = await responsePromise;
87+
const page3 = await page3Promise;
8588

8689
await expect(page.getByRole("link", { name: "AAA Test Org" })).toBeVisible()
8790
await page.getByRole("link", { name: "AAA Test Org" }).click()

0 commit comments

Comments
 (0)