feat(cv): redesign document editing with revision-safe letters and writing tools
This commit is contained in:
@@ -70,7 +70,7 @@ public sealed class Rd21JobPersistenceTests
|
||||
User = new ClaimsPrincipal(new ClaimsIdentity(new[] { new Claim(ClaimTypes.NameIdentifier, user.Id) }, "test")),
|
||||
} },
|
||||
};
|
||||
var pending = controller.Update(id, Request(companyId, "Delayed title", null, 1) with { Status = "Offer" }, default);
|
||||
var pending = controller.Update(id, Request(companyId, "Delayed title", null, 1) with { Status = "Offer", CoverLetterText = "Uncommitted letter" }, default);
|
||||
await reached.Task.WaitAsync(TimeSpan.FromSeconds(10));
|
||||
try
|
||||
{
|
||||
@@ -89,6 +89,8 @@ public sealed class Rd21JobPersistenceTests
|
||||
Assert.Equal("Prospect", saved.Status);
|
||||
Assert.Equal("Original job title", (await verify.Jobs.SingleAsync()).JobTitle);
|
||||
Assert.Empty(await verify.JobEvents.ToListAsync());
|
||||
Assert.Empty(await verify.CoverLetterVersions.ToListAsync());
|
||||
Assert.Null(saved.CoverLetterText);
|
||||
Assert.Empty(delayed.ChangeTracker.Entries());
|
||||
|
||||
// A deliberate reload/review uses the winner's content and new revision, never a blind retry.
|
||||
@@ -248,7 +250,7 @@ public sealed class Rd21JobPersistenceTests
|
||||
var saved = await verify.JobApplications.SingleAsync();
|
||||
Assert.Equal("First approved text", coverLetter ? saved.CoverLetterText : saved.Notes);
|
||||
Assert.Equal(409, Assert.IsAssignableFrom<ObjectResult>(rejected).StatusCode);
|
||||
if (coverLetter) Assert.Single(await verify.CoverLetterVersions.ToListAsync());
|
||||
if (coverLetter) Assert.Equal(2, await verify.CoverLetterVersions.CountAsync()); // Legacy baseline plus approved replacement.
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
||||
Reference in New Issue
Block a user