fix(app): runs attention action shares the filter toolbar row
This commit is contained in:
@@ -4,8 +4,10 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pipelines_app/core/api_gateway.dart';
|
||||
import 'package:pipelines_app/features/attention/ui/needs_you_runs_heading.dart';
|
||||
import 'package:pipelines_app/features/runs/data/runs_repository.dart';
|
||||
import 'package:pipelines_app/features/runs/ui/runs_controller.dart';
|
||||
import 'package:pipelines_app/features/runs/ui/runs_filters.dart';
|
||||
import 'package:pipelines_app/features/runs/ui/runs_list.dart';
|
||||
|
||||
class _Gateway implements ApiGateway {
|
||||
@@ -188,4 +190,26 @@ void main() {
|
||||
},
|
||||
variant: TargetPlatformVariant.only(TargetPlatform.iOS),
|
||||
);
|
||||
|
||||
for (final cupertino in [false, true]) {
|
||||
testWidgets('the attention action shares the Filter toolbar row '
|
||||
'(${cupertino ? 'Cupertino' : 'Material'})', (tester) async {
|
||||
await mount(tester, cupertino: cupertino);
|
||||
await tester.pumpAndSettle();
|
||||
final bell = find.descendant(
|
||||
of: find.byType(RunsFilters),
|
||||
matching: find.byType(NeedsYouRunsHeading),
|
||||
);
|
||||
expect(bell, findsOneWidget);
|
||||
final filter = find.descendant(
|
||||
of: find.byType(RunsFilters),
|
||||
matching: find.text('Filter'),
|
||||
);
|
||||
expect(
|
||||
(tester.getCenter(bell).dy - tester.getCenter(filter).dy).abs(),
|
||||
lessThan(1),
|
||||
);
|
||||
expect(tester.takeException(), isNull);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user