Refactor BumperPlaceholders and BumperFacts for improved logic and readability
Updated the BumperPlaceholders class to streamline token extraction from texts, enhancing performance and clarity. Modified BumperFacts to initialize slot titles with an empty array instead of a dictionary for better consistency. Renamed methods in BumperResolver for clarity, and refactored GridScheduleGenerator to simplify return logic. Additionally, improved the BumperLinesEditor component by implementing a keyed list for better state management and user experience.
This commit is contained in:
@@ -171,7 +171,7 @@ public class BumperPreviewTests
|
||||
.Handle(new RenderBumperPreviewCommand(template.Id, null), CancellationToken.None);
|
||||
|
||||
Assert.True(result.IsSuccess);
|
||||
var spec = Specs(renderer).First();
|
||||
var spec = Specs(renderer)[0];
|
||||
Assert.Equal("/data/images/bg.png", spec.BackgroundFile);
|
||||
// Канала нет — образцы заглушечные, но кадр всё равно собирается.
|
||||
Assert.Equal("Первое шоу", spec.Lines[1].Text);
|
||||
@@ -201,7 +201,7 @@ public class BumperPreviewTests
|
||||
.Handle(new RenderBumperPreviewCommand(template.Id, null), CancellationToken.None);
|
||||
|
||||
// Жанра у образца нет — строка схлопнулась, а не оставила дыру в кадре.
|
||||
var spec = Specs(renderer).First();
|
||||
var spec = Specs(renderer)[0];
|
||||
Assert.Single(spec.Lines);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user