feat: complete legacy UI and playout parity migration
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using MBN_STOCK_WEBVIEW.LegacyApplication;
|
||||
|
||||
namespace MBN_STOCK_WEBVIEW.LegacyBridge.Tests;
|
||||
|
||||
public sealed class LegacyTabActivationBridgeTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("theme", LegacyOperatorTabId.Theme)]
|
||||
[InlineData("expert", LegacyOperatorTabId.Expert)]
|
||||
public void SelectTab_CarriesOnlyClosedTabIdentity(
|
||||
string tabId,
|
||||
LegacyOperatorTabId expected)
|
||||
{
|
||||
Assert.True(LegacyBridgeProtocol.TryParseIntent(
|
||||
$"{{\"type\":\"select-tab\",\"payload\":{{\"tabId\":\"{tabId}\"}}}}",
|
||||
out var parsed,
|
||||
out _));
|
||||
|
||||
Assert.Equal(expected, Assert.IsType<LegacySelectTabIntent>(parsed).TabId);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("theme", "query", "")]
|
||||
[InlineData("theme", "nxtSession", "preMarket")]
|
||||
[InlineData("expert", "query", "")]
|
||||
public void SelectTab_RejectsWebSuppliedInitialLoadParameters(
|
||||
string tabId,
|
||||
string extraName,
|
||||
string extraValue)
|
||||
{
|
||||
var json = "{\"type\":\"select-tab\",\"payload\":{" +
|
||||
$"\"tabId\":\"{tabId}\",\"{extraName}\":\"{extraValue}\"}}}}";
|
||||
|
||||
Assert.False(LegacyBridgeProtocol.TryParseIntent(json, out _, out _));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user