refactor: remove obsolete test files for SummaryReporter, LoginStateDetector, MobileRetryTracker, QueryDiversityEngine, sanitize, search, smartWait, and webhookPreview

- Deleted tests for SummaryReporter, ensuring no redundant tests remain.
- Removed LoginStateDetector tests to streamline the validation process.
- Cleaned up MobileRetryTracker tests to eliminate unnecessary complexity.
- Purged QueryDiversityEngine tests to focus on essential functionalities.
- Eliminated sanitize tests to reduce clutter in the test suite.
- Removed search tests to enhance maintainability and clarity.
- Deleted smartWait tests to simplify the testing framework.
- Cleared webhookPreview tests to maintain a clean codebase.
This commit is contained in:
2025-12-06 13:47:25 +01:00
parent a74a009c10
commit 87166cf3ea
14 changed files with 4 additions and 1447 deletions

View File

@@ -35,9 +35,8 @@ export class Workers {
// Daily Set
async doDailySet(page: Page, data: DashboardData) {
const todayData = data.dailySetPromotions[this.bot.utils.getFormattedDate()]
const today = this.bot.utils.getFormattedDate()
const todayData = data.dailySetPromotions[today]
const activitiesUncompleted = (todayData?.filter(x => !x.complete && x.pointProgressMax > 0) ?? [])
.filter(x => {
if (this.bot.config.jobState?.enabled === false) return true
@@ -46,7 +45,7 @@ export class Workers {
})
if (!activitiesUncompleted.length) {
this.bot.log(this.bot.isMobile, 'DAILY-SET', 'All Daily Set" items have already been completed')
this.bot.log(this.bot.isMobile, 'DAILY-SET', 'All "Daily Set" items have already been completed')
return
}
@@ -209,7 +208,8 @@ export class Workers {
await this.applyThrottle(throttle, ACTIVITY_DELAYS.ACTIVITY_SPACING_MIN, ACTIVITY_DELAYS.ACTIVITY_SPACING_MAX)
} catch (error) {
this.bot.log(this.bot.isMobile, 'ACTIVITY', 'An error occurred:' + error, 'error')
const message = error instanceof Error ? error.message : String(error)
this.bot.log(this.bot.isMobile, 'ACTIVITY', `Activity "${activity.title}" failed: ${message}`, 'error')
throttle.record(false)
}
}