🟡 MEDIUM - Staff management feature
Migrate Workers wdio tests to Cypress. Workers represent staff members in the system who can be assigned to tasks and eForms.
-
workers.add.spec.ts- Creating worker records -
workers.edit.spec.ts- Editing worker information
- wdio tests:
eform-client/e2e/Tests/workers/ - Target location:
eform-client/cypress/e2e/h/ori/(or appropriate grouping)
- Should navigate to workers page
- Should create new worker
- Should add worker first name
- Should add worker last name
- Should add worker email (if applicable)
- Should validate required fields
- Should verify worker appears in list
- Should edit worker's first name
- Should edit worker's last name
- Should edit worker's email
- Should edit worker's properties
- Should save changes successfully
- Should verify updates in worker list
- Action: Create/adapt page objects for workers in Cypress
- Reference: Check if Workers page object exists in wdio version
- Navigate to workers management page
- Create new worker with required information
- Validate required fields (name, etc.)
- Edit worker details
- Save and verify changes
- List/table display of workers
- Worker search/filter (if applicable)
- Both test files migrated to Cypress
- Tests follow existing Cypress patterns
- Page objects created for workers management
- All worker operations tested
- Validation rules enforced
- Tests pass locally
- Tests pass in CI/CD pipeline
- Test workers properly cleaned up
- Use
cy.intercept()for workers API calls - Handle worker creation and editing forms
- Test validation (required fields)
- Ensure test workers are deleted after tests
- May need to handle worker-device user relationship (if exists)
- Login functionality (already available in Cypress)
- Navigation to workers page
- Form validation patterns
Workers are similar to Device Users but represent different user types:
- Device Users: Mobile device operators
- Workers: Staff members (may or may not have devices)
Reference the Device Users migration (Issue #1) for similar patterns.
Small-Medium (2 hours) - Similar to Device Users with 2 tests instead of 3
- Full Migration Plan
- Testing Documentation
- Device Users migration for similar patterns
Before closing this issue:
- Both test files passing
- Workers created correctly
- Workers edited correctly
- Validation working
- Test data properly cleaned up
- No leftover workers after tests
- Tests are deterministic
- Code reviewed
- Update
WDIO_TO_CYPRESS_MIGRATION.mdprogress tracking