mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-18 12:43:57 +00:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user