mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 01:11:13 -05:00
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.
This commit is contained in:
@@ -267,8 +267,10 @@ export function IntegrationTestRunner() {
|
||||
<div className="pt-0.5">
|
||||
{result.status === 'pass' && <CheckCircle2 className="w-4 h-4 text-green-500" />}
|
||||
{result.status === 'fail' && <XCircle className="w-4 h-4 text-destructive" />}
|
||||
{result.status === 'skip' && <SkipForward className="w-4 h-4 text-muted-foreground" />}
|
||||
{result.status === 'running' && <Clock className="w-4 h-4 text-blue-500 animate-pulse" />}
|
||||
{result.status === 'skip' && !result.name.includes('⏳') && <SkipForward className="w-4 h-4 text-muted-foreground" />}
|
||||
{result.status === 'skip' && result.name.includes('⏳') && <Clock className="w-4 h-4 text-muted-foreground" />}
|
||||
{result.status === 'running' && !result.name.includes('⏳') && <Clock className="w-4 h-4 text-blue-500 animate-pulse" />}
|
||||
{result.status === 'running' && result.name.includes('⏳') && <Clock className="w-4 h-4 text-amber-500 animate-pulse" />}
|
||||
</div>
|
||||
<div className="flex-1 space-y-1">
|
||||
<div className="flex items-start justify-between gap-2">
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user