test(app): chips by where the originals are, this PC's workers, row names and encoder use

Drops the unreachable "Custom only" text: every codec of this PC has built-in presets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-05 22:03:43 +00:00
1 parent d80cb5f8a7
commit 9b8b4f257d
6 files changed
+77 -4

No files matched your search

@@ -167,6 +167,31 @@ public sealed class JobListModelTests
Assert.Equal("done · 3:00", JobText.State(done));
}
[Test]
public void TheWorkersReadoutCountsOnlyJobsOfThisPc()
{
var model = new JobListModel();
model.Apply(Job(JobState.Running, started: -1) with { NodeId = "STUDIO#0" });
model.Apply(Job(JobState.Running, started: -2) with { NodeId = "studio#3" });
model.Apply(Job(JobState.Running, started: -3) with { NodeId = "render-box#0" });
model.Apply(Job(JobState.Running, started: -4));
model.Apply(Job(JobState.Done, started: -9, finished: -8) with { NodeId = "studio#1" });
Assert.Equal(4, model.RunningCount);
Assert.Equal(2, model.RunningOn("studio"));
Assert.True(JobText.IsLocal("studio#2", "STUDIO"));
Assert.False(JobText.IsLocal("studio-2", "studio"));
Assert.False(JobText.IsLocal(null, "studio"));
}
[Test]
public void RowsAreNamedByKindAndTarget()
{
Loc.SetCulture(CultureInfo.GetCultureInfo("en"));
Assert.Equal("Render · Harbour sunset", JobText.Name(Job(JobState.Running, kind: JobKind.Render, label: "Harbour sunset")));
Assert.Equal("Proxies", JobText.Name(Job(JobState.Queued)));
}
private static Job Job(JobState state, int created = 0, int? started = null, int? finished = null, JobPriority priority = JobPriority.Normal,
JobKind kind = JobKind.Proxies, string? label = null, long done = 0, long total = 0) => new()
{