From 4a18462c37a03ef6d8c27c9140c9399125506fb2 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 17:34:53 +0000 Subject: [PATCH] Add delay countdown UI progress Introduce visible countdown indicators for rate-limit delays between tests: - Extend test runner to emit and expose delay progress updates. - Update IntegrationTestRunner UI to display countdown while pausing. - Ensure users see why tests are paused during delays. --- .../admin/IntegrationTestRunner.tsx | 8 +++-- src/lib/integrationTests/testRunner.ts | 31 +++++++++++++++++++ 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/components/admin/IntegrationTestRunner.tsx b/src/components/admin/IntegrationTestRunner.tsx index 4cc2c415..e4149e2b 100644 --- a/src/components/admin/IntegrationTestRunner.tsx +++ b/src/components/admin/IntegrationTestRunner.tsx @@ -264,11 +264,13 @@ export function IntegrationTestRunner() { {results.map(result => (
-
+
{result.status === 'pass' && } {result.status === 'fail' && } - {result.status === 'skip' && } - {result.status === 'running' && } + {result.status === 'skip' && !result.name.includes('⏳') && } + {result.status === 'skip' && result.name.includes('⏳') && } + {result.status === 'running' && !result.name.includes('⏳') && } + {result.status === 'running' && result.name.includes('⏳') && }
diff --git a/src/lib/integrationTests/testRunner.ts b/src/lib/integrationTests/testRunner.ts index c19063f3..3bc4ebc9 100644 --- a/src/lib/integrationTests/testRunner.ts +++ b/src/lib/integrationTests/testRunner.ts @@ -143,7 +143,38 @@ export class IntegrationTestRunner { // Add delay between tests to prevent rate limiting (except after the last test) if (i < suite.tests.length - 1 && this.delayBetweenTests > 0) { + // Report delay status with countdown + const delaySeconds = this.delayBetweenTests / 1000; + const delayResult: TestResult = { + id: `delay-${Date.now()}`, + name: `⏳ Rate limit delay: ${delaySeconds}s`, + suite: suite.name, + status: 'running', + duration: 0, + timestamp: new Date().toISOString(), + details: { + reason: 'Pausing to prevent rate limiting', + delayMs: this.delayBetweenTests + } + }; + + if (this.onProgress) { + this.onProgress(delayResult); + } + await this.delay(this.delayBetweenTests); + + // Mark delay as complete + const delayCompleteResult: TestResult = { + ...delayResult, + status: 'skip', + duration: this.delayBetweenTests, + details: { reason: 'Rate limit delay completed' } + }; + + if (this.onProgress) { + this.onProgress(delayCompleteResult); + } } }