Skip to content

Commit

Permalink
Finished test
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias committed Dec 4, 2023
1 parent 80d8758 commit 2b58444
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions test/src/recipes/container/container_widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import '../../../helpers/testing_utils.dart';
void main() {
testWidgets('StyledContainer', (WidgetTester tester) async {
final paddingAttr = padding(10);
final marginAttr = margin(10);
final marginAttr = margin(15);
final alignmentAttr = alignment.center();
final clipAttr = clipBehavior.hardEdge();

Expand All @@ -32,13 +32,17 @@ void main() {
final containerFinder = find.byType(Container);
final containerWidget = tester.widget<Container>(containerFinder);

final containerSpec = boxDecorationAttr.resolve(EmptyMixData);

expect(containerWidget.padding, containerSpec.padding);
expect(containerWidget.margin, containerSpec.margin);
expect(containerWidget.alignment, containerSpec.alignment);
expect(containerWidget.clipBehavior, containerSpec.clipBehavior);
expect(containerWidget.decoration, isA<BoxDecoration>());
expect(containerWidget.decoration, equals(containerSpec.decoration));
expect(containerWidget.padding, const EdgeInsets.all(10));
expect(containerWidget.margin, const EdgeInsets.all(15));
expect(containerWidget.alignment, Alignment.center);
expect(containerWidget.clipBehavior, Clip.hardEdge);
expect(
containerWidget.decoration,
BoxDecoration(
border:
Border.all(color: Colors.red, width: 1, style: BorderStyle.solid),
borderRadius: BorderRadius.circular(10),
color: Colors.red,
));
});
}

0 comments on commit 2b58444

Please sign in to comment.