diff --git a/backend/playwright.config.js b/backend/playwright.config.js index d2fc64f..efcd928 100644 --- a/backend/playwright.config.js +++ b/backend/playwright.config.js @@ -1,6 +1,6 @@ -const { defineConfig, devices } = require('@playwright/test'); +import { defineConfig, devices } from '@playwright/test'; -module.exports = defineConfig({ +export default defineConfig({ testDir: './tests', timeout: 30000, expect: { diff --git a/backend/playwright.config.mjs b/backend/playwright.config.mjs index d063a8f..efcd928 100644 --- a/backend/playwright.config.mjs +++ b/backend/playwright.config.mjs @@ -1,4 +1,4 @@ -import { defineConfig } from '@playwright/test'; +import { defineConfig, devices } from '@playwright/test'; export default defineConfig({ testDir: './tests', @@ -20,7 +20,7 @@ export default defineConfig({ { name: 'chromium', use: { - // ...devices['Desktop Chrome'], + ...devices['Desktop Chrome'], }, }, ], diff --git a/backend/tests/integration-test.spec.js b/backend/tests/integration-test.spec.js index 0cb61c0..bc78bfe 100644 --- a/backend/tests/integration-test.spec.js +++ b/backend/tests/integration-test.spec.js @@ -1,7 +1,7 @@ import { test, expect } from '@playwright/test'; -test('API server starts and returns 200', async ({ page }) => { - await page.goto('http://localhost:3000/api/health'); - const status = await page.status(); - expect(status).toBe(200); +test('API server starts and returns 200', async () => { + // Verwende fetch statt Playwrights page-Objekt für einen einfachen HTTP-Test + const response = await fetch('http://localhost:3000/api/health'); + expect(response.status).toBe(200); }); \ No newline at end of file