You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(FR-1844): enhance E2E test infrastructure and icon accessibility (#4923)
Resolves [FR-1844](https://lablup.atlassian.net/browse/FR-1844)
## Summary
This PR enhances the E2E test infrastructure and improves icon accessibility for better test automation and user experience.
## Changes
### 🎭 E2E Test Infrastructure Improvements
- **Enhanced playwright-test-healer agent documentation**
- Added comprehensive Ant Design form item locator patterns
- Documented icon locator best practices with aria-label
- Included test utility function references
- **Updated healer chatmode**
- Added form item locator guidelines
- Documented common BAI icon labels
- Enhanced test utility function documentation
### ♿ Icon Accessibility Enhancements
- **Added aria-label support to 50+ BAI icons**
- All icons now have default aria-label for better accessibility
- Enables semantic selectors in Playwright tests (e.g., `page.getByLabel('trash bin')`)
- Improves screen reader support
- Makes tests more resilient to DOM changes
### 🛠️ Test Utility Improvements
- **Enhanced `getFormItemControlByLabel` function**
- Properly handles Ant Design 6 form structure
- Filters by label text in `.ant-form-item-label label`
- Returns the correct `.ant-form-item-control` element
## Impact
### For E2E Tests
- More robust and maintainable test selectors
- Better alignment with Playwright best practices
- Reduced test brittleness from DOM changes
### For Accessibility
- Improved screen reader experience
- Better semantic HTML structure
- Enhanced keyboard navigation support
## Testing
All icon components maintain backward compatibility while adding new accessibility features.
**Checklist:**
- [x] Enhanced E2E test documentation
- [x] Added aria-label to all BAI icons
- [x] Updated test utility functions
- [x] Verified backward compatibility
[FR-1844]: https://lablup.atlassian.net/browse/FR-1844?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
- Import appropriate utility based on UI framework being tested
199
+
- Prefer utility functions over direct CSS selectors for maintainability
200
+
51
201
<example>Context: A developer has a failing Playwright test that needs to be debugged and fixed. user: 'The login test is failing, can you fix it?' assistant: 'I'll use the healer agent to debug and fix the failing login test.' <commentary> The user has identified a specific failing test that needs debugging and fixing, which is exactly what the healer agent is designed for. </commentary></example>
52
202
<example>Context: After running a test suite, several tests are reported as failing. user: 'Test user-registration.spec.ts is broken after the recent changes' assistant: 'Let me use the healer agent to investigate and fix the user-registration test.' <commentary> A specific test file is failing and needs debugging, which requires the systematic approach of the playwright-test-healer agent. </commentary></example>
0 commit comments