fix login

This commit is contained in:
Ildar Kamalov
2025-01-24 15:26:38 +03:00
parent 9d5042b1f0
commit f3f38e1a57
4 changed files with 60 additions and 86 deletions

View File

@@ -1,4 +1,4 @@
import { test, expect } from '@playwright/test';
import { test } from '@playwright/test';
const ADMIN_USERNAME = 'admin';
const ADMIN_PASSWORD = 'superpassword';
@@ -6,12 +6,13 @@ const PORT = 3000;
test('install', async ({ page }) => {
await page.goto('/');
await page.getByRole('button', { name: 'Get Started' }).click();
await page.locator('input[name="web\\.port"]').fill(PORT.toString());
await page.getByRole('button', { name: 'Next' }).click();
await page.getByPlaceholder('Enter username').fill(ADMIN_USERNAME);
await page.getByPlaceholder('Enter password').fill(ADMIN_PASSWORD);
await page.getByPlaceholder('Confirm password').fill(ADMIN_PASSWORD);
await page.getByRole('button', { name: 'Next' }).click();
await page.getByRole('button', { name: 'Next' }).click();
await page.getByTestId('install_get_started').click();
await page.getByTestId('install_web_port').fill(PORT.toString());
await page.getByTestId('install_next').click();
await page.getByTestId('install_username').fill(ADMIN_USERNAME);
await page.getByTestId('install_password').fill(ADMIN_PASSWORD);
await page.getByTestId('install_confirm_password').fill(ADMIN_PASSWORD);
await page.getByTestId('install_next').click();
await page.getByTestId('install_next').click();
await page.getByTestId('install_open_dashboard').click();
});