Commit Graph
5 Commits
Author SHA1 Message Date
xst c7cc4d5648 chore: 刷新 yun8 全流程验证运行产物(allure-results + 日志)
今日 4 轮 pytest tests/api 验证运行产物:ETC 签名 %3D 修复后
5 个阶段用例(TC-Y8-001~005)全部通过,allure-results 由
--clean-alluredir 清换,含 4 份 output/logs 运行日志。
2026-09-08 14:13:46 +08:00
xst 535c795c48 chore: 补提交司机-货主菜单资源 xlsx + 今日 E2E 运行产物 2026-09-02 16:41:31 +08:00
xst dd0877653e refactor(locators): 文本锚点优先的多候选定位 + 失败 DOM 快照
定位健壮性原则: 语义文本 > 组件库稳定 class > 层级结构 > nth-child/绝对路径。

Web (freight_accounting_page):
- 新增 BasePage.first_matching(*候选): 文本锚点优先命中, 旧结构路径兜底
- 13 处定位器改造: 核算/审核通过/确认打款按钮(get_by_role 文本)、
  车队长/收款模式表单(.el-form-item label 锚定)、光大单选(label:has-text)、
  获取验证码/验证码输入(按钮同行锚定)、message-box 确定等
- 手机号单选保留旧结构路径优先(弹窗含多组电话单选, 文本有歧义)
- 已实况验证: 获取验证码/确认打款/光大锚点唯一命中

App (freight_flow_page):
- 货源 tab: text("货源") 文本锚点优先(登录流程持续验证), 位置序号兜底
- 货源单列表项: RecyclerView(lRrcyclerView) 第一个子项, 全局 instance(3) 兜底
- 选图按钮(ImageView instance(2))保留: 需在途订单才能探测, 当前可用

失败诊断:
- Web 失败时 attach 页面 DOM 快照, App 失败时 attach page_source 到 Allure

验收: 实况锚点解析全部唯一命中; 两条 E2E 通过且 DB 终态均为全流程完成
(status=5, 已结算, 双支付完成)。
2026-09-02 14:59:27 +08:00
xst 2aca405267 refactor(pages): PO 层框架化 — 细粒度操作 + 显式等待 + 消除静默吞异常
DriverFreightFlowPage (APP):
- 流程方法拆为单一职责的细粒度操作(open_freight_tab/fill_quantity/upload_photo_from_album/...),
  流程方法仅做编排,公共 API 不变,用例零改动
- 移除全部 implicitly_wait 全局副作用,每步显式等待目标元素
- 容错点击(已知晓/确定)改为 _tap_by_text_if_present,跳过时记录 warning

FreightAccountingPage (Web):
- _go/_click_search 改显式等待(搜索框出现/列表数据行或空态),替代固定 2s/1s sleep
- 表格等待升级为 td:visible,避开 vxe-table 固定列隐藏占位单元格
- 点击行操作按钮后显式等待弹窗出现,替代固定 800ms
- 车队长下拉选择改显式等待下拉项渲染
- 可选弹窗操作统一收敛到 _try_click,跳过时记录 warning;关键确认按钮保持严格

两条 E2E 用例在真实环境回归通过(TC-D2S-001 116s / TC-D2S-002 112s)。
2026-09-02 11:59:46 +08:00
xst 18890c0437 refactor(tests): restructure into layered POM architecture with Allure reporting
- Split framework into core/ (config, logger, db, driver factories, screenshot,
  allure integration) and pages/ (PO layer: base/admin/driver); flatten test
  files per platform (web/admin, app/driver_android, cross_end)
- Slim root conftest.py 656 -> ~100 lines: drop inline CN HTML report, add
  Allure severity mapping (p0/p1/p2 -> blocker/normal/minor) and
  environment.properties; support both tests.*-prefixed and bare imports
- Preserve TC-D2S-001/002 cross-end E2E cases with business logic unchanged,
  add allure epic/feature/story/step annotations
- Deduplicate: single makereport hook, shared failure-screenshot helpers,
  single SCREENSHOTS_DIR constant; deterministic auth-state role loading
- Move DB credentials from db_helper.py into test_config.yaml (database section)
- Move pytest.ini to repo root; switch reporting to allure-pytest
  (drop pytest-html/junitxml); update requirements.txt accordingly
- Delete deprecated scaffolding: test_freight_full_flow + 6 stale page
  objects, iOS/shipper empty shells, dead utils
- Fix flaky vxe-table action-row wait: wait for a visible td instead of
  hidden placeholder rows (fixed shipper-payment timeouts)
- Verified end-to-end against live env: both E2E cases pass (2 passed 3m12s);
  run artifacts (logs/screenshots/allure) included per repo convention
2026-08-17 14:29:52 +08:00