feat: complete legacy parity and modernize operator UI
This commit is contained in:
@@ -110,6 +110,38 @@ public sealed class LegacyExpertWorkflowTests
|
||||
Assert.Equal("1/0", draft.PageText);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task NullBuyAmount_RemainsVisibleAndCanBeComposedForFreshPrepareValidation()
|
||||
{
|
||||
var service = new DelegateExpertService
|
||||
{
|
||||
Search = (query, _, _) => Task.FromResult(SearchResult(query, Alpha)),
|
||||
Preview = (identity, _, _) => Task.FromResult(PreviewResult(identity,
|
||||
[
|
||||
new ExpertRecommendationPreview(0, "005930", "Samsung", null),
|
||||
new ExpertRecommendationPreview(1, "035720", "Kakao", 42_000m)
|
||||
]))
|
||||
};
|
||||
var controller = new LegacyExpertWorkflowController(service);
|
||||
var search = await controller.SearchAsync(string.Empty);
|
||||
|
||||
var selected = await controller.SelectExpertAsync(search.Search.Results[0].SelectionId);
|
||||
|
||||
Assert.Equal(LegacyExpertRequestStatus.Ready, selected.Preview.Status);
|
||||
Assert.Equal(2, selected.Preview.Items.Count);
|
||||
Assert.Null(selected.Preview.Items[0].BuyAmount);
|
||||
Assert.True(Assert.Single(selected.Actions).IsAvailable);
|
||||
|
||||
var draft = controller.MaterializeSelectedAction(
|
||||
LegacyExpertWorkflowController.ActionId);
|
||||
|
||||
Assert.Equal(2, draft.ItemCount);
|
||||
Assert.Equal(1, draft.PageCount);
|
||||
Assert.Equal("1/1", draft.PageText);
|
||||
Assert.Equal("0001", draft.ExpertCode);
|
||||
Assert.Equal(Alpha.ExpertName, draft.ExpertName);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task LateSearchResponse_CannotReplaceNewerExpertResult()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user