"""用户端 Web 自助入口核心测试。""" from __future__ import annotations import pytest from fastapi import HTTPException, Request from admin.routes.web_public import ( alipay_sim_payment_page, complete_alipay_sim_payment, complete_mock_payment, mock_payment_page, mock_payment_webhook, ) from fastapi.testclient import TestClient from data.orders.dao import OrdersDAO def test_public_landing_page_served(client): resp = client.get("/") assert resp.status_code == 200 assert "text/html" in resp.headers["content-type"] body = resp.text assert "高考志愿填报智能规划服务" in body assert "新高考志愿填报 · 志愿决策支持" in body assert "湖南新高考志愿填报" not in body assert "为什么选择我们" in body assert 'href="/pricing"' in body assert "先做快速审核" not in body assert "先做方案复核" in body assert "查看套餐" in body assert 'href="/review/start?source=home"' in body assert 'btn-primary" href="/pricing"' in body assert "咨询本身免费" not in body assert "咨询入口" not in body assert "复核现有方案本身免费" in body assert "新方案生成与深度辅导在支付后启动" in body assert "先免费复核一次你的现有方案" in body # hero 不再保留"了解服务流程"文字链 assert "了解服务流程" not in body assert "获取复核与推荐" in body assert "方案复核(免费)" in body assert "深度辅导(付费)" in body assert "已有方案?先免费复核" in body assert "先告诉我们你的基本情况" not in body assert "先审计后规划" not in body assert "不会留底" in body assert "不会用于生成方案" in body assert "不会发邮件推销" in body assert "不会收到营销短信" in body assert "了解服务流程" not in body # hero 压缩后的新文案 assert "最常见的不是“不会选”,而是先选错方向" in body assert "先看你的方案值不值得继续" in body assert "服务流程" in body assert "把风险解释清楚" in body assert "家长决策支持" not in body assert "家长联系方式" not in body assert "把风险解释给家长听懂" not in body # 首页省份必须使用下拉,不再是自由文本 assert '