refactor(render): extract frame presentation diagnostics
This commit is contained in:
parent
7e4cfb37c3
commit
733126a272
20 changed files with 3767 additions and 1021 deletions
|
|
@ -29,7 +29,7 @@ public sealed class WorldLifecycleAutomationControllerTests
|
|||
Assert.True(controller.TryRequest("login_stable", out string error), error);
|
||||
Assert.False(controller.IsComplete("login_stable"));
|
||||
|
||||
controller.CapturePending();
|
||||
Assert.True(controller.CapturePending());
|
||||
|
||||
Assert.True(controller.IsComplete("login_stable"));
|
||||
string path = Path.Combine(directory, "login_stable.png");
|
||||
|
|
@ -48,6 +48,29 @@ public sealed class WorldLifecycleAutomationControllerTests
|
|||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ScreenshotCapture_ReportsNoWorkAndFailedCapture()
|
||||
{
|
||||
string directory = NewDirectory();
|
||||
var controller = new FrameScreenshotController(
|
||||
() => (0, 0),
|
||||
(_, _) => [],
|
||||
directory);
|
||||
|
||||
try
|
||||
{
|
||||
Assert.False(controller.CapturePending());
|
||||
Assert.True(controller.TryRequest("bad_frame", out string error), error);
|
||||
Assert.False(controller.CapturePending());
|
||||
Assert.False(controller.IsComplete("bad_frame"));
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (Directory.Exists(directory))
|
||||
Directory.Delete(directory, recursive: true);
|
||||
}
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("")]
|
||||
[InlineData("../escape")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue