Add comprehensive tests for EditSection functionality in the Windows application
- Implement tests for picker behavior, including loading sequences, searching, and handling empty libraries. - Validate sequence opening via Enter key and double-click actions. - Ensure proper handling of unsaved edits and sequence deletion scenarios. - Verify accessibility features for picker rows across different languages. - Introduce a dialog counting mechanism to manage unsaved edit confirmations.
This commit is contained in:
1 parent
4ea44bb917
commit
5aeb6aa787
214 files changed
+6547
-826
No files matched your search
@@ -70,6 +70,27 @@ public sealed class SequenceJobsTests
|
||||
Assert.Equal(paused.Id, jobs.Shown!.Id);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void EachStepFollowsTheRunningJobOfItsKindThenThePausedThenTheOldestWaiting()
|
||||
{
|
||||
var jobs = new SequenceJobs(Sunset);
|
||||
var now = DateTimeOffset.UtcNow;
|
||||
var waiting = Job(JobKind.DeepAnalyse, JobState.Queued) with { Created = now.AddMinutes(-9) };
|
||||
var paused = Job(JobKind.DeepAnalyse, JobState.Paused) with { Created = now.AddMinutes(-1), Started = now.AddMinutes(-1) };
|
||||
var render = Job(JobKind.Render, JobState.Running) with { Started = now };
|
||||
Assert.Null(jobs.Active(JobKind.DeepAnalyse));
|
||||
jobs.Track(waiting);
|
||||
Assert.Equal(waiting.Id, jobs.Active(JobKind.DeepAnalyse)!.Id);
|
||||
jobs.Track(paused);
|
||||
Assert.Equal(paused.Id, jobs.Active(JobKind.DeepAnalyse)!.Id, "a paused one before a waiting one");
|
||||
jobs.Track(render);
|
||||
Assert.Equal(paused.Id, jobs.Active(JobKind.DeepAnalyse)!.Id, "the running render is of another kind");
|
||||
Assert.Equal(render.Id, jobs.Active(JobKind.Render)!.Id);
|
||||
jobs.Track(waiting with { State = JobState.Running, Started = now });
|
||||
Assert.Equal(waiting.Id, jobs.Active(JobKind.DeepAnalyse)!.Id, "a running one first");
|
||||
Assert.Null(jobs.Active(JobKind.LightAnalyse));
|
||||
}
|
||||
|
||||
private static Job Job(JobKind kind, JobState state, Guid? target = null) => new()
|
||||
{
|
||||
Id = Guid.CreateVersion7(),
|
||||
|
||||
Reference in new issue
Block a user