feat: persist heaven readings in unified dialog

This commit is contained in:
leefer
2026-07-23 09:51:33 +08:00
parent a517f9d859
commit c62670d46b
10 changed files with 739 additions and 22 deletions
+9
View File
@@ -99,6 +99,15 @@ class FrontendContractTests(unittest.TestCase):
self.assertIn('elements.tradeLogDialog.showModal()', self.script)
self.assertIn('renderTradeLog();\n closeTradeLogDialog();', self.script)
def test_heaven_interpretations_use_one_dialog_and_history_tabs(self):
self.assertIn('id="heavenReadingDialog"', self.html)
self.assertIn('data-heaven-reading-tab="current"', self.html)
self.assertIn('data-heaven-reading-tab="history"', self.html)
for button_id in ("historyTrendButton", "historyFortuneButton", "historyHeartButton"):
self.assertIn(f'id="{button_id}"', self.html)
self.assertIn('state.heavenInterpretations.fortune = payload.daily_fortune_reading || "";', self.script)
self.assertIn('if (existing) {\n openHeavenReading(mode, { loading: false });', self.script)
if __name__ == "__main__":
unittest.main()