Corrections d'ordre graphique / ergonomique :

- Lorsqu'on part de zéro : la création de dossier / page / template ce fait de manière plus fluide à la création d'un lore (par exemple création de page sans template et dossier : parcours facilité)
- Ajout d'un bouton "+" dans le header templates
- Harmonisation création / modification template

Correction de tests unitaires
This commit is contained in:
2026-04-23 11:25:58 +02:00
parent 29978058ee
commit 84ccdd53ad
20 changed files with 463 additions and 110 deletions

View File

@@ -53,7 +53,10 @@ public class CampaignServiceTest {
"lore-123",
null
);
when(campaignRepository.save(any(Campaign.class))).thenReturn(testCampaign);
// Le repo renvoie la Campaign telle que passée — on teste la normalisation
// du loreId dans le service, pas le comportement du repo.
when(campaignRepository.save(any(Campaign.class)))
.thenAnswer(invocation -> invocation.getArgument(0));
// Act
Campaign result = campaignService.createCampaign(data);
@@ -73,7 +76,8 @@ public class CampaignServiceTest {
null,
null
);
when(campaignRepository.save(any(Campaign.class))).thenReturn(testCampaign);
when(campaignRepository.save(any(Campaign.class)))
.thenAnswer(invocation -> invocation.getArgument(0));
// Act
Campaign result = campaignService.createCampaign(data);
@@ -93,7 +97,8 @@ public class CampaignServiceTest {
" ",
null
);
when(campaignRepository.save(any(Campaign.class))).thenReturn(testCampaign);
when(campaignRepository.save(any(Campaign.class)))
.thenAnswer(invocation -> invocation.getArgument(0));
// Act
Campaign result = campaignService.createCampaign(data);

View File

@@ -8,6 +8,7 @@ import com.loremind.domain.campaigncontext.SceneBranch;
import com.loremind.domain.campaigncontext.ports.ArcRepository;
import com.loremind.domain.campaigncontext.ports.CampaignRepository;
import com.loremind.domain.campaigncontext.ports.ChapterRepository;
import com.loremind.domain.campaigncontext.ports.CharacterRepository;
import com.loremind.domain.campaigncontext.ports.SceneRepository;
import com.loremind.domain.generationcontext.CampaignStructuralContext;
import org.junit.jupiter.api.BeforeEach;
@@ -40,6 +41,8 @@ public class CampaignStructuralContextBuilderTest {
private ChapterRepository chapterRepository;
@Mock
private SceneRepository sceneRepository;
@Mock
private CharacterRepository characterRepository;
@InjectMocks
private CampaignStructuralContextBuilder builder;