Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
import type { Locator, Page } from "@playwright/test";
export const expectLocatorHidden = async ({
locator,
message,
}: {
locator: Locator;
message: string;
}) => {
if (await locator.isVisible({ timeout: 1_000 }).catch(() => false)) {
throw new Error(message);
}
};
export const expectTextHidden = async ({
page,
text,
}: {
page: Page;
text: string;
}) => {
await expectLocatorHidden({
locator: page.getByText(text, { exact: true }).first(),
message: `Expected text "${text}" to be hidden`,
});
};