Files
ZitPlane/auth/ui/v2/apps/login/acceptance/tests/code-screen.ts
T

14 lines
503 B
TypeScript

import { expect, Page } from "@playwright/test";
import en from "../../locales/en.json";
const codeTextInput = "code-text-input";
export async function codeScreen(page: Page, code: string) {
await page.getByTestId(codeTextInput).pressSequentially(code);
}
export async function codeScreenExpect(page: Page, code: string) {
await expect(page.getByTestId(codeTextInput)).toHaveValue(code);
await expect(page.getByTestId("error").locator("div")).toContainText(en.otp.errors.couldNotVerifyCode);
}