-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Is there an existing issue for this?
- I have searched the existing issues.
Version
0.10.0
Description
The error occurs when trying to test a widget with an image and infinite animation
Steps to reproduce
- When testing a widget with an image and an endless animation,
- If it is a precacheImages function, and it has a command at the end, await tester.pumpAndSettle(), then it waits for the end of the frame rendering, but this doesn't happen because there's an endless animation on the screen.
- Perhaps we should extend the precacheImages function with a flag to turn off await tester.pumpAndSettle()?
Expected behavior
The test was completed successfully.
Screenshots
Additional context and comments
Example
goldenTest(
'Animation with image',
fileName: 'example',
pumpBeforeTest: precacheImages,
pumpWidget: (tester, widget) async {
await tester.pumpWidget(widget);
await tester.pump(Durations.medium4);
},
builder: () {
return GoldenTestGroup(
scenarioConstraints:
const BoxConstraints(maxWidth: 1200, minWidth: 600),
children: [
GoldenTestScenario(
name: 'Animation',
child: const Column(
children: [
CircularProgressIndicator(
color: Colors.red,
),
SizedBox.square(
dimension: 120,
child: Image(image: AssetImage(UiKitImages.cluster)),
),
],
),
),
],
);
},
);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working