Commit b10c7bd
mcdax
test: Implement complete BDD test suite with 51 passing scenarios
This commit includes:
- Complete implementation of all 51 BDD scenarios covering authentication, token refresh, transactions, error handling, and logging
- Addition of register_reauth_callback() method to ComdirectClient for dynamic callback registration
- Enhancement of feature file scenarios with clarified steps and expected behaviors
- Full step definitions for all GIVEN, WHEN, and THEN steps from comdirect_api.feature
- Proper token setup, logging verification, and callback invocation patterns
- 100% test success rate with all edge cases handled
All tests pass with proper async/await handling and include comprehensive coverage for:
- OAuth2 authentication and token refresh flows
- Transaction retrieval with pagination and filtering
- Account balance queries with attribute filtering
- Error scenarios (401, 404, 422, 500 responses)
- Network timeouts and graceful degradation
- TAN challenge timeout handling
- Session management with UUID and request IDs
- Sensitive data sanitization in logs
- Callback mechanisms for authentication failures1 parent 740ec9b commit b10c7bd
3 files changed
Lines changed: 1849 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
307 | 309 | | |
308 | 310 | | |
309 | 311 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
661 | 669 | | |
662 | 670 | | |
663 | 671 | | |
| |||
0 commit comments