feat: complete legacy parity and modernize operator UI
This commit is contained in:
@@ -457,6 +457,46 @@ public sealed class LegacyBridgeProtocolTests
|
||||
Assert.IsType<LegacyActivateTradingHaltActionIntent>(haltAction);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ExpertProjection_PreservesNullBuyAmountAndAvailableCompositionAction()
|
||||
{
|
||||
var expert = new LegacyExpertWorkflowSnapshot(
|
||||
1,
|
||||
new LegacyExpertSearchSnapshot(
|
||||
string.Empty,
|
||||
LegacyExpertRequestStatus.Ready,
|
||||
[],
|
||||
false,
|
||||
string.Empty),
|
||||
null,
|
||||
new LegacyExpertPreviewSnapshot(
|
||||
LegacyExpertRequestStatus.Ready,
|
||||
[new LegacyExpertRecommendationView(0, "005930", "Samsung", null)],
|
||||
false,
|
||||
5,
|
||||
1,
|
||||
20,
|
||||
string.Empty),
|
||||
[new LegacyExpertActionView(
|
||||
LegacyExpertWorkflowController.ActionId,
|
||||
"Expert",
|
||||
true)],
|
||||
string.Empty,
|
||||
LegacyOperatorStatusKind.Warning);
|
||||
var snapshot = new LegacyOperatorSnapshot(
|
||||
1, string.Empty, [], null, [], [], null, string.Empty,
|
||||
LegacyOperatorStatusKind.Warning, Expert: expert);
|
||||
|
||||
using var document = JsonDocument.Parse(LegacyBridgeProtocol.SerializeState(snapshot));
|
||||
var projected = document.RootElement.GetProperty("payload").GetProperty("expert");
|
||||
var preview = Assert.Single(
|
||||
projected.GetProperty("preview").GetProperty("items").EnumerateArray());
|
||||
|
||||
Assert.Equal(JsonValueKind.Null, preview.GetProperty("buyAmount").ValueKind);
|
||||
Assert.True(Assert.Single(projected.GetProperty("actions").EnumerateArray())
|
||||
.GetProperty("isAvailable").GetBoolean());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ParseExpertInitialConsonantQuery_PreservesCompatibilityJamo()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user