diff --git a/test/features/consultant/become_consultant/presentation/pages/become_consultant_screen_test.dart b/test/features/consultant/become_consultant/presentation/pages/become_consultant_screen_test.dart index 128c3225..5175b19a 100644 --- a/test/features/consultant/become_consultant/presentation/pages/become_consultant_screen_test.dart +++ b/test/features/consultant/become_consultant/presentation/pages/become_consultant_screen_test.dart @@ -16,5 +16,29 @@ void main() { expect(find.byType(BecomeConsultantScreen), findsOneWidget); expect(find.text('Стать консультантом'), findsOneWidget); }); + + testWidgets('keeps the bottom action above the system navigation area', (tester) async { + const bottomInset = 34.0; + + await tester.pumpWidget( + MaterialApp( + theme: ThemeHelper().themeData(), + builder: (context, child) => MediaQuery( + data: MediaQuery.of(context).copyWith(padding: const EdgeInsets.only(bottom: bottomInset)), + child: child!, + ), + home: const BecomeConsultantScreen(), + ), + ); + await tester.pumpAndSettle(); + + final buttonRect = tester.getRect( + find.ancestor(of: find.text('Начать регистрацию'), matching: find.byType(Ink)).first, + ); + final viewHeight = tester.view.physicalSize.height / tester.view.devicePixelRatio; + + expect(buttonRect.bottom, lessThanOrEqualTo(viewHeight - bottomInset)); + expect(tester.takeException(), isNull); + }); }); }