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.
This commit is contained in:
@@ -5,46 +5,38 @@ import 'package:pipelines_app/shell/adaptive_shell.dart';
|
||||
void main() {
|
||||
for (final width in [390.0, 1000.0]) {
|
||||
for (final brightness in Brightness.values) {
|
||||
testWidgets('running and failed are distinct at $width $brightness', (
|
||||
tester,
|
||||
) async {
|
||||
tester.view.physicalSize = Size(width, 900);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.reset);
|
||||
final semantics = tester.ensureSemantics();
|
||||
final theme = ThemeData(brightness: brightness);
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
theme: theme,
|
||||
home: const AdaptiveShell(runningRunCount: 2, failedRunCount: 3),
|
||||
),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
final failed = find.byKey(const ValueKey('shell.badge.runs.failed'));
|
||||
final running = find.byKey(const ValueKey('shell.badge.runs.running'));
|
||||
expect(
|
||||
find.descendant(of: failed, matching: find.text('3')),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(
|
||||
find.descendant(of: running, matching: find.text('2')),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(
|
||||
tester.widget<Badge>(failed).backgroundColor,
|
||||
theme.colorScheme.error,
|
||||
);
|
||||
expect(
|
||||
tester.getRect(find.text('3')).bottom,
|
||||
lessThan(tester.getRect(find.text('2')).top),
|
||||
);
|
||||
expect(
|
||||
find.bySemanticsLabel(RegExp('2 runs in progress, 3 failed runs')),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(tester.takeException(), isNull);
|
||||
semantics.dispose();
|
||||
});
|
||||
testWidgets(
|
||||
'running stays visible without an error counter at $width $brightness',
|
||||
(tester) async {
|
||||
tester.view.physicalSize = Size(width, 900);
|
||||
tester.view.devicePixelRatio = 1;
|
||||
addTearDown(tester.view.reset);
|
||||
final semantics = tester.ensureSemantics();
|
||||
final theme = ThemeData(brightness: brightness);
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
theme: theme,
|
||||
home: const AdaptiveShell(runningRunCount: 2, attentionCount: 3),
|
||||
),
|
||||
);
|
||||
await tester.pumpAndSettle();
|
||||
final failed = find.byKey(const ValueKey('shell.badge.runs.failed'));
|
||||
final running = find.byKey(
|
||||
const ValueKey('shell.badge.runs.running'),
|
||||
);
|
||||
expect(failed, findsNothing);
|
||||
expect(
|
||||
find.descendant(of: running, matching: find.text('2')),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(
|
||||
find.bySemanticsLabel(RegExp('2 runs in progress')),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(tester.takeException(), isNull);
|
||||
semantics.dispose();
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user