Files
pipelines/app/test/features/runs/domain/run_tab_counts_test.dart
T
alan fa95c2fcae Remove the Runs error counter for now
Keep the running indicator and Needs you flow, but remove the failed-count badge and its tab count plumbing until unseen-state behavior is addressed. Preserve the unfinished seen-state work separately. Verify application, Runs, attention and shell regressions.
2026-11-11 23:18:30 +00:00

42 lines
1.1 KiB
Dart

import 'package:flutter_test/flutter_test.dart';
import 'package:pipelines_app/features/runs/domain/run_tab_counts.dart';
void main() {
test('running work excludes failed and completed runs', () {
expect(
runningRunCount([
{'status': 'running', 'executing': true},
{'status': 'queued', 'executing': true},
{'status': 'failed', 'executing': false},
{'status': 'waiting', 'executing': false},
{'status': 'canceled'},
{'status': 'interrupted'},
]),
2,
);
});
test('terminal statuses override stale execution flags', () {
expect(
runningRunCount([
{'status': 'failed', 'executing': true},
{'status': 'succeeded', 'executing': true},
]),
0,
);
});
test('older running summaries work without inventing other live states', () {
expect(
runningRunCount([
{'status': 'running'},
{'status': 'running', 'executing': false},
{'status': 'queued'},
{'status': 'waiting'},
]),
1,
);
expect(runningRunCount([]), 0);
});
}