feat(e2e): Fix authentication tests and environment handling

This commit is contained in:
Rakshit Tiwari 2025-06-17 23:35:42 +05:30
parent 20100e120b
commit a3bfbf5948
15 changed files with 324 additions and 43 deletions

View file

@ -4,7 +4,7 @@ import AxeBuilder from '@axe-core/playwright'; // 1
test('Landing page should not have any automatically detectable accessibility issues', async ({
page,
}) => {
await page.goto('http://localhost:3080/', { timeout: 5000 });
await page.goto('/', { timeout: 5000 });
const accessibilityScanResults = await new AxeBuilder({ page }).analyze();
@ -12,7 +12,7 @@ test('Landing page should not have any automatically detectable accessibility is
});
test('Conversation page should be accessible', async ({ page }) => {
await page.goto('http://localhost:3080/', { timeout: 5000 });
await page.goto('/', { timeout: 5000 });
// Create a conversation (you may need to adjust this based on your app's behavior)
const input = await page.locator('form').getByRole('textbox');
@ -27,7 +27,7 @@ test('Conversation page should be accessible', async ({ page }) => {
});
test('Navigation elements should be accessible', async ({ page }) => {
await page.goto('http://localhost:3080/', { timeout: 5000 });
await page.goto('/', { timeout: 5000 });
const navAccessibilityScanResults = await new AxeBuilder({ page }).include('nav').analyze();
@ -35,7 +35,7 @@ test('Navigation elements should be accessible', async ({ page }) => {
});
test('Input form should be accessible', async ({ page }) => {
await page.goto('http://localhost:3080/', { timeout: 5000 });
await page.goto('/', { timeout: 5000 });
const formAccessibilityScanResults = await new AxeBuilder({ page }).include('form').analyze();