|
121 | 121 | }, |
122 | 122 | { |
123 | 123 | "name": "场景10:空购物车结算验证", |
124 | | - "description": "购物车为空时不应允许结算", |
| 124 | + "description": "购物车为空时不应显示结算按钮,应显示空购物车提示", |
125 | 125 | "steps": [ |
126 | 126 | {"action": "reset_state", "description": "重置状态回首页"}, |
127 | 127 | {"action": "navigate_to", "value": "/pages/cart/cart", "description": "直接跳到空购物车"}, |
128 | | - {"action": "read_text", "target": ".empty-cart", "description": "读取空购物车提示"}, |
129 | | - {"action": "click", "target": ".btn-checkout", "description": "尝试点结算按钮"}, |
130 | | - {"action": "wait", "value": "500", "description": "等待"}, |
131 | | - {"action": "evaluate", "value": "getCurrentPages()[getCurrentPages().length-1].route", "expected": "cart", "description": "验证仍在购物车页(未跳到结算页)"}, |
| 128 | + {"action": "read_text", "target": ".empty-text", "expected": "空", "description": "验证显示空购物车提示"}, |
| 129 | + {"action": "page_query", "target": ".btn-checkout", "value": "count", "expected": "0", "description": "验证结算按钮不存在(空购物车不应有结算入口)"}, |
| 130 | + {"action": "read_text", "target": ".btn-back", "expected": "去购物", "description": "验证显示去购物按钮"}, |
132 | 131 | {"action": "screenshot", "description": "截图:空购物车"} |
133 | 132 | ] |
134 | 133 | } |
|
0 commit comments