Skip to content

Commit 9b99523

Browse files
authored
Fix flaky SentryFeedbackWidget test (#3047)
* wait a bit for validation labels to appear * clear preserved data between tests
1 parent 640ad0c commit 9b99523

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

flutter/test/feedback/sentry_feedback_widget_test.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,6 @@ void main() {
569569

570570
setUp(() {
571571
fixture = Fixture();
572-
SentryFeedbackWidget.clearPreservedData();
573572
});
574573

575574
testWidgets('preserves form data when taking screenshot', (tester) async {
@@ -769,6 +768,9 @@ class Fixture {
769768
hint: anyNamed('hint'),
770769
withScope: anyNamed('withScope'),
771770
)).thenAnswer((_) async => SentryId.empty());
771+
772+
SentryFeedbackWidget.pendingAssociatedEventId = null;
773+
SentryFeedbackWidget.clearPreservedData();
772774
}
773775

774776
Future<void> pumpFeedbackWidget(

0 commit comments

Comments
 (0)