mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-11-08 12:24:45 +00:00
feat(ui): add Playwright setup with basic configuration for E2E testing in Next.js
This commit is contained in:
1 parent
223aab8ece
commit
bd0749daa8
4 files changed
+150
-2
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { test } from '@playwright/test';
|
||||
|
||||
// Test credentials from environment variables
|
||||
const TEST_USER_EMAIL = process.env.TEST_USER_EMAIL || 'dev@prowler.com';
|
||||
const TEST_USER_PASSWORD = process.env.TEST_USER_PASSWORD || 'thisisapassword123';
|
||||
|
||||
test('should login successfully and redirect to home page', async ({ page }) => {
|
||||
await page.goto('/login');
|
||||
const title = await page.title();
|
||||
|
||||
await page.fill('input[name="email"]', TEST_USER_EMAIL);
|
||||
await page.fill('input[name="password"]', TEST_USER_PASSWORD);
|
||||
await page.click('button[type="submit"]');
|
||||
await page.waitForURL('/');
|
||||
});
|
||||
Reference in new issue
Block a user