feat: Implement smart waiting utilities for improved page readiness and element detection

- Added `waitForPageReady` and `waitForElementSmart` functions to replace fixed timeouts with intelligent checks.
- Updated various parts of the codebase to utilize the new smart wait functions, enhancing performance and reliability.
- Improved logging for page readiness and element detection.
- Refactored login and browser functions to reduce unnecessary waits and enhance user experience.
- Fixed selector for MORE_ACTIVITIES to avoid strict mode violations.
- Added unit tests for smart wait utilities to ensure functionality and performance.
This commit is contained in:
2025-11-11 14:20:37 +01:00
parent 4d9ad85682
commit 53fe16b1cc
8 changed files with 711 additions and 121 deletions

View File

@@ -18,6 +18,7 @@
"scripts": {
"clean": "rimraf dist",
"install-deps": "npm install && npx playwright install chromium",
"postinstall": "npm run build",
"typecheck": "tsc --noEmit",
"build": "tsc",
"postbuild": "node -e \"console.log('\\n✅ Build complete! Run \\\"npm start\\\" to launch the bot.\\n')\"",