Skip to content

Commit

Permalink
Fix popover test
Browse files Browse the repository at this point in the history
  • Loading branch information
Pante committed Aug 30, 2024
1 parent 20ed9b2 commit 8943c7e
Showing 1 changed file with 19 additions and 23 deletions.
42 changes: 19 additions & 23 deletions forui/test/src/widgets/popover/popover_golden_test.dart
Original file line number Diff line number Diff line change
@@ -17,17 +17,15 @@ void main() {
final controller = FPopoverController(vsync: const TestVSync());

await tester.pumpWidget(
MaterialApp(
home: TestScaffold(
data: theme,
child: FPopover(
controller: controller,
followerBuilder: (context, style, _) => const SizedBox.square(dimension: 100),
target: const ColoredBox(
color: Colors.yellow,
child: SizedBox.square(
dimension: 100,
),
TestScaffold(
data: theme,
child: FPopover(
controller: controller,
followerBuilder: (context, style, _) => const SizedBox.square(dimension: 100),
target: const ColoredBox(
color: Colors.yellow,
child: SizedBox.square(
dimension: 100,
),
),
),
@@ -41,17 +39,15 @@ void main() {
final controller = FPopoverController(vsync: const TestVSync());

await tester.pumpWidget(
MaterialApp(
home: TestScaffold(
data: theme,
child: FPopover(
controller: controller,
followerBuilder: (context, style, _) => const SizedBox.square(dimension: 100),
target: const ColoredBox(
color: Colors.yellow,
child: SizedBox.square(
dimension: 100,
),
TestScaffold(
data: theme,
child: FPopover(
controller: controller,
followerBuilder: (context, style, _) => const SizedBox.square(dimension: 100),
target: const ColoredBox(
color: Colors.yellow,
child: SizedBox.square(
dimension: 100,
),
),
),
@@ -61,7 +57,7 @@ void main() {
unawaited(controller.show());
await tester.pumpAndSettle();

await expectLater(find.byType(MaterialApp), matchesGoldenFile('popover/$name-shown.png'));
await expectLater(find.byType(TestScaffold), matchesGoldenFile('popover/$name-shown.png'));
});
});
}

0 comments on commit 8943c7e

Please sign in to comment.