test(render): pin the merged phase 4 render sizes end to end
With P1's geometry merged, the render follows the chosen proportions, so the server's managed fallback now writes the advised 16:9 inside the 96x64 box (96x54) instead of the preset's ratio; the test expected the old size. A new Data test renders a turned, straightened 9:16 project with a sepia look through the job engine and checks that every output (fixed box and source-sized) has the size the job was routed with, which P5 could not check before P1's RenderGeometry was in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3c192ddd1b
commit
aaf9c0bba7
2 files changed
+31
-1
No files matched your search
@@ -637,6 +637,35 @@ public sealed class RenderJobTests(TestContext context)
|
||||
Assert.Equal(2, ProcessingJobs.RequiredFormat(portrait, png with { Batch = ["4k-h264"] }, 6000, 4000));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Owner review 1, phase 4, end to end: a turned, portrait project with a look renders each output at the size its job
|
||||
/// was routed with (the fixed box adapted to 9:16, the source-sized output on the turned view) and records it so.
|
||||
/// </summary>
|
||||
[Test]
|
||||
public async Task ATurnedPortraitProjectRendersAtTheSizeItsJobWasRoutedWith()
|
||||
{
|
||||
await using var fx = await ProcessingFixture.CreateAsync(context);
|
||||
var sequence = await fx.AddAsync(Scene());
|
||||
await fx.StartEngineAsync();
|
||||
|
||||
var settings = new ProjectSettings
|
||||
{
|
||||
Camera = new CameraSettings { Aspect = new Auto<string>().WithManual("9:16"), Rotate = 90, Straighten = 2 },
|
||||
Look = new LookSettings { Filter = "sepia", Strength = 0.6 },
|
||||
};
|
||||
var request = ProcessingJobs.Render(sequence, Mjpeg with { Batch = ["png-sequence"] }, 96, 64, settings);
|
||||
var routed = ProcessingJobs.ReadRender(request.ParametersJson).Parameters;
|
||||
Assert.Equal((54, 96, 2), (routed.Width, routed.Height, routed.RequiredSettingsFormat));
|
||||
await fx.WaitForAsync((await fx.EnqueueAsync(request)).Id, JobState.Done);
|
||||
|
||||
var renders = (await fx.Db.Renders.ListBySequenceAsync(sequence.Id, fx.Ct)).OrderBy(r => r.OutputPath, StringComparer.Ordinal).ToList();
|
||||
Assert.SequenceEqual([(54, 96), (54, 96)], renders.Select(r => (r.Width, r.Height)));
|
||||
var pngs = Directory.GetFiles(Path.Combine(fx.Folder(sequence).Exports, "clip-PNG")).Order().ToList();
|
||||
Assert.Equal(Frames, pngs.Count);
|
||||
using var decoded = DecoderFactory.CreateServer().Decode(new DecodeRequest(pngs[^1]));
|
||||
Assert.Equal((54, 96), (Assert.NotNull(decoded).Pixels.Width, decoded.Pixels.Height));
|
||||
}
|
||||
|
||||
/// <summary>Settings of a newer Chronos fail the render with the reason in the user's language, never as an English message.</summary>
|
||||
[Test]
|
||||
public async Task AnOverFormatRenderFailsSayingANewerChronosIsNeeded()
|
||||
|
||||
@@ -168,7 +168,8 @@ public sealed class ProcessingModuleTests(TestContext context)
|
||||
var done = await JobApiTests.WaitForAsync(editor, job.Id, "done");
|
||||
Assert.Equal(JobEngineHost.WorkerId, done.NodeId?.Split('#')[0]);
|
||||
var render = (await server.Database.Renders.ListBySequenceAsync(sequence.Id)).Single();
|
||||
Assert.Equal(($"{sequence.Folder}/exports/clip-MJPEG.avi", "Mjpeg", 96, 64), (render.OutputPath, render.Codec, render.Width, render.Height));
|
||||
// The analysis advises 16:9, and the chosen proportions win over the 96×64 box (owner review 1, phase 4): 96×54.
|
||||
Assert.Equal(($"{sequence.Folder}/exports/clip-MJPEG.avi", "Mjpeg", 96, 54), (render.OutputPath, render.Codec, render.Width, render.Height));
|
||||
Assert.Contains(Loc.L("Export.Log.NoRenderNode", Loc.L("Export.Preset.Custom"), "HEVC", "MJPEG"), done.LogTail);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user