feat(ui): add Playwright setup with basic configuration for E2E testing in Next.js

This commit is contained in:
sumit_chaturvedi committed 2025-06-23 10:56:57 +05:30
1 parent 223aab8ece
commit bd0749daa8
4 files changed
+150 -2

No files matched your search

+15
View File
@@ -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('/');
});