Files
luci-app-zt-gateway/e2e/login.spec.ts

15 lines
550 B
TypeScript
Raw Normal View History

import { test, expect } from '@playwright/test';
import { login } from './utils/auth';
test('login navigates to admin area', async ({ page }) => {
// login() waits for the LuCI JS framework to render the login view,
// fills root / empty password, submits, and waits for the admin menu.
await login(page);
// After login, LuCI lands on the admin overview at /cgi-bin/luci/
await expect(page).toHaveURL(/\/cgi-bin\/luci\//);
// The bootstrap admin menu should be visible.
await expect(page.locator('.nav').first()).toBeVisible();
});