feat: define ERP page element locators

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Misaka
2026-03-01 12:21:58 +08:00
parent 9ac8707921
commit c66dc2ecf8
2 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
/**
* ERP Page Element Locators
* Reference: playwrite/utils/ discrete_material_plan_extractor.py
* Reference: playwrite/utils/ discrete_material_plan_cleaner.py
*/
export const ERP_LOCATORS = {
// Login Page
login: {
usernameInput: '#username',
passwordInput: '#password',
submitButton: 'button[type="submit"]',
},
// Main Frame
main: {
mainIframe: '#mainiframe',
loadingOverlay: '.loading-overlay',
contentFrame: '#contentframe',
},
// Extractor (Data Export) Page
extractor: {
orderNumberInput: 'input[name="orderNumber"]',
queryButton: 'button:has-text("查询")',
exportButton: 'button:has-text("导出")',
},
// Cleaner (Material Delete) Page
cleaner: {
orderNumberInput: 'input[name="orderNumber"]',
materialGrid: 'table.material-grid tbody tr',
saveButton: 'button:has-text("保存")',
},
// Common Elements
common: {
successMessage: '.message.success',
errorMessage: '.message.error',
confirmDialog: '.confirm-dialog',
confirmButton: 'button:has-text("确定")',
cancelButton: 'button:has-text("取消")',
},
};