chore: Add some tests
Some checks failed
CI / Get Changed Files (pull_request) Successful in 8s
Pull Request Labeler / labeler (pull_request_target) Successful in 6s
Label PRs based on size / Check PR size (pull_request) Successful in 13s
Claude PR Review / claude-code (pull_request) Successful in 26s
CI / oxlint (pull_request) Successful in 25s
CI / Docker frontend validation (pull_request) Successful in 23s
CI / prettier (pull_request) Successful in 56s
CI / eslint (pull_request) Successful in 1m9s
CI / Docker backend validation (pull_request) Successful in 28s
CI / test-build (pull_request) Successful in 1m26s
CI / Checkstyle Main (pull_request) Successful in 1m32s
CI / Playwright (pull_request) Failing after 32s
CI / Backend Tests (pull_request) Successful in 2m13s

This commit is contained in:
Jan K9f 2025-06-04 11:24:49 +02:00
commit 4fafba5731
13 changed files with 197 additions and 15 deletions

View file

@ -0,0 +1,8 @@
import { test, expect } from '@playwright/test';
test('backend works', async ({ page }) => {
await page.goto('http://localhost:8080/health');
const response = await page.textContent('body');
expect(response).toBeTruthy();
expect(page.getByText('{"status":"UP"}')).toBeVisible();
});

View file

@ -0,0 +1,9 @@
import { test, expect } from '@playwright/test';
test('home page loads correctly', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveTitle(/Casino/);
await expect(page.getByRole('heading', { name: 'Willkommensbonus' })).toBeVisible();
await expect(page.getByText('von bis zu €')).toBeVisible();
});