Hero: tekst-only regio voor een hero zonder slides (SLP), e2e-test op de echte ASF-build, bijgewerkte aannames en contract
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -112,9 +112,9 @@ public class HeroPictureRendererTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ATitleWithoutSlides_OrWithoutATitle_RendersNothing()
|
||||
public void ASlideThatIsUnusable_OrNoTitle_RendersNothing()
|
||||
{
|
||||
HeroPictureRenderer.Render(new PublicHeroDto("single", "Titel", null, null, [], [])).IsEmpty.Should().BeTrue();
|
||||
HeroPictureRenderer.Render(new PublicHeroDto("single", "Titel", null, null, [], [new PublicSlideDto("x", "", false, new PublicImageDto(1, 1, new FocusDto(0.5, 0.5, 1), "/m.webp", []))])).IsEmpty.Should().BeTrue();
|
||||
HeroPictureRenderer.Render(Hero(title: " ")).IsEmpty.Should().BeTrue();
|
||||
HeroPictureRenderer.Render(null).IsEmpty.Should().BeTrue();
|
||||
}
|
||||
@@ -200,9 +200,9 @@ public class HeroHtmlTransformTests
|
||||
[Fact]
|
||||
public async Task AHeroWithoutAUsableSlide_LeavesTheBakedHero()
|
||||
{
|
||||
var textOnly = new PublicHeroDto("single", "Titel", null, null, [], []);
|
||||
var unusable = new PublicHeroDto("single", "Titel", null, null, [], [new PublicSlideDto("x", "", false, new PublicImageDto(1, 1, new FocusDto(0.5, 0.5, 1), "/m.webp", []))]);
|
||||
|
||||
(await Sut(textOnly).ApplyAsync(Page, Context, default)).Should().Be(Page);
|
||||
(await Sut(unusable).ApplyAsync(Page, Context, default)).Should().Be(Page);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user