Files

25 lines
860 B
Python
Raw Permalink Normal View History

from pathlib import Path
import unittest
ROOT = Path(__file__).parents[2]
class MatchmakerEntryContractTest(unittest.TestCase):
def test_user_login_exposes_staff_entry(self):
source = (ROOT / "miniapp/pages/login/login.wxml").read_text(encoding="utf-8")
script = (ROOT / "miniapp/pages/login/login.ts").read_text(encoding="utf-8")
self.assertIn("红娘工作人员入口", source)
self.assertIn("onOperatorEntry", source)
self.assertIn("ROUTE.OPERATOR.LOGIN", script)
def test_app_routes_existing_operator_session_to_workbench(self):
source = (ROOT / "miniapp/app.js").read_text(encoding="utf-8")
self.assertIn("operatorToken", source)
self.assertIn("matchmaker-workbench", source)
self.assertIn("stores.bootstrap()", source)
if __name__ == "__main__":
unittest.main()