Commit 1a4c1b8b authored by liguangyu06's avatar liguangyu06
Browse files

从 temp 选择性同步框架与用例到 main

合入自动化代码、用例 CSV/MD/spec/PO 及登录态修复;不含 knowledge-base、.cursor、data/scan 等 temp 全量备份内容。
parent f6eec849
This diff is collapsed.
# Auto-generated from admit-product-list-elements.json
# Source: http://spdtest.cmic.com.cn:8080/spd/basic/dataSync/dataSync/productOrder/list
# Scanned: 2026-10-20T08:46:15.237Z
# Page: 基础设置 > 准入管理 > 产品准入单列表
# Note: filter dropdown was opened during scan
# Note: detail view was opened during scan
page: admit-product-list
module: spd-basic
url: http://spdtest.cmic.com.cn:8080/spd/basic/dataSync/dataSync/productOrder/list
locators:
# --- main::main ---
menu_home:
description: "首页"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "首页"
playwright: "page.getByRole('menuitem', { name: '首页' })"
menu_basicSetting:
description: "基础设置"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "基础设置"
playwright: "page.getByRole('menuitem', { name: '基础设置' })"
menu_purchase:
description: "采购管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "采购管理"
playwright: "page.getByRole('menuitem', { name: '采购管理' })"
menu_opening:
description: "期初管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "期初管理"
playwright: "page.getByRole('menuitem', { name: '期初管理' })"
menu_centerStock:
description: "中心库管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "中心库管理"
playwright: "page.getByRole('menuitem', { name: '中心库管理' })"
menu_deptBusiness:
description: "科室业务管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "科室业务管理"
playwright: "page.getByRole('menuitem', { name: '科室业务管理' })"
menu_finance:
description: "财务管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "财务管理"
playwright: "page.getByRole('menuitem', { name: '财务管理' })"
menu_orthoVolume:
description: "骨科带量"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "骨科带量"
playwright: "page.getByRole('menuitem', { name: '骨科带量' })"
menu_general:
description: "综合管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "综合管理"
playwright: "page.getByRole('menuitem', { name: '综合管理' })"
menu_yangcai:
description: "阳采管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "阳采管理"
playwright: "page.getByRole('menuitem', { name: '阳采管理' })"
menu_processCenter:
description: "流程中心"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "流程中心"
playwright: "page.getByRole('menuitem', { name: '流程中心' })"
menu_logistics:
description: "后勤物资管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "后勤物资管理"
playwright: "page.getByRole('menuitem', { name: '后勤物资管理' })"
menu_statReport:
description: "统计报表"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "统计报表"
playwright: "page.getByRole('menuitem', { name: '统计报表' })"
menu_dataViz:
description: "数据可视化"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "数据可视化"
playwright: "page.getByRole('menuitem', { name: '数据可视化' })"
menu_admitMaterial:
description: "物料准入管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "物料准入管理"
playwright: "page.getByRole('menuitem', { name: '物料准入管理' })"
menu_admitProductApply:
description: "产品准入申请"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "产品准入申请"
playwright: "page.getByRole('menuitem', { name: '产品准入申请' })"
menu_admitMaterialList:
description: "物料准入单列表"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "物料准入单列表"
playwright: "page.getByRole('menuitem', { name: '物料准入单列表' })"
menu_admitProductList:
description: "产品准入单列表"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "产品准入单列表"
playwright: "page.getByRole('menuitem', { name: '产品准入单列表' })"
menu_admitSupply:
description: "供货目录申请"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "供货目录申请"
playwright: "page.getByRole('menuitem', { name: '供货目录申请' })"
menu_admitTask:
description: "准入任务分配"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "准入任务分配"
playwright: "page.getByRole('menuitem', { name: '准入任务分配' })"
admitProductList:
description: "产品准入单列表"
element_type: tab
section: "main::main"
strategy: text
value: "产品准入单列表"
playwright: "page.getByText('产品准入单列表')"
tab_admitProductList:
description: "产品准入单列表"
element_type: div
section: "main::main"
strategy: id
value: "rc-tabs-0-tab-/basic/dataSync/dataSync/productOrder/list"
playwright: "page.locator('#rc-tabs-0-tab-/basic/dataSync/dataSync/productOrder/list')"
operationDateDateRange:
description: "制单日期"
element_type: datepicker
section: "main::main"
strategy: label_text
value: "制单日期"
playwright: "page.getByText('制单日期', { exact: true })"
dateRange:
description: "开始日期"
element_type: text
section: "main::main"
strategy: id
value: "table_search_form_dateValue"
playwright: "page.locator('#table_search_form_dateValue')"
operationDateInput:
description: "结束日期"
element_type: text
section: "main::main"
strategy: placeholder
value: "结束日期"
playwright: "page.getByPlaceholder('结束日期')"
supplierName:
description: "请输入"
element_type: text
section: "main::main"
strategy: id
value: "table_search_form_provName"
playwright: "page.locator('#table_search_form_provName')"
consumableTypeSelect:
description: "请选择耗材类型"
element_type: select
section: "main::main"
strategy: label_text
value: "耗材类型"
playwright: "page.getByText('耗材类型', { exact: true })"
searchBtn:
description: "查 询"
element_type: button
section: "main::main"
strategy: role
role: button
name: "查 询"
playwright: "page.getByRole('button', { name: '查 询' })"
resetBtn:
description: "重 置"
element_type: button
section: "main::main"
strategy: role
role: button
name: "重 置"
playwright: "page.getByRole('button', { name: '重 置' })"
expandFilterBtn:
description: "展开"
element_type: button
section: "main::main"
strategy: role
role: button
name: "展开"
playwright: "page.getByRole('button', { name: '展开' })"
detailBtn:
description: "详情"
element_type: button
section: "main::main"
strategy: role
role: button
name: "详情"
playwright: "page.getByRole('button', { name: '详情' })"
editBtn:
description: "编辑"
element_type: button
section: "main::main"
strategy: role
role: button
name: "编辑"
playwright: "page.getByRole('button', { name: '编辑' })"
consumableTypeSelect_2:
description: "请选择耗材类型低值耗材高值耗材检验试剂"
element_type: select
section: "main::main"
strategy: label_text
value: "耗材类型"
playwright: "page.getByText('耗材类型', { exact: true })"
purchaseMode:
description: "耗材类型"
element_type: search
section: "main::main"
strategy: id
value: "table_search_form_purModes"
playwright: "page.locator('#table_search_form_purModes')"
# --- main::pagination ---
pagination_action:
description: "共 24 条150 条/页"
element_type: ul
section: "main::pagination"
strategy: label_text
value: "操作"
playwright: "page.getByText('操作', { exact: true })"
pagination_prevPageBtn:
description: "上一页"
element_type: li
section: "main::pagination"
strategy: label_text
value: "操作"
playwright: "page.getByText('操作', { exact: true })"
pagination_actionBtn:
description: "操作"
element_type: button
section: "main::pagination"
strategy: label_text
value: "操作"
playwright: "page.getByText('操作', { exact: true })"
pagination_page_1:
description: "1"
element_type: pagination_item
section: "main::pagination"
strategy: css
value: ".ant-pagination-item-active"
playwright: "page.locator('.ant-pagination-item-active')"
pagination_nextPageBtn:
description: "下一页"
element_type: li
section: "main::pagination"
strategy: label_text
value: "操作"
playwright: "page.getByText('操作', { exact: true })"
pagination_pageSizeSelect:
description: "50 条/页"
element_type: select
section: "main::pagination"
strategy: label_text
value: "操作"
playwright: "page.getByText('操作', { exact: true })"
# --- main::detail:产品准入单详情 ---
el_e5aea1e689b9e8bf9be7a88bBtn:
description: "审批进程"
element_type: button
section: "main::detail:产品准入单详情"
strategy: role
role: button
name: "审批进程"
playwright: "page.getByRole('button', { name: '审批进程' })"
el_e58d95e68daee697a5e5bf97Btn:
description: "单据日志"
element_type: button
section: "main::detail:产品准入单详情"
strategy: role
role: button
name: "单据日志"
playwright: "page.getByRole('button', { name: '单据日志' })"
backBtn:
description: "返 回"
element_type: button
section: "main::detail:产品准入单详情"
strategy: role
role: button
name: "返 回"
playwright: "page.getByRole('button', { name: '返 回' })"
el_e8afb7e8be93e585a5e789a9e69699e7bc96e7a081e38081e5908de7a7b0Input:
description: "请输入物料编码、名称"
element_type: text
section: "main::detail:产品准入单详情"
strategy: placeholder
value: "请输入物料编码、名称"
playwright: "page.getByPlaceholder('请输入物料编码、名称')"
tableDensity:
description: "column-height"
element_type: span
section: "main::detail:产品准入单详情"
strategy: label
value: "column-height"
playwright: "page.getByLabel('column-height')"
el_e9809ae8bf87Btn:
description: "通过"
element_type: button
section: "main::detail:产品准入单详情"
strategy: role
role: switch
name: "通过"
playwright: "page.getByRole('switch', { name: '通过' })"
el_e585b131e69da1313530e69da12fe9a1b5:
description: "共 1 条150 条/页"
element_type: ul
section: "main::detail:产品准入单详情"
strategy: text
value: "共 1 条150 条/页"
playwright: "page.getByText('共 1 条150 条/页')"
prevPageBtn:
description: "上一页"
element_type: li
section: "main::detail:产品准入单详情"
strategy: text
value: "上一页"
playwright: "page.getByText('上一页')"
page_1:
description: "1"
element_type: pagination_item
section: "main::detail:产品准入单详情"
strategy: css
value: ".ant-pagination-item-active"
playwright: "page.locator('.ant-pagination-item-active')"
nextPageBtn:
description: "下一页"
element_type: li
section: "main::detail:产品准入单详情"
strategy: text
value: "下一页"
playwright: "page.getByText('下一页')"
pageSizeSelect:
description: "50 条/页"
element_type: select
section: "main::detail:产品准入单详情"
strategy: text
value: "50 条/页"
playwright: "page.getByText('50 条/页')"
import type { Locator, Page } from '@playwright/test';
/** 基础设置 · 准入管理。叶子菜单是 .ant-menu-item,不是 role=menuitem。 */
export class AdmitSharedLocators {
readonly menuBasic: Locator;
readonly admitSubmenuTitle: Locator;
readonly tableHeader: Locator;
readonly empty: Locator;
readonly paginationTotal: Locator;
readonly pageJumpInput: Locator;
readonly nextPage: Locator;
readonly prevPage: Locator;
readonly formError: Locator;
constructor(protected readonly page: Page) {
this.menuBasic = page.getByRole('menuitem', { name: '基础设置' });
this.admitSubmenuTitle = page.locator('.ant-menu-submenu-title').filter({ hasText: /^准入管理$/ });
this.tableHeader = page.locator('.ant-table-thead th');
this.empty = page.locator('.ant-empty, .ant-empty-description').first();
this.paginationTotal = page.locator('.ant-pagination-total-text').first();
this.pageJumpInput = page.locator('.ant-pagination-options-quick-jumper input').first();
this.nextPage = page.locator('.ant-pagination-next').first();
this.prevPage = page.locator('.ant-pagination-prev').first();
this.formError = page.locator('.ant-form-item-explain-error, .ant-message-notice, .ant-notification-notice');
}
menuLeaf(name: string): Locator {
return this.page.locator('.ant-menu-item').filter({ hasText: new RegExp(`^\\s*${name}\\s*$`) }).first();
}
button(name: string, root: Locator | Page = this.page): Locator {
const compact = name.replace(/\s/g, '');
const pattern = new RegExp(compact.split('').join('\\s*'));
return root.getByRole('button', { name: pattern });
}
tab(name: string): Locator {
return this.page.locator('.ant-tabs-tab').filter({ hasText: new RegExp(name) }).first();
}
putPage(): Locator {
return this.page.locator('.put-page').last();
}
}
# Auto-generated from admit-supply-elements.json
# Source: http://spdtest.cmic.com.cn:8080/spd/basic/dataSync/dataSync/supplyApply/list
# Scanned: 2026-10-20T08:46:30.524Z
# Page: 基础设置 > 准入管理 > 供货目录申请
# Note: filter dropdown was opened during scan
# Note: detail view was opened during scan
page: admit-supply
module: spd-basic
url: http://spdtest.cmic.com.cn:8080/spd/basic/dataSync/dataSync/supplyApply/list
locators:
# --- main::main ---
menu_home:
description: "首页"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "首页"
playwright: "page.getByRole('menuitem', { name: '首页' })"
menu_basicSetting:
description: "基础设置"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "基础设置"
playwright: "page.getByRole('menuitem', { name: '基础设置' })"
menu_purchase:
description: "采购管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "采购管理"
playwright: "page.getByRole('menuitem', { name: '采购管理' })"
menu_opening:
description: "期初管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "期初管理"
playwright: "page.getByRole('menuitem', { name: '期初管理' })"
menu_centerStock:
description: "中心库管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "中心库管理"
playwright: "page.getByRole('menuitem', { name: '中心库管理' })"
menu_deptBusiness:
description: "科室业务管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "科室业务管理"
playwright: "page.getByRole('menuitem', { name: '科室业务管理' })"
menu_finance:
description: "财务管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "财务管理"
playwright: "page.getByRole('menuitem', { name: '财务管理' })"
menu_orthoVolume:
description: "骨科带量"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "骨科带量"
playwright: "page.getByRole('menuitem', { name: '骨科带量' })"
menu_general:
description: "综合管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "综合管理"
playwright: "page.getByRole('menuitem', { name: '综合管理' })"
menu_yangcai:
description: "阳采管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "阳采管理"
playwright: "page.getByRole('menuitem', { name: '阳采管理' })"
menu_processCenter:
description: "流程中心"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "流程中心"
playwright: "page.getByRole('menuitem', { name: '流程中心' })"
menu_logistics:
description: "后勤物资管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "后勤物资管理"
playwright: "page.getByRole('menuitem', { name: '后勤物资管理' })"
menu_statReport:
description: "统计报表"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "统计报表"
playwright: "page.getByRole('menuitem', { name: '统计报表' })"
menu_dataViz:
description: "数据可视化"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "数据可视化"
playwright: "page.getByRole('menuitem', { name: '数据可视化' })"
menu_admitMaterial:
description: "物料准入管理"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "物料准入管理"
playwright: "page.getByRole('menuitem', { name: '物料准入管理' })"
menu_admitProductApply:
description: "产品准入申请"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "产品准入申请"
playwright: "page.getByRole('menuitem', { name: '产品准入申请' })"
menu_admitMaterialList:
description: "物料准入单列表"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "物料准入单列表"
playwright: "page.getByRole('menuitem', { name: '物料准入单列表' })"
menu_admitProductList:
description: "产品准入单列表"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "产品准入单列表"
playwright: "page.getByRole('menuitem', { name: '产品准入单列表' })"
menu_admitSupply:
description: "供货目录申请"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "供货目录申请"
playwright: "page.getByRole('menuitem', { name: '供货目录申请' })"
menu_admitTask:
description: "准入任务分配"
element_type: li
section: "main::main"
strategy: role
role: menuitem
name: "准入任务分配"
playwright: "page.getByRole('menuitem', { name: '准入任务分配' })"
admitSupply:
description: "供货目录申请"
element_type: tab
section: "main::main"
strategy: text
value: "供货目录申请"
playwright: "page.getByText('供货目录申请')"
tab_admitSupply:
description: "供货目录申请"
element_type: div
section: "main::main"
strategy: id
value: "rc-tabs-0-tab-/basic/dataSync/dataSync/supplyApply/list"
playwright: "page.locator('#rc-tabs-0-tab-/basic/dataSync/dataSync/supplyApply/list')"
operationDateDateRange:
description: "制单日期"
element_type: datepicker
section: "main::main"
strategy: label_text
value: "制单日期"
playwright: "page.getByText('制单日期', { exact: true })"
dateRange:
description: "开始日期"
element_type: text
section: "main::main"
strategy: id
value: "table_search_form_dateValue"
playwright: "page.locator('#table_search_form_dateValue')"
operationDateInput:
description: "结束日期"
element_type: text
section: "main::main"
strategy: placeholder
value: "结束日期"
playwright: "page.getByPlaceholder('结束日期')"
el_e99480e594aee59586Select:
description: "请选择"
element_type: select
section: "main::main"
strategy: label_text
value: "销售商"
playwright: "page.getByText('销售商', { exact: true })"
supplierId:
description: "销售商"
element_type: search
section: "main::main"
strategy: id
value: "table_search_form_provId"
playwright: "page.locator('#table_search_form_provId')"
dimensionSupplierSelect:
description: "请选择"
element_type: select
section: "main::main"
strategy: label_text
value: "供应商"
playwright: "page.getByText('供应商', { exact: true })"
dimensionSupplierInput:
description: "供应商"
element_type: search
section: "main::main"
strategy: id
value: "table_search_form_subProvId"
playwright: "page.locator('#table_search_form_subProvId')"
searchBtn:
description: "查 询"
element_type: button
section: "main::main"
strategy: role
role: button
name: "查 询"
playwright: "page.getByRole('button', { name: '查 询' })"
resetBtn:
description: "重 置"
element_type: button
section: "main::main"
strategy: role
role: button
name: "重 置"
playwright: "page.getByRole('button', { name: '重 置' })"
expandFilterBtn:
description: "展开"
element_type: button
section: "main::main"
strategy: role
role: button
name: "展开"
playwright: "page.getByRole('button', { name: '展开' })"
el_e689b9e9878fe68f90e4baa4283029Btn:
description: "批量提交(0)"
element_type: button
section: "main::main"
strategy: role
role: button
name: "批量提交(0)"
playwright: "page.getByRole('button', { name: '批量提交(0)' })"
addBtn:
description: "新 增"
element_type: button
section: "main::main"
strategy: role
role: button
name: "新 增"
playwright: "page.getByRole('button', { name: '新 增' })"
detailBtn:
description: "详情"
element_type: button
section: "main::main"
strategy: role
role: button
name: "详情"
playwright: "page.getByRole('button', { name: '详情' })"
editBtn:
description: "编辑"
element_type: button
section: "main::main"
strategy: role
role: button
name: "编辑"
playwright: "page.getByRole('button', { name: '编辑' })"
# --- main::pagination ---
pagination_el_e585b13138e69da1313530e69da12fe9a1b5:
description: "共 18 条150 条/页"
element_type: ul
section: "main::pagination"
strategy: text
value: "共 18 条150 条/页"
playwright: "page.getByText('共 18 条150 条/页')"
pagination_prevPageBtn:
description: "上一页"
element_type: li
section: "main::pagination"
strategy: text
value: "上一页"
playwright: "page.getByText('上一页')"
pagination_page_1:
description: "1"
element_type: pagination_item
section: "main::pagination"
strategy: css
value: ".ant-pagination-item-active"
playwright: "page.locator('.ant-pagination-item-active')"
pagination_nextPageBtn:
description: "下一页"
element_type: li
section: "main::pagination"
strategy: text
value: "下一页"
playwright: "page.getByText('下一页')"
pagination_pageSizeSelect:
description: "50 条/页"
element_type: select
section: "main::pagination"
strategy: text
value: "50 条/页"
playwright: "page.getByText('50 条/页')"
# --- main::detail:返回新增供货目录 ---
el_e99480e594aee59586Select_2:
description: "请选择"
element_type: select
section: "main::detail:返回新增供货目录"
strategy: label_text
value: "销售商"
playwright: "page.getByText('销售商', { exact: true })"
supplierId_2:
description: "销售商"
element_type: search
section: "main::detail:返回新增供货目录"
strategy: id
value: "form_item_provId"
playwright: "page.locator('#form_item_provId')"
dimensionSupplierSelect_2:
description: "请选择"
element_type: select
section: "main::detail:返回新增供货目录"
strategy: label_text
value: "供应商"
playwright: "page.getByText('供应商', { exact: true })"
subSupplierId:
description: "供应商"
element_type: search
section: "main::detail:返回新增供货目录"
strategy: id
value: "form_item_subProvId"
playwright: "page.locator('#form_item_subProvId')"
el_e4b89ae58aa1e6a8a1e5bc8fSelect:
description: "请选择"
element_type: select
section: "main::detail:返回新增供货目录"
strategy: label_text
value: "业务模式"
playwright: "page.getByText('业务模式', { exact: true })"
el_e698afe590a6e9bb98e8aea4Select:
description: "请选择"
element_type: select
section: "main::detail:返回新增供货目录"
strategy: label_text
value: "是否默认"
playwright: "page.getByText('是否默认', { exact: true })"
el_e8aea1e58892e7949fe69588e697b6e997b4DateRange:
description: "计划生效时间"
element_type: datepicker
section: "main::detail:返回新增供货目录"
strategy: label_text
value: "计划生效时间"
playwright: "page.getByText('计划生效时间', { exact: true })"
el_e8aea1e58892e7949fe69588e697b6e997b4Input:
description: "2026-10-20 16:46:32"
element_type: text
section: "main::detail:返回新增供货目录"
strategy: id
value: "form_item_planEffectDate"
playwright: "page.locator('#form_item_planEffectDate')"
el_e585b3e88194e68e88e69d83e58f98e69bb4e794b3e8afb7Input:
description: "请选择授权变更申请"
element_type: text
section: "main::detail:返回新增供货目录"
strategy: id
value: "form_item_relOrderNo"
playwright: "page.locator('#form_item_relOrderNo')"
remark:
description: "备注"
element_type: text
section: "main::detail:返回新增供货目录"
strategy: id
value: "form_item_remark"
playwright: "page.locator('#form_item_remark')"
el_30e4b8aa:
description: "上传附件"
element_type: span
section: "main::detail:返回新增供货目录"
strategy: role
role: button
name: "上传附件"
playwright: "page.getByRole('button', { name: '上传附件' })"
el_e4b88ae4bca0e99984e4bbb6Btn:
description: "上传附件"
element_type: button
section: "main::detail:返回新增供货目录"
strategy: role
role: button
name: "上传附件"
playwright: "page.getByRole('button', { name: '上传附件' })"
addProductBtn:
description: "添加产品"
element_type: button
section: "main::detail:返回新增供货目录"
strategy: role
role: button
name: "添加产品"
playwright: "page.getByRole('button', { name: '添加产品' })"
el_e5afbce585a5657863656cBtn:
description: "导入excel"
element_type: button
section: "main::detail:返回新增供货目录"
strategy: role
role: button
name: "导入excel"
playwright: "page.getByRole('button', { name: '导入excel' })"
tableDensity:
description: "column-height"
element_type: span
section: "main::detail:返回新增供货目录"
strategy: label
value: "column-height"
playwright: "page.getByLabel('column-height')"
submitBtn:
description: "提 交"
element_type: button
section: "main::detail:返回新增供货目录"
strategy: role
role: button
name: "提 交"
playwright: "page.getByRole('button', { name: '提 交' })"
cancelBtn:
description: "取 消"
element_type: button
section: "main::detail:返回新增供货目录"
strategy: role
role: button
name: "取 消"
playwright: "page.getByRole('button', { name: '取 消' })"
# --- main::detail:供货目录详情 ---
el_e5aea1e689b9e8bf9be7a88bBtn:
description: "审批进程"
element_type: button
section: "main::detail:供货目录详情"
strategy: role
role: button
name: "审批进程"
playwright: "page.getByRole('button', { name: '审批进程' })"
el_e58d95e68daee697a5e5bf97Btn:
description: "单据日志"
element_type: button
section: "main::detail:供货目录详情"
strategy: role
role: button
name: "单据日志"
playwright: "page.getByRole('button', { name: '单据日志' })"
backBtn:
description: "返 回"
element_type: button
section: "main::detail:供货目录详情"
strategy: role
role: button
name: "返 回"
playwright: "page.getByRole('button', { name: '返 回' })"
tableDensity_2:
description: "column-height"
element_type: span
section: "main::detail:供货目录详情"
strategy: label
value: "column-height"
playwright: "page.getByLabel('column-height')"
0Input:
description: "40"
element_type: text
section: "main::detail:供货目录详情"
strategy: role
role: spinbutton
name: "40"
playwright: "page.getByRole('spinbutton', { name: '40' })"
el_e585b131e69da1313530e69da12fe9a1b5:
description: "共 1 条150 条/页"
element_type: ul
section: "main::detail:供货目录详情"
strategy: text
value: "共 1 条150 条/页"
playwright: "page.getByText('共 1 条150 条/页')"
prevPageBtn:
description: "上一页"
element_type: li
section: "main::detail:供货目录详情"
strategy: text
value: "上一页"
playwright: "page.getByText('上一页')"
page_1:
description: "1"
element_type: pagination_item
section: "main::detail:供货目录详情"
strategy: css
value: ".ant-pagination-item-active"
playwright: "page.locator('.ant-pagination-item-active')"
nextPageBtn:
description: "下一页"
element_type: li
section: "main::detail:供货目录详情"
strategy: text
value: "下一页"
playwright: "page.getByText('下一页')"
pageSizeSelect:
description: "50 条/页"
element_type: select
section: "main::detail:供货目录详情"
strategy: text
value: "50 条/页"
playwright: "page.getByText('50 条/页')"
This diff is collapsed.
import type { Locator, Page } from '@playwright/test';
import { BasicSharedLocators } from './basic-shared.locator';
/** 院区管理。选择器来自 locators/spd/basic-branch.locator.yaml */
export class BasicBranchLocators extends BasicSharedLocators {
readonly addBtn: Locator;
readonly campusNameInput: Locator;
readonly addName: Locator;
readonly addAddress: Locator;
readonly editId: Locator;
readonly editName: Locator;
readonly editAddress: Locator;
constructor(page: Page) {
super(page);
this.addBtn = page.getByRole('button', { name: /新\s*增/ });
this.campusNameInput = page.getByPlaceholder('院区名称');
this.addName = page.locator('#basic_name');
this.addAddress = page.locator('#basic_address');
this.editId = page.locator('#form_item_id');
this.editName = page.locator('#form_item_name');
this.editAddress = page.locator('#form_item_address');
}
}
This diff is collapsed.
import type { Locator, Page } from '@playwright/test';
import { BasicSharedLocators } from './basic-shared.locator';
/** 财务月份设置。选择器来自 locators/spd/basic-finance-month.locator.yaml */
export class BasicFinanceMonthLocators extends BasicSharedLocators {
readonly settleMonth: Locator;
readonly searchBtn: Locator;
readonly resetBtn: Locator;
readonly modifyBtn: Locator;
readonly autoSettleDateInput: Locator;
readonly saveBtn: Locator;
readonly cancelBtn: Locator;
constructor(page: Page) {
super(page);
this.settleMonth = page.locator('#form_item_settleMonthDate');
this.searchBtn = page.getByRole('button', { name: /查\s*询/ });
this.resetBtn = page.getByRole('button', { name: /重\s*置/ });
this.modifyBtn = page.getByRole('button', { name: /修\s*改/ });
this.autoSettleDateInput = page.getByPlaceholder('请选择日期');
this.saveBtn = page.getByRole('button', { name: /保\s*存/ });
this.cancelBtn = page.getByRole('button', { name: /取\s*消/ });
}
}
This diff is collapsed.
import type { Locator, Page } from '@playwright/test';
import { BasicSharedLocators } from './basic-shared.locator';
/** 医院信息登记。选择器来自 locators/spd/basic-hospital-info.locator.yaml */
export class BasicHospitalInfoLocators extends BasicSharedLocators {
readonly editBtn: Locator;
readonly saveBtn: Locator;
readonly cancelBtn: Locator;
readonly linkman: Locator;
readonly contactWay: Locator;
readonly shortName: Locator;
readonly loginBgUpload: Locator;
readonly logoUpload: Locator;
readonly previewLink: Locator;
constructor(page: Page) {
super(page);
this.editBtn = page.getByRole('button', { name: /编\s*辑/ });
this.saveBtn = page.getByRole('button', { name: /保\s*存/ });
this.cancelBtn = page.getByRole('button', { name: /取\s*消/ });
this.linkman = page.locator('#form_item_linkman');
this.contactWay = page.locator('#form_item_contactWay');
this.shortName = page.locator('#form_item_anotherName');
this.loginBgUpload = page.locator('input[type="file"]').nth(0);
this.logoUpload = page.locator('input[type="file"]').nth(1);
this.previewLink = page.getByRole('link', { name: '预览文件' });
}
}
This diff is collapsed.
import type { Locator, Page } from '@playwright/test';
import { BasicSharedLocators } from './basic-shared.locator';
/** 公告管理。选择器来自 locators/spd/basic-notice.locator.yaml */
export class BasicNoticeLocators extends BasicSharedLocators {
readonly noticeTitle: Locator;
readonly publishScopeSelect: Locator;
readonly searchBtn: Locator;
readonly resetBtn: Locator;
readonly addBtn: Locator;
readonly richTextEditor: Locator;
readonly modalTitleInput: Locator;
constructor(page: Page) {
super(page);
this.noticeTitle = page.locator('#form_item_title');
this.publishScopeSelect = page.locator('.ant-form-item').filter({ hasText: '发布范围' }).locator('.ant-select').first();
this.searchBtn = page.getByRole('button', { name: /查\s*询/ });
this.resetBtn = page.getByRole('button', { name: /重\s*置/ });
this.addBtn = page.getByRole('button', { name: /新\s*增/ });
this.richTextEditor = page.locator('.ql-editor').first();
this.modalTitleInput = this.dialog.locator('#form_item_title');
}
}
This diff is collapsed.
import type { Locator, Page } from '@playwright/test';
import { BasicUserSharedLocators } from './basic-user-shared.locator';
/** 角色管理。选择器来自 locators/spd/basic-role.locator.yaml */
export class BasicRoleLocators extends BasicUserSharedLocators {
readonly saveBtn: Locator;
readonly refreshBtn: Locator;
readonly addRoleBtn: Locator;
readonly roleSearch: Locator;
readonly roleTree: Locator;
readonly roleSider: Locator;
/** 左栏底部/右下角编辑图标(选中角色后可见) */
readonly editRoleIcon: Locator;
constructor(page: Page) {
super(page);
this.saveBtn = page.getByRole('button', { name: /保\s*存/ });
this.refreshBtn = page.getByRole('button', { name: /刷\s*新/ });
this.addRoleBtn = page.getByRole('button', { name: /^角\s*色$/ });
this.roleSearch = page
.getByPlaceholder(/角色/)
.or(page.locator('.ant-layout-sider input, .ant-layout-sider .ant-input'))
.first();
this.roleTree = page.locator('.menu-role-tree').first();
this.roleSider = page.locator('.ant-layout-sider').first();
this.editRoleIcon = this.roleSider
.locator('button, a, [role="button"]')
.filter({ has: page.locator('.anticon-edit, .anticon-form') })
.last()
.or(this.roleSider.locator('.anticon-edit, .anticon-form').last());
}
treeNode(title: string): Locator {
return this.roleTree.locator('.ant-tree-title').filter({ hasText: new RegExp(`^\\s*${title}\\s*$`) });
}
treeCheckbox(title: string): Locator {
return this.roleTree
.locator('.ant-tree-treenode')
.filter({ has: this.page.locator('.ant-tree-title').filter({ hasText: new RegExp(`^\\s*${title}\\s*$`) }) })
.locator('.ant-tree-checkbox')
.first();
}
}
This diff is collapsed.
import type { Locator, Page } from '@playwright/test';
/** 基础设置 · 医院资料 共用菜单 / 表格 / 分页 / 弹窗。 */
export class BasicSharedLocators {
readonly menuBasic: Locator;
readonly menuHospital: Locator;
readonly table: Locator;
readonly tableHeader: Locator;
readonly dataRows: Locator;
readonly empty: Locator;
readonly pagination: Locator;
readonly paginationTotal: Locator;
readonly pageJumpInput: Locator;
readonly nextPage: Locator;
readonly dialog: Locator;
readonly confirm: Locator;
readonly formError: Locator;
constructor(protected readonly page: Page) {
this.menuBasic = page.getByRole('menuitem', { name: '基础设置' });
this.menuHospital = page.getByRole('menuitem', { name: '医院资料' });
this.table = page.locator('.ant-table').first();
this.tableHeader = page.locator('.ant-table-thead th');
this.dataRows = page.locator('.ant-table-tbody tr.ant-table-row:not(.ant-table-measure-row)');
this.empty = page.locator('.ant-empty, .ant-empty-description').first();
this.pagination = page.locator('.ant-pagination').first();
this.paginationTotal = page.locator('.ant-pagination-total-text').first();
this.pageJumpInput = page.locator('.ant-pagination-options-quick-jumper input').first();
this.nextPage = page.locator('.ant-pagination-next').first();
this.dialog = page.getByRole('dialog');
this.confirm = page.locator('.ant-modal-confirm, .ant-popconfirm, .ant-modal').filter({ hasText: '提示' }).last();
this.formError = page.locator('.ant-form-item-explain-error');
}
menuItem(name: string): Locator {
return this.page.getByRole('menuitem', { name, exact: true });
}
button(name: string | RegExp): Locator {
return this.page.getByRole('button', { name });
}
dialogButton(name: string | RegExp): Locator {
return this.dialog.getByRole('button', { name });
}
}
This diff is collapsed.
import type { Page } from '@playwright/test';
import { BasicUserLocators } from './basic-user.locator';
/** 医共体用户管理。选择器来自 locators/spd/basic-user-union.locator.yaml */
export class BasicUserUnionLocators extends BasicUserLocators {
constructor(page: Page) {
super(page);
}
}
This diff is collapsed.
import type { Locator, Page } from '@playwright/test';
import { BasicUserSharedLocators } from './basic-user-shared.locator';
/** 用户管理。选择器来自 locators/spd/basic-user.locator.yaml */
export class BasicUserLocators extends BasicUserSharedLocators {
readonly deptInput: Locator;
readonly roleInput: Locator;
readonly excelImport: Locator;
readonly signature: Locator;
constructor(page: Page) {
super(page);
this.deptInput = page.locator('#form_item_deptId');
this.roleInput = page.locator('#form_item_roleCode');
this.excelImport = page.getByRole('button', { name: 'Excel导入' });
this.signature = page.getByText('签名图片');
}
dialogUserCode(): Locator {
return this.dialog.locator('#form_item_userCode');
}
dialogName(): Locator {
return this.dialog.locator('#form_item_cname');
}
dialogTel(): Locator {
return this.dialog.locator('#form_item_tel');
}
dialogErp(): Locator {
return this.dialog.locator('#form_item_erpCode');
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment