Add video preview, source crop, find-videos, and render toasts

Bring the Video tab closer to Shorts with 4K preview stills and crop
modes (none, auto, center, plus the visual editor). Settings store a
default source folder so Find videos can collect output.avi sequences.
Cap the FFmpeg log with auto-scroll, hide repeat spam, and show a
Windows notification when a video or short finishes or fails.
This commit is contained in:
2026-08-16 09:20:56 +02:00
parent e635b708a2
commit a590904e89
20 changed files with 1259 additions and 103 deletions
@@ -0,0 +1,67 @@
using AmiReel.Services;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace AmiReel.Tests.Services;
[TestClass]
public class RenderNotifierTests
{
[TestMethod]
public void DescribeCompleted_ForVideo_UsesRenderCompleteCopy()
{
// Act
(string title, string body) = RenderNotifier.DescribeCompleted(shorts: false);
// Assert
Assert.AreEqual("Render complete", title);
StringAssert.Contains(body, "successfully");
}
[TestMethod]
public void DescribeCompleted_ForShorts_UsesShortCompleteCopy()
{
// Act
(string title, string body) = RenderNotifier.DescribeCompleted(shorts: true);
// Assert
Assert.AreEqual("Short complete", title);
StringAssert.Contains(body, "Short");
}
[TestMethod]
public void DescribeFailed_WithBlankSummary_UsesFallbackBody()
{
// Act
(string title, string body) = RenderNotifier.DescribeFailed(" ");
// Assert
Assert.AreEqual("Render failed", title);
Assert.AreEqual("The render failed.", body);
}
[TestMethod]
public void DescribeFailed_WithLongSummary_TruncatesBody()
{
// Arrange
string summary = new('x', 250);
// Act
(string title, string body) = RenderNotifier.DescribeFailed(summary);
// Assert
Assert.AreEqual("Render failed", title);
Assert.AreEqual(180, body.Length);
StringAssert.EndsWith(body, "...");
}
[TestMethod]
public void DescribeCancelled_ReturnsCancelledCopy()
{
// Act
(string title, string body) = RenderNotifier.DescribeCancelled();
// Assert
Assert.AreEqual("Render cancelled", title);
StringAssert.Contains(body, "cancelled");
}
}