fix(copies): close the third verification round and add the match baselines
Integrate trashes a server photo only for the sequence's owner or an admin, a Details stage stops instead of overwriting a server change the user had kept this PC's value against, a merge retried after a stop plans again when work reached the other sequence, detection keeps pairs answered while it ran, and a sync row whose match the server deleted offers Keep here, Upload again and To trash. The Integrate and merge logs say in the UI language why a version was kept. The edit-picker-twins capture scene showed no Twin chip, since a capture has no workspace: it now lists sample workspace projects of the sample matches. The screenshot baselines gain the 38 Matches screens and take the Matches chip, the three Settings > Server rows, the longer priority list and 1.2.0. Refs #73 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3e6110d329
commit
3c99badcfe
96 files changed
+910
-147
No files matched your search
@@ -191,6 +191,44 @@ public sealed class CopyTextTests
|
||||
Assert.Equal(SyncText.State(entry with { Transfer = upload }), SyncText.State(entry with { Transfer = upload }, candidate));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ASkipForASuspectedMatchNamesWhereTheMatchLies()
|
||||
{
|
||||
var mark = new SyncMark(null, UploadSkip.SuspectedCopy, "Studio NAS");
|
||||
// A match on another server than the signed-in one is named by that server.
|
||||
Assert.Equal(Loc.L("Tooltips.Server.Sync.Skip.SuspectedCopy", "Lab NAS"),
|
||||
SyncText.SkipReason(UploadSkip.SuspectedCopy, mark with { SkippedMatch = new SkippedMatch("Lab NAS", false) }));
|
||||
// One in another archive of this PC says "in", not "on".
|
||||
Assert.Equal(Loc.L("Tooltips.Server.Sync.Skip.SuspectedCopyLocal", "Old archive"),
|
||||
SyncText.SkipReason(UploadSkip.SuspectedCopy, mark with { SkippedMatch = new SkippedMatch("Old archive", true) }));
|
||||
// Unknown: the signed-in server.
|
||||
Assert.Equal(Loc.L("Tooltips.Server.Sync.Skip.SuspectedCopy", "Studio NAS"), SyncText.SkipReason(UploadSkip.SuspectedCopy, mark));
|
||||
// A job on it may integrate or merge it: the words say neither alone.
|
||||
Assert.Equal(Loc.L("Tooltips.Server.Sync.Skip.Busy"), SyncText.SkipReason(UploadSkip.Busy, mark));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ARowWhoseMatchTheServerDeletedOffersWhatTheMatchesRowDoes()
|
||||
{
|
||||
var entry = Entry(SyncStatus.LocalOnly, link: null);
|
||||
var editor = SyncRights.Of((long)RolePermissions.Default(UserRole.Editor));
|
||||
var gone = new SyncMark(Copy(CopyState.Linked, gone: true), null, "Studio NAS");
|
||||
Assert.SequenceEqual([SyncAction.KeepHere, SyncAction.UploadAgain, SyncAction.ToTrash], SyncText.Actions(entry, editor, gone));
|
||||
// Kept here: only Upload again.
|
||||
Assert.SequenceEqual([SyncAction.UploadAgain], SyncText.Actions(entry, editor, new SyncMark(Copy(CopyState.KeptApart, gone: true), null)));
|
||||
foreach (var action in new[] { SyncAction.KeepHere, SyncAction.UploadAgain, SyncAction.ToTrash })
|
||||
{
|
||||
var row = new SyncRowAction(action, () => Task.CompletedTask);
|
||||
Assert.Equal(Loc.L("Server.Copies.Action." + action), row.Text);
|
||||
Assert.False(string.IsNullOrWhiteSpace(SyncText.ToolTip(entry, action, editor, gone)), $"{action} has a tooltip");
|
||||
}
|
||||
Assert.Equal(Loc.L("Tooltips.Server.Copies.UploadAgain", "Studio NAS"), SyncText.ToolTip(entry, SyncAction.UploadAgain, editor, gone));
|
||||
// Without the upload right, Upload again is offered disabled with the reason.
|
||||
var reader = SyncRights.Of((long)RolePermissions.Default(UserRole.Viewer));
|
||||
Assert.False(SyncText.IsEnabled(SyncAction.UploadAgain, reader));
|
||||
Assert.Equal(Loc.L("Tooltips.Server.Sync.UploadAll.NoRight"), SyncText.ToolTip(entry, SyncAction.UploadAgain, reader, gone));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheOwnerReview6TextsFitTheirPlaces()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user