auto(agent): Run expanded local discovery and continue with next actionable task
This commit is contained in:
parent
e238123393
commit
6dceec1893
14 changed files with 313 additions and 12 deletions
|
|
@ -1,9 +1,11 @@
|
|||
const { devices } = require('@playwright/test');
|
||||
const { defineConfig, devices } = require('@playwright/test');
|
||||
|
||||
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
||||
const config = {
|
||||
testDir: './scripts',
|
||||
module.exports = defineConfig({
|
||||
testDir: './tests',
|
||||
timeout: 30000,
|
||||
expect: {
|
||||
timeout: 5000
|
||||
},
|
||||
fullyParallel: true,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
|
|
@ -17,9 +19,9 @@ const config = {
|
|||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: { ...devices['Desktop Chrome'] },
|
||||
use: {
|
||||
...devices['Desktop Chrome'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
});
|
||||
27
backend/playwright.config.mjs
Normal file
27
backend/playwright.config.mjs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { defineConfig } from '@playwright/test';
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './tests',
|
||||
timeout: 30000,
|
||||
expect: {
|
||||
timeout: 5000
|
||||
},
|
||||
fullyParallel: true,
|
||||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
reporter: 'html',
|
||||
use: {
|
||||
actionTimeout: 0,
|
||||
baseURL: 'http://localhost:3000',
|
||||
trace: 'on-first-retry',
|
||||
},
|
||||
projects: [
|
||||
{
|
||||
name: 'chromium',
|
||||
use: {
|
||||
// ...devices['Desktop Chrome'],
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
@ -1,6 +1,24 @@
|
|||
import { test, expect } from '@playwright/test';
|
||||
// Einfacher HTTP-Test ohne Playwright
|
||||
// Funktion zum Senden einer HTTP-Anfrage
|
||||
async function testHealthEndpoint() {
|
||||
try {
|
||||
const response = await fetch('http://localhost:3000/health');
|
||||
if (response.status === 200) {
|
||||
console.log('Integration test passed: API server is running and healthy');
|
||||
return true;
|
||||
} else {
|
||||
console.error(`Integration test failed: Expected status 200, got ${response.status}`);
|
||||
return false;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Integration test failed:', error.message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
test('API server starts and returns 200', async ({ page }) => {
|
||||
await page.goto('http://localhost:3000/api/health');
|
||||
await expect(page.status()).toBe(200);
|
||||
// Führe den Test aus
|
||||
testHealthEndpoint().then(success => {
|
||||
if (!success) {
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
7
backend/tests/integration-test.spec.js
Normal file
7
backend/tests/integration-test.spec.js
Normal file
|
|
@ -0,0 +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);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue