fix(copies): close the owner review 6 gaps with tests
Photos not sent: automatic photos of an integrated pair that failed three times in a row are now told with an error toast that shows the row, and the row reads "not sent" with the last reason. The matches-found and linked toasts of background detections run from their Windows notification too. Maintenance now clears a merge's or an integration's journal whose job is done, cancelled, or deleted without a cancel and untouched for the history's days. Tests pin the matches jobs in the priority queue, the owner's defaults (ask always, union, copy across), the dialog starting from the settings, Choose each preselecting nothing, no automatic photos for a pair whose server copy is gone, the repair of a corrupt local frame by an Integrate, and the owner's whole scenario end to end against a real in-process server. Refs #73 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fe752a0a21
commit
d10577b175
18 files changed
+804
-11
No files matched your search
@@ -327,6 +327,36 @@ public sealed class SettingsLogicTests
|
||||
Assert.Equal(ThreadPriority.Normal, InterfacePriority.For(enabled: false, active: true));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ThePriorityQueueListsTheMatchesJobsUnderTheirOwnNames()
|
||||
{
|
||||
// Owner review 6 (#73): integrating with the server and merging two local copies are jobs the user may rank too.
|
||||
var kinds = Chronos.App.Sections.SettingsViewModel.PriorityKinds;
|
||||
Assert.Contains(Chronos.Core.Model.JobKind.Integrate, kinds);
|
||||
Assert.Contains(Chronos.Core.Model.JobKind.MergeSequences, kinds);
|
||||
Assert.Equal(kinds.Length, kinds.Distinct().Count());
|
||||
foreach (var row in kinds.Select(k => new JobPriorityRow(k, _ => default, (_, _) => { }))
|
||||
.Where(r => r.Kind is Chronos.Core.Model.JobKind.Integrate or Chronos.Core.Model.JobKind.MergeSequences))
|
||||
{
|
||||
Assert.False(string.IsNullOrWhiteSpace(row.Label) || row.Label.StartsWith("Jobs.Kind.", StringComparison.Ordinal), row.Label);
|
||||
Assert.True(row.ToolTip.Contains(row.Label, StringComparison.Ordinal), row.ToolTip);
|
||||
Assert.True(Loc.GetArea("Jobs", CultureInfo.GetCultureInfo("it")).ContainsKey("Jobs.Kind." + row.Kind), $"Italian name of {row.Kind}");
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheMatchesStartFromTheOwnersDefaults()
|
||||
{
|
||||
// Owner review 6 (#73): ask before linking, keep every photo of both sides, copy the projects across.
|
||||
var settings = new AppSettings();
|
||||
Assert.Equal((Chronos.Data.Copies.CopyLinking.AskAlways, Chronos.Data.Copies.CopyPhotoPolicy.Union, Chronos.Data.Copies.CopyProjects.CopyAcross),
|
||||
(settings.CopyLinking, settings.CopyPhotos, settings.CopyProjects));
|
||||
var loaded = AppSettings.Parse("{}")!;
|
||||
Assert.Equal((Chronos.Data.Copies.CopyLinking.AskAlways, Chronos.Data.Copies.CopyPhotoPolicy.Union, Chronos.Data.Copies.CopyProjects.CopyAcross),
|
||||
(loaded.CopyLinking, loaded.CopyPhotos, loaded.CopyProjects));
|
||||
Assert.Equal(Chronos.Data.Copies.CopyLinking.AskAlways, new Chronos.Data.Sync.SyncPolicy().Linking);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void FormatsShowTheirTierAndWhatToInstall()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user