From b7e6a4b393731a85d717fd4728a758806ee23b7c Mon Sep 17 00:00:00 2001 From: sindoring Date: Tue, 28 Jul 2026 21:12:21 +0400 Subject: [PATCH] fix --- lib/app/design_system/mw_authentication.dart | 4 +-- .../design_system/mw_authentication_test.dart | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/lib/app/design_system/mw_authentication.dart b/lib/app/design_system/mw_authentication.dart index ad3286b..edfd57d 100644 --- a/lib/app/design_system/mw_authentication.dart +++ b/lib/app/design_system/mw_authentication.dart @@ -311,9 +311,7 @@ class _Tab extends StatelessWidget { alignment: Alignment.center, decoration: BoxDecoration( border: Border( - bottom: BorderSide( - color: selected ? accent : const Color(0x247FB8D4), - ), + bottom: BorderSide(color: selected ? accent : Colors.transparent), ), ), child: Text( diff --git a/test/app/design_system/mw_authentication_test.dart b/test/app/design_system/mw_authentication_test.dart index c395ca4..ba00af0 100644 --- a/test/app/design_system/mw_authentication_test.dart +++ b/test/app/design_system/mw_authentication_test.dart @@ -81,4 +81,40 @@ void main() { expect(requestedMode, MwAuthenticationMode.registration); }); + + testWidgets('inactive authentication tab has no divider', (tester) async { + await tester.pumpWidget( + MaterialApp( + theme: MoonWellTheme.create(MoonWellThemeVariant.forest), + home: Scaffold( + body: MwAuthenticationForm( + usernameController: TextEditingController(), + passwordController: TextEditingController(), + onSubmit: () {}, + ), + ), + ), + ); + + final tabBorders = tester + .widgetList( + find.descendant( + of: find.byType(MwAuthenticationForm), + matching: find.byType(Container), + ), + ) + .map((container) => container.decoration) + .whereType() + .map((decoration) => decoration.border) + .whereType() + .where((border) => border.bottom.style != BorderStyle.none) + .map((border) => border.bottom.color) + .toList(); + + expect(tabBorders, hasLength(2)); + expect( + tabBorders.where((color) => color == Colors.transparent), + hasLength(1), + ); + }); }