Skip to content

Commit

Permalink
test: update playwright selectors (#5275)
Browse files Browse the repository at this point in the history
  • Loading branch information
petermakowski authored Jan 11, 2024
1 parent 8ac7786 commit cb28f85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/machines.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ test("machines list loads", async ({ page }) => {
ws.on("close", () => console.log("WebSocket closed"));
});
await expect(page).toHaveTitle(/Machines/);
await expect(page.getByTestId("section-header-title")).toHaveText(
await expect(page.getByTestId("main-toolbar-heading")).toHaveText(
/[0-9]+ machine[s]? in [0-9]+ pool[s]?/i
);
await expect(page.getByRole("grid", { name: /Loading/i })).toBeHidden();
// expect a single machine.list and machine.count request
await expect(machineListRequests.length).toBe(1);
await expect(machineCountRequests.length).toBe(1);
// perform machine search
await page.getByLabel("Search").type("doesnotexist");
await page.getByLabel("Search").locator("visible=true").type("doesnotexist");
await expect(page.getByRole("grid", { name: /Loading/i })).toBeHidden();
await expect(
page.getByText(/No machines match the search criteria/)
Expand Down

0 comments on commit cb28f85

Please sign in to comment.