T20: Song DB Page - Songs/Index.vue with search, action buttons, pagination - Upload area for .pro files (calls T23 placeholder) - Song-Datenbank nav link added to AuthenticatedLayout - Tests: 9 new (44 assertions) T21: Song DB Edit Popup - SongEditModal.vue with metadata + ArrangementConfigurator - Auto-save with fetch (500ms debounce for text, immediate on blur) - Tests: 11 new (53 assertions) T22: Song DB Translate Page - Songs/Translate.vue with two-column editor - URL fetch or manual paste, line-count constraints - Group headers with colors, save marks has_translation=true - Tests: 1 new (12 assertions) T23: .pro File Placeholders - ProParserNotImplementedException with HTTP 501 - ProFileController with importPro/downloadPro placeholders - German error messages - Tests: 5 new (7 assertions) T24: Service Finalization + Status - Two-step finalization with warnings (unmatched songs, missing slides) - Download placeholder toast - isReadyToFinalize accessor on Service model - Tests: 11 new (30 assertions) All tests passing: 174/174 (905 assertions) Build: ✓ Vite production build successful German UI: All user-facing text in German with 'Du' form
64 lines
2 KiB
PHP
64 lines
2 KiB
PHP
<?php
|
|
|
|
use App\Models\Song;
|
|
use App\Models\User;
|
|
|
|
describe('Pro File Placeholder Endpoints', function () {
|
|
beforeEach(function () {
|
|
$this->user = User::factory()->create();
|
|
});
|
|
|
|
describe('POST /api/songs/import-pro', function () {
|
|
it('returns 501 Not Implemented with German error message', function () {
|
|
$response = $this->actingAs($this->user)
|
|
->post('/api/songs/import-pro', [
|
|
'file' => 'test.pro',
|
|
]);
|
|
|
|
$response->assertStatus(501);
|
|
$response->assertJson([
|
|
'message' => 'Der .pro-Parser wird später implementiert. Bitte warte auf die detaillierte Spezifikation.',
|
|
'error' => 'ProParserNotImplemented',
|
|
]);
|
|
});
|
|
|
|
it('requires authentication', function () {
|
|
$response = $this->postJson('/api/songs/import-pro', [
|
|
'file' => 'test.pro',
|
|
]);
|
|
|
|
$response->assertStatus(401);
|
|
});
|
|
});
|
|
|
|
describe('GET /api/songs/{song}/download-pro', function () {
|
|
it('returns 501 Not Implemented with German error message', function () {
|
|
$song = Song::factory()->create();
|
|
|
|
$response = $this->actingAs($this->user)
|
|
->get("/api/songs/{$song->id}/download-pro");
|
|
|
|
$response->assertStatus(501);
|
|
$response->assertJson([
|
|
'message' => 'Der .pro-Parser wird später implementiert. Bitte warte auf die detaillierte Spezifikation.',
|
|
'error' => 'ProParserNotImplemented',
|
|
]);
|
|
});
|
|
|
|
it('requires authentication', function () {
|
|
$song = Song::factory()->create();
|
|
|
|
$response = $this->getJson("/api/songs/{$song->id}/download-pro");
|
|
|
|
$response->assertStatus(401);
|
|
});
|
|
|
|
it('returns 404 for non-existent song', function () {
|
|
$response = $this->actingAs($this->user)
|
|
->get('/api/songs/99999/download-pro');
|
|
|
|
$response->assertStatus(404);
|
|
});
|
|
});
|
|
});
|