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,26 @@
import { describe, it, expect } from 'vitest';
import { ERP_LOCATORS } from '../../src/main/services/erp/locators';
describe('ERP Locators', () => {
it('should have login page locators defined', () => {
expect(ERP_LOCATORS.login.usernameInput).toBeDefined();
expect(ERP_LOCATORS.login.passwordInput).toBeDefined();
expect(ERP_LOCATORS.login.submitButton).toBeDefined();
});
it('should have main frame locator', () => {
expect(ERP_LOCATORS.main.mainIframe).toBeDefined();
});
it('should have extractor page locators', () => {
expect(ERP_LOCATORS.extractor.orderNumberInput).toBeDefined();
expect(ERP_LOCATORS.extractor.queryButton).toBeDefined();
expect(ERP_LOCATORS.extractor.exportButton).toBeDefined();
});
it('should have cleaner page locators', () => {
expect(ERP_LOCATORS.cleaner.orderNumberInput).toBeDefined();
expect(ERP_LOCATORS.cleaner.materialGrid).toBeDefined();
expect(ERP_LOCATORS.cleaner.saveButton).toBeDefined();
});
});