Halte Aufklappen an der Quelle fest und nenne die in der Bibliothek sichtbare Fassung richtig.
CI Feature / test (push) Successful in 1m2s
Deploy Test / test (push) Successful in 56s
Deploy Test / deploy (push) Successful in 26s

Aufgeklappte Module bleiben beim Verschieben aufgeklappt. Der Hinweis zur
Mitgliederbibliothek widersprach den Fassungsangaben, wenn eine ältere
Fassung sichtbar war.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-20 06:34:48 +01:00
1 parent 7eb3cd6230
commit 105d27f9c9
3 files changed
+55 -9

No files matched your search

@@ -3,6 +3,7 @@
namespace Tests\Feature;
use App\Domain\Catalog\ArticleService;
use App\Domain\Catalog\CompositionDisplayRelease;
use App\Domain\Catalog\CompositionKind;
use App\Domain\Catalog\ContentElement;
use App\Domain\Catalog\ContentService;
@@ -225,6 +226,42 @@ public function test_a_referenced_module_shows_its_source_content_read_only(): v
->assertSee('Quelle bearbeiten');
}
public function test_the_library_note_names_the_version_members_actually_see(): void
{
$content = app(ContentService::class);
$sheet = $content->publishElementVersion($content->createElement('text', 'text', 'Blatt'), 'A');
$other = $content->publishElementVersion($content->createElement('text', 'text', 'Blatt zwei'), 'B');
$module = $content->createComposition('Sichtbar', CompositionKind::Uebung);
$first = $content->publishComposition($module, [['role' => 'Unterlage', 'target' => $sheet]]);
$editor = $this->editor();
app(CompositionDisplayRelease::class)->release($first, $editor);
$content->publishComposition($module->fresh(), [['role' => 'Unterlage', 'target' => $other]]);
Livewire::actingAs($editor, 'staff')
->test(EditExercise::class, ['record' => $module->id])
->call('showAufbauTab', 'verlauf')
->assertSee('In der Mitgliederbibliothek ist Fassung 1 sichtbar, die neuere Fassung 2 noch nicht.')
->assertDontSee('noch keine Fassung sichtbar');
}
public function test_an_expanded_module_stays_expanded_when_it_moves(): void
{
$content = app(ContentService::class);
$sheet = $content->publishElementVersion($content->createElement('text', 'text', 'Unterlage A'), 'A');
$other = $content->publishElementVersion($content->createElement('text', 'text', 'Unterlage B'), 'B');
$first = $content->publishComposition($content->createComposition('Erstes Modul', CompositionKind::Uebung), [['role' => 'Unterlage', 'target' => $sheet]]);
$second = $content->publishComposition($content->createComposition('Zweites Modul', CompositionKind::Uebung), [['role' => 'Unterlage', 'target' => $other]]);
$program = $content->publishComposition($content->createComposition('Programm', CompositionKind::Kurs), [['role' => 'Modul', 'target' => $first], ['role' => 'Modul', 'target' => $second]]);
Livewire::actingAs($this->editor(), 'staff')
->test(EditCourse::class, ['record' => $program->composition_id])
->call('toggleExpanded', 0)
->assertSee('Unterlage A')
->call('movePart', 0, 1)
->assertSee('Unterlage A')
->assertDontSee('Unterlage B');
}
public function test_creating_a_medium_from_the_picker_closes_the_picker_first(): void
{
$module = app(ContentService::class)->createComposition('Neues Medium', CompositionKind::Uebung);