Files
Critical/tests/auth/login.spec.ts
Nazanin-sh ba393dc4cb
Some checks failed
Playwright Tests / test (push) Has been cancelled
Refactor: simplify login test by removing helpers and describe block
2026-05-31 14:13:29 +03:30

18 lines
605 B
TypeScript

import { test, expect } from "@playwright/test";
const LOGIN_URL = "/auth/login?returnUrl=/admin";
test("09111111111 should redirect to /admin on successful login", async ({
page,
baseURL,
}) => {
await page.goto(LOGIN_URL);
await page
.getByRole("spinbutton", { name: "شماره موبایل" })
.fill("09111111111");
await page.getByRole("button", { name: "ادامه" }).click();
await page.getByRole("textbox", { name: "کلمه عبور" }).fill("123456");
await page.getByRole("button", { name: "ورود" }).click();
await expect(page).toHaveURL(`${baseURL}/admin`);
});