This commit is contained in:
2026-07-28 21:12:21 +04:00
parent 33659f6c05
commit b7e6a4b393
2 changed files with 37 additions and 3 deletions
@@ -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<Container>(
find.descendant(
of: find.byType(MwAuthenticationForm),
matching: find.byType(Container),
),
)
.map((container) => container.decoration)
.whereType<BoxDecoration>()
.map((decoration) => decoration.border)
.whereType<Border>()
.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),
);
});
}