feat: MD-style popup print for strategy doc and checklist
Open clean white document in new tab with auto print dialog instead of printing the dark hub page. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,6 +7,7 @@ from lib.hub.hub_strategy_lib import (
|
||||
load_strategy_payload,
|
||||
strategy_meta_payload,
|
||||
build_export_html,
|
||||
build_print_html,
|
||||
)
|
||||
|
||||
|
||||
@@ -34,6 +35,15 @@ class TestHubStrategyLib(unittest.TestCase):
|
||||
self.assertIn("Gate", html)
|
||||
self.assertIn("☐", html)
|
||||
|
||||
def test_print_html_doc_and_checklist(self):
|
||||
doc = build_print_html("binance", "doc")
|
||||
cl = build_print_html("binance", "checklist")
|
||||
self.assertIn("window.print", doc)
|
||||
self.assertIn("window.print", cl)
|
||||
self.assertIn("币安", doc)
|
||||
self.assertIn("开仓检查清单", cl)
|
||||
self.assertIn("☐", cl)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user