feat(cv): redesign document editing with revision-safe letters and writing tools
This commit is contained in:
@@ -80,6 +80,23 @@ public sealed class CvAiReadinessTests
|
||||
private static string Assessment(string proposal, string source, string verdict = "supported") => JsonSerializer.Serialize(new
|
||||
{ verdict, coverageComplete = true, claims = new[] { new { text = proposal, verdict, sourceQuotes = new[] { source } } } });
|
||||
|
||||
[Theory]
|
||||
[InlineData("improve")]
|
||||
[InlineData("suggest")]
|
||||
[InlineData("grammar")]
|
||||
[InlineData("shorten")]
|
||||
public async Task Contextual_actions_require_review_and_preserve_canonical_facts(string action)
|
||||
{
|
||||
await using var fixture = new Fixture(); await fixture.Open();
|
||||
var proposal = await fixture.Suggestions.GenerateAsync("owner", fixture.Cv.Id, 1,
|
||||
"section:summary", action, Source, null, "Use supplied facts only.", default);
|
||||
await fixture.AssertUnchanged();
|
||||
var accepted = await fixture.Suggestions.ApplyAsync("owner", fixture.Cv.Id, proposal.ProposalToken, null, default);
|
||||
Assert.Equal(2, accepted.Version);
|
||||
Assert.Equal(Source, (await fixture.Career.LoadStructuredForOwnerAsync("owner", default)).Summary.Single());
|
||||
Assert.Equal("ai:" + action, (await fixture.Db.CvVariantVersions.OrderBy(value => value.Version).LastAsync()).Source);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(Paraphrase)]
|
||||
[InlineData("Maintained internal web applications.")]
|
||||
|
||||
Reference in New Issue
Block a user