Current Coverage: 76.19% statements (272/357)
Target: 90%+
Gap: Need +48 more statements (14.8%)
Breakdown:
- Statements: 76.19% (272/357) - need ~+48 more
- Branches: 65.46% (127/194) - need ~+28 more
- Functions: 92% (23/25) - 2 untested functions
- Lines: 76.57% (268/350) - need ~+47 more
Method: _prepareRequest()
Issue: BASIC_AUTH header construction not tested
Impact: LOW (utility code)
Priority: MEDIUM (3)
Solution: Add test with BASIC_AUTH auth type
Method: _prepareRequest()
Issue: Console logging line
Impact: VERY LOW (debug code)
Priority: LOW (4)
Solution: Can skip (debugging)
Method: _fetch()
Issue: Fetch wrapper method
Impact: MEDIUM (used by all HTTP operations)
Priority: MEDIUM (3)
Solution: Add test calling _fetch directly
Method: createEvent()
Issue: Web API event creation (not v1 API tested currently)
Impact: HIGH (core functionality)
Priority: HIGH (1)
Solution: Add test for createEvent() with multipart logo
Method: createEvent() error handling
Issue: Specific error condition not tested
Impact: MEDIUM
Priority: MEDIUM (3)
Solution: Add test that triggers error in createEvent
Method: updateEventLogo()
Issue: This method is NOT TESTED
Impact: HIGH (user-facing feature)
Priority: HIGH (1)
Solution: Add comprehensive tests for updateEventLogo()
Method: setRouteExpiration()
Issue: Advanced route operations not tested
Impact: MEDIUM (specific feature)
Priority: MEDIUM (2)
Solution: Add test for setRouteExpiration()
Method: getClubMembers()
Issue: Error path not tested
Impact: MEDIUM (error handling)
Priority: MEDIUM (2)
Solution: Add error test for getClubMembers()
Methods: updateEventLogo() implementation (main body)
Issue: Entire method body uncovered
Impact: VERY HIGH (core feature)
Priority: CRITICAL (1)
Solution: Add tests covering:
- Login flow
- Event ID extraction
- Logo fetching from Google Drive
- Multipart payload building
- Logo upload to RWGPS
- Error handling at each step
Issue: Exception handling path
Priority: MEDIUM (3)
Issue: Exception handling path
Priority: MEDIUM (3)
Issue: Exception handling path
Priority: MEDIUM (3)
Issue: Exception handling path
Priority: MEDIUM (3)
Issue: Exception handling path
Priority: MEDIUM (3)
Need to identify which 2 functions aren't tested:
- Likely:
updateEventLogo()(lines 709-821) - Likely: One other method
- Task 10.1.2:
updateEventLogo()comprehensive tests- Login success/failure
- Event ID extraction
- Logo fetching from Drive
- Multipart payload
- Upload success/failure
- Error handling
- Task 10.1.3:
setRouteExpiration()tests - Task 10.1.4:
getClubMembers()pagination tests (already has some coverage) - Task 10.1.5: Error handling paths (multiple error tests)
- Task 10.1.2: Basic Auth tests (
_prepareRequestBASIC_AUTH) - Task 10.1.2:
createEvent()tests (web API)
- updateEventLogo() tests: 30-40 lines of test code (covers 113 uncovered lines)
- setRouteExpiration() tests: 10-15 lines of test code
- Error handling tests: 15-20 lines of test code
- Total: ~60-75 lines of new test code needed
- Task 10.1.2: Write tests for
updateEventLogo()(TDD approach) - Task 10.1.3: Write tests for
setRouteExpiration() - Task 10.1.4: Enhance
getClubMembers()tests - Task 10.1.5: Add comprehensive error handling tests
- Verify coverage reaches 90%+ before committing