Compare commits

..

2 commits

Author SHA1 Message Date
7731eb1155 Apply ESLint formatting fixes to admin and orders pages.
All checks were successful
CI / Lint, type check, unit tests, coverage (push) Successful in 3m46s
CI / E2E browser tests (push) Successful in 1m46s
Auto-fix from eslint src/ --fix after ./gradlew check touched these
files. No functional changes.
2026-05-21 16:00:53 +02:00
49b5a91f4a Include E2E browser tests in ./gradlew check.
Local verification should match Forgejo CI. Wire frontendE2E into check
and point it at docker-compose.e2e.yml with the same test env vars.

- Add frontendE2E to check after frontend unit tests
- Run docker-compose.e2e.yml directly from Gradle with CI secrets
- Update npm test:e2e:ci to use the e2e compose file
2026-05-21 15:58:09 +02:00
4 changed files with 21 additions and 9 deletions

View file

@ -28,13 +28,23 @@ tasks.register('coverage') {
} }
tasks.register('frontendE2E', Exec) { tasks.register('frontendE2E', Exec) {
description = 'Run Playwright E2E tests in Docker (CI mode)' group = 'verification'
workingDir = file("${rootProject.projectDir}/frontend") description = 'Run Playwright E2E tests in Docker (same stack as Forgejo CI)'
commandLine 'npm', 'run', 'test:e2e:ci' dependsOn frontendTest
workingDir = rootProject.projectDir
environment 'POSTGRES_DB', 'bilhej'
environment 'POSTGRES_USER', 'bilhej'
environment 'POSTGRES_PASSWORD', 'test_pw_ci_123'
environment 'JWT_SECRET', 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
environment 'STRIPE_SECRET_KEY', 'sk_test_fake'
environment 'STRIPE_WEBHOOK_SECRET', 'whsec_fake'
environment 'STRIPE_PRICE_ID', 'price_fake'
commandLine 'docker', 'compose', '-f', 'docker-compose.e2e.yml',
'up', '--build', '--abort-on-container-exit', '--exit-code-from', 'playwright'
} }
tasks.named('check').configure { tasks.named('check').configure {
dependsOn frontendLint, frontendTest dependsOn frontendLint, frontendTest, frontendE2E
} }
tasks.register('up', Exec) { tasks.register('up', Exec) {

View file

@ -13,7 +13,7 @@
"test:watch": "vitest", "test:watch": "vitest",
"test:coverage": "vitest run --coverage", "test:coverage": "vitest run --coverage",
"test:e2e": "playwright test", "test:e2e": "playwright test",
"test:e2e:ci": "docker compose -f ../docker-compose.ci.yml up --build --abort-on-container-exit --exit-code-from playwright" "test:e2e:ci": "docker compose -f ../docker-compose.e2e.yml up --build --abort-on-container-exit --exit-code-from playwright"
}, },
"dependencies": { "dependencies": {
"pinia": "^3.0.4", "pinia": "^3.0.4",

View file

@ -13,9 +13,9 @@ const loading = ref(true)
const error = ref('') const error = ref('')
const statusError = ref('') const statusError = ref('')
const trackingError = ref('') const trackingError = ref('')
const activeFilter = ref<'all' | 'processing' | 'paid_group' | 'pending_payment'>( const activeFilter = ref<
'all', 'all' | 'processing' | 'paid_group' | 'pending_payment'
) >('all')
const searchQuery = ref('') const searchQuery = ref('')
const trackingInputValues = reactive<Record<string, string>>({}) const trackingInputValues = reactive<Record<string, string>>({})
const messageModalOrder = ref<AdminOrder | null>(null) const messageModalOrder = ref<AdminOrder | null>(null)

View file

@ -87,7 +87,9 @@ onMounted(async () => {
<div class="orders__card-meta"> <div class="orders__card-meta">
<span class="orders__meta-label">Beställnings-ID</span> <span class="orders__meta-label">Beställnings-ID</span>
<span class="orders__meta-value orders__order-id">{{ order.id }}</span> <span class="orders__meta-value orders__order-id">{{
order.id
}}</span>
<span class="orders__meta-label">Meddelande</span> <span class="orders__meta-label">Meddelande</span>
<span class="orders__meta-value orders__message">{{ <span class="orders__meta-value orders__message">{{