// Automatically retries until element is visible or timeout:
await expect(page.getByRole("button", { name: "Checkout" })).toBeVisible();
await expect(page.getByTestId("cart-badge")).toHaveText("3");
await expect(page).toHaveURL("https://targetqa.com/cart");// Soft assertions (continue test execution on failure):
await expect.soft(page.getByTestId("banner")).toBeVisible();