Complete worked example
typescript
import { test, expect } from "../support/test.js";
test("combined filters show only the shared match", async ({page}) => {
await page.goto("/");
await page.getByLabel("Country", {exact:true}).selectOption("UA");
await page.getByLabel("Search roles").fill("qa");
const rows = page.getByRole("list", {name:"Matching roles"}).getByRole("listitem");
await expect(rows).toHaveCount(1);
await expect(rows.first()).toContainText("QA Engineer");
});- Reasoning
- The result assertions distinguish AND semantics and are scoped to the intended list.