chore: fixes to tests

This commit is contained in:
Stefan Benz
2024-11-20 14:22:22 +01:00
parent 64beeabce4
commit f06b22f18a
20 changed files with 404 additions and 103 deletions

View File

@@ -0,0 +1,12 @@
import { expect, Page } from "@playwright/test";
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("Could not verify OTP code");
}