Jens Bergmann
92ac17b430
fix: improve login flow tests
...
Login Flow Tests:
- Fixed test_login_flow_handles_captcha to properly handle both login
attempts
- Added individual test functions for each component of the login flow:
* test_check_and_wait_for_captcha: Tests captcha detection and user
interaction
* test_fill_login_data_and_send: Tests login form filling and
submission
* test_handle_after_login_logic: Tests post-login handling (device
verification, GDPR)
- Improved test assertions to match actual behavior of the login process
- Added proper async mocking to prevent test stalling
Test Init:
- Fixed test_extract_pricing_info to properly handle all price formats
- Improved test coverage for price extraction edge cases
- Ensured tests accurately reflect the actual behavior of the price
extraction logic
2025-06-09 21:39:56 +02:00
Heavenfighter
8ac57932ba
fix: login does not work anymore #539
...
Refactored login input element ids.
Refactored captcha handling to one function
2025-06-09 21:39:56 +02:00
sebthom
c6e8175670
fix(deps): upgrade requests package
2025-06-09 21:39:56 +02:00
sebthom
ebfdbc4313
fix: shipping options are not applied when shipping_costs set to 0 #541
2025-06-09 20:58:04 +02:00
sebthom
3978d85cb4
fix: ruff PLC0207 missing-maxsplit-arg
2025-06-09 20:58:04 +02:00
kleinanzeigen-bot-tu[bot]
67805e633f
chore: Update Python dependencies ( #542 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-09 13:35:22 +02:00
kleinanzeigen-bot-tu[bot]
2d1e655535
chore: Update Python dependencies ( #538 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-07 12:21:19 +02:00
kleinanzeigen-bot-tu[bot]
3d01119370
chore: ✔ Update ruff 0.11.12 -> 0.11.13 ( #537 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-06 12:21:31 +02:00
kleinanzeigen-bot-tu[bot]
41591f70d1
chore: Update Python dependencies ( #535 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-05 15:24:30 +02:00
sebthom
85bd5c2f2a
fix: update config schema
2025-06-05 13:07:07 +02:00
Heavenfighter
770429f824
#533 Loading images from default config ( #536 )
2025-06-05 12:31:05 +02:00
sebthom
ea8af3795b
fix: creating GH releases fails
2025-05-30 17:50:53 +02:00
sebthom
37c0eba7c7
fix: publishing docker image to ghcr.io fails
2025-05-30 17:22:53 +02:00
kleinanzeigen-bot-tu[bot]
5fc98a143a
chore: Update Python dependencies ( #534 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-30 16:56:34 +02:00
Heavenfighter
192b42a833
#525 Refactored gdpr handling ( #532 )
2025-05-28 14:43:23 +02:00
Heavenfighter
fbaeb80585
fix: clearing password input while logging in ( #531 )
...
* #530 Sending empty string to password input
* #530 added comment for clarification
2025-05-28 11:40:34 +02:00
kleinanzeigen-bot-tu[bot]
08f22d2257
chore: ✔ Update setuptools 80.8.0 -> 80.9.0 ( #529 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-27 12:30:57 +02:00
sebthom
15461bb1a5
fix: release build not running
2025-05-26 20:50:54 +02:00
kleinanzeigen-bot-tu[bot]
bf876b15be
chore: ✔ Update pytest-asyncio 0.26.0 -> 1.0.0 ( #526 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-26 19:56:16 +02:00
Heavenfighter
347c67a388
fixes #512 ( #519 )
...
Refactored images extraction. Now directly using galleryimage-elements instead of carousel.
2025-05-25 22:28:20 +02:00
kleinanzeigen-bot-tu[bot]
b17b19db24
chore: Update Python dependencies ( #518 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-25 16:22:04 +02:00
Heavenfighter
e94a1dd8af
fixes #522 ( #523 )
...
Refactored XPATH expression for
deselecting unwanted
shipping options.
2025-05-25 16:21:09 +02:00
kleinanzeigen-bot-tu[bot]
337516cf9b
chore: Update Python dependencies ( #517 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-22 12:24:48 +02:00
kleinanzeigen-bot-tu[bot]
8ae9d1182e
chore: Update Python dependencies ( #516 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-21 12:50:47 +02:00
sebthom
d992fed9e9
ci: only publish coverage reports after all matrix builds are complete
2025-05-18 23:23:23 +02:00
sebthom
c794102452
chore: update workflow config
2025-05-18 21:06:08 +02:00
Jens Bergmann
50656ad7e2
feat: Improve test coverage ( #515 )
...
* test: implement comprehensive test coverage improvements
This commit improves test coverage across multiple modules, adding unit tests
for core functionality.
Key improvements:
1. WebScrapingMixin:
- Add comprehensive async error handling tests
- Add session management tests (browser crash recovery, session expiration)
- Add element interaction tests (custom wait conditions, timeouts)
- Add browser configuration tests (extensions, preferences)
- Add robust awaitable mocking infrastructure
- Rename integration test file to avoid naming conflicts
2. Error Handlers:
- Add tests for error message formatting
- Add tests for error recovery scenarios
- Add tests for error logging functionality
3. Network Utilities:
- Add tests for port checking functionality
- Add tests for network error handling
- Add tests for connection management
4. Pydantic Models:
- Add tests for validation cases
- Add tests for error handling
- Add tests for complex validation scenarios
Technical details:
- Use TrulyAwaitableMockPage for proper async testing
- Add comprehensive mocking for browser and page objects
- Add proper cleanup in session management tests
- Add browser-specific configuration tests (Chrome/Edge)
- Add proper type hints and docstrings
Files changed:
- Renamed: tests/integration/test_web_scraping_mixin.py → tests/integration/test_web_scraping_mixin_integration.py
- Added: tests/unit/test_error_handlers.py
- Added: tests/unit/test_net.py
- Added: tests/unit/test_pydantics.py
- Added: tests/unit/test_web_scraping_mixin.py
* test: enhance test coverage with additional edge cases and scenarios
This commit extends the test coverage improvements with additional test cases
and edge case handling, focusing on browser configuration, error handling, and
file utilities.
Key improvements:
1. WebScrapingMixin:
- Add comprehensive browser binary location detection tests
- Add cross-platform browser path detection (Linux, macOS, Windows)
- Add browser profile configuration tests
- Add session state persistence tests
- Add external process termination handling
- Add session creation error cleanup tests
- Improve browser argument configuration tests
- Add extension loading validation tests
2. Error Handlers:
- Add debug mode error handling tests
- Add specific error type tests (AttributeError, ImportError, NameError, TypeError)
- Improve error message formatting tests
- Add traceback inclusion verification
3. Pydantic Models:
- Add comprehensive validation error message tests
- Add tests for various error codes and contexts
- Add tests for pluralization in error messages
- Add tests for empty error list handling
- Add tests for context handling in validation errors
4. File Utilities:
- Add comprehensive path resolution tests
- Add tests for file and directory reference handling
- Add tests for special path cases
- Add tests for nonexistent path handling
- Add tests for absolute and relative path conversion
Technical details:
- Add proper type casting for test fixtures
- Improve test isolation and cleanup
- Add platform-specific browser path detection
- Add proper error context handling
- Add comprehensive error message formatting tests
- Add proper cleanup in session management tests
- Add browser-specific configuration tests
- Add proper path normalization and resolution tests
* fix(test): handle Linux browser paths in web_scraping_mixin test
Update mock_exists to properly detect Linux browser binaries in test_browser_profile_configuration, fixing the "Installed browser could not be detected" error.
* fix(test): handle Windows browser paths in web_scraping_mixin test
Add Windows browser paths to mock_exists function to properly detect browser binaries on Windows platform, fixing the "Specified browser binary does not exist" error.
2025-05-18 19:02:59 +02:00
sebthom
fb00f11539
ci: update codecov config
2025-05-16 15:15:54 +02:00
kleinanzeigen-bot-tu[bot]
27282f2853
chore: Update Python dependencies ( #514 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-16 13:35:47 +02:00
sebthom
23910ffbf5
ci: publish code coverage reports
2025-05-15 22:13:38 +02:00
sebthom
83c0d6adf0
refact: move temp files to /.temp/
2025-05-15 19:52:41 +02:00
sebthom
cc25164b43
fix: replace usage of legacy pydantic validators
2025-05-15 19:12:48 +02:00
kleinanzeigen-bot-tu[bot]
3b381847ca
chore: Update Python dependencies ( #511 )
...
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-15 12:20:23 +02:00
sebthom
85a5cf5224
feat: improve content_hash calculation
2025-05-15 12:07:49 +02:00
sebthom
f1cd597dd8
fix: reduce distribution size
2025-05-15 12:07:49 +02:00
sebthom
6ede14596d
feat: add type safe Ad model
2025-05-15 12:07:49 +02:00
sebthom
1369da1c34
feat: add type safe Config model
2025-05-15 12:07:49 +02:00
sebthom
e7a3d46d25
fix: display file paths under current working dir as relative in logs
2025-05-15
2025-05-15 00:27:10 +02:00
sebthom
e811cd339b
ci: improve issue template
2025-05-15 00:27:10 +02:00
sebthom
a863f3c63a
ci: improve issue template
2025-05-14 12:35:35 +02:00
Heavenfighter
0faa022e4d
fix: Unable to download single ad ( #509 )
2025-05-14 11:24:16 +02:00
sebthom
8e2385c078
fix: TimeoutError: Unable to close shipping dialog! #505
2025-05-13 21:06:42 +02:00
sebthom
a03b368ccd
fix: active: false in ad config is ignored #502
2025-05-13 20:59:15 +02:00
sebthom
9a3c0190ba
chore: improve dicts module
2025-05-13 20:42:42 +02:00
sebthom
1f9895850f
fix: add missing translations and fix translation loading/testing
2025-05-13 19:27:52 +02:00
sebthom
21d7cc557d
feat: extend utils.save_dict
2025-05-13 13:45:58 +02:00
sebthom
58f6ae960f
refact: simplify XPATH expressions
2025-05-12 18:28:28 +02:00
sebthom
50c0323921
fix: random RuntimeError: dictionary changed size during iteration
2025-05-12 17:50:08 +02:00
sebthom
ee4146f57c
fix: auto-restart when captcha was encountered
2025-05-12 17:20:51 +02:00
airwave1981
65738926ae
fix: TypeError in CustomFormatter.format
2025-05-12 17:11:47 +02:00