Test: fix test cases and improve document parsing validation (#8179)
### What problem does this PR solve?
- Update chat assistant tests to use dataset.id directly in payloads
- Enhance document parsing tests with better condition checking
- Add explicit type hints and improve timeout handling
Action_7556
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)