import { test } from '@playwright/test'; import { ADMIN_PASSWORD, ADMIN_USERNAME } from '../constants'; test.describe('Login', () => { test('should successfully log in with valid credentials', async ({ page }) => { await page.goto('/login.html'); await page.getByTestId('username').click(); await page.getByTestId('username').fill(ADMIN_USERNAME); await page.getByTestId('password').click(); await page.getByTestId('password').fill(ADMIN_PASSWORD); await page.keyboard.press('Tab'); await page.getByTestId('sign_in').click(); await page.waitForURL((url) => !url.href.endsWith('/login.html')); }); });