This commit is contained in:
Max Peintner
2024-11-15 13:48:42 +01:00
parent bdd0357211
commit c9eb18a7bf
17 changed files with 547 additions and 536 deletions

View File

@@ -1,12 +1,12 @@
import {expect, Page} from "@playwright/test";
import { expect, Page } from "@playwright/test";
const usernameUserInput = "username-text-input"
const usernameUserInput = "username-text-input";
export async function loginnameScreen(page: Page, username: string) {
await page.getByTestId(usernameUserInput).pressSequentially(username);
await page.getByTestId(usernameUserInput).pressSequentially(username);
}
export async function loginnameScreenExpect(page: Page, username: string) {
await expect(page.getByTestId(usernameUserInput)).toHaveValue(username);
await expect(page.getByTestId('error').locator('div')).toContainText("Could not find user")
await expect(page.getByTestId(usernameUserInput)).toHaveValue(username);
await expect(page.getByTestId("error").locator("div")).toContainText("Could not find user");
}