refactor: unify three-exchange instance UI with shared templates
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
from lib.instance.instance_embed_lib import (
|
||||
EMBED_TABS,
|
||||
embed_context_extras,
|
||||
include_transfer_block,
|
||||
path_to_embed_tab,
|
||||
rewrite_embed_dest,
|
||||
ui_open_guard_enabled,
|
||||
ui_orphan_recovery_enabled,
|
||||
)
|
||||
|
||||
|
||||
@@ -24,3 +28,15 @@ def test_embed_tabs_cover_main_nav():
|
||||
assert "trade" in EMBED_TABS
|
||||
assert "key_monitor" in EMBED_TABS
|
||||
assert "records" in EMBED_TABS
|
||||
|
||||
|
||||
def test_embed_context_extras_unified_ui_flags():
|
||||
for ex in ("binance", "okx", "gate"):
|
||||
assert include_transfer_block(ex) is True
|
||||
assert ui_open_guard_enabled("okx") is True
|
||||
assert ui_open_guard_enabled("binance") is False
|
||||
assert ui_orphan_recovery_enabled("binance") is True
|
||||
assert ui_orphan_recovery_enabled("gate") is False
|
||||
ctx = embed_context_extras("gate")
|
||||
assert ctx["order_rule_tips_tpl"] == "order_monitor_rule_tips_gate.html"
|
||||
assert ctx["include_transfer_block"] is True
|
||||
|
||||
Reference in New Issue
Block a user