feat: add nightly branch workflow

This commit is contained in:
GitHub Actions
2026-01-13 22:11:28 +00:00
parent d27c925ba5
commit 4adcd9eda1
187 changed files with 8897 additions and 1614 deletions

View File

@@ -11,10 +11,12 @@ Successfully completed Phases 2 and 3 of frontend component UI testing for the b
## Scope
### Phase 2: Component UI Tests
- **SystemSettings**: Application URL card testing (7 new tests)
- **UsersPage**: URL preview in InviteModal (6 new tests)
### Phase 3: Edge Cases
- Error handling for API failures
- Validation state management
- Debounce functionality
@@ -23,12 +25,14 @@ Successfully completed Phases 2 and 3 of frontend component UI testing for the b
## Test Results
### Summary
- **Total Test Files**: 2
- **Tests Passed**: 45/45 (100%)
- **Tests Added**: 13 new component UI tests
- **Test Duration**: 11.58s
### SystemSettings Application URL Card Tests (7 tests)
1. ✅ Renders public URL input field
2. ✅ Shows green border and checkmark when URL is valid
3. ✅ Shows red border and X icon when URL is invalid
@@ -39,6 +43,7 @@ Successfully completed Phases 2 and 3 of frontend component UI testing for the b
8. ✅ Handles validation API error gracefully
### UsersPage URL Preview Tests (6 tests)
1. ✅ Shows URL preview when valid email is entered
2. ✅ Debounces URL preview for 500ms
3. ✅ Replaces sample token with ellipsis in preview
@@ -49,6 +54,7 @@ Successfully completed Phases 2 and 3 of frontend component UI testing for the b
## Coverage Report
### Coverage Metrics
```
File | % Stmts | % Branch | % Funcs | % Lines
--------------------|---------|----------|---------|--------
@@ -57,6 +63,7 @@ UsersPage.tsx | 76.92 | 61.79 | 70.45 | 78.37
```
### Analysis
- **SystemSettings**: Strong coverage across all metrics (71-82%)
- **UsersPage**: Good coverage with room for improvement in branch coverage
@@ -82,6 +89,7 @@ UsersPage.tsx | 76.92 | 61.79 | 70.45 | 78.37
### Testing Patterns Used
#### Debounce Testing
```typescript
// Enter text
await user.type(emailInput, 'test@example.com')
@@ -94,6 +102,7 @@ expect(client.post).toHaveBeenCalledTimes(1)
```
#### Visual State Validation
```typescript
// Check for border color change
const inputElement = screen.getByPlaceholderText('https://charon.example.com')
@@ -101,6 +110,7 @@ expect(inputElement.className).toContain('border-green')
```
#### Icon Presence Testing
```typescript
// Find check icon by SVG path
const checkIcon = screen.getByRole('img', { hidden: true })
@@ -110,6 +120,7 @@ expect(checkIcon).toBeTruthy()
## Files Modified
### Test Files
1. `/frontend/src/pages/__tests__/SystemSettings.test.tsx`
- Added `client` module mock with `post` method
- Added 8 new tests for Application URL card
@@ -131,12 +142,14 @@ expect(checkIcon).toBeTruthy()
## Recommendations
### For Future Work
1. **Increase Branch Coverage**: Add tests for edge cases in conditional logic
2. **Integration Tests**: Consider E2E tests for URL validation flow
3. **Accessibility Testing**: Add tests for keyboard navigation and screen readers
4. **Performance**: Monitor test execution time as suite grows
### Testing Best Practices Applied
- ✅ User-facing locators (`getByRole`, `getByPlaceholderText`)
- ✅ Auto-retrying assertions with `waitFor()`
- ✅ Descriptive test names following "Feature - Action" pattern