-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don’t attach feedback event screenshot
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,36 @@ void main() { | |
added: true, isWeb: false, expectedMaxWidthOrHeight: widthOrHeight); | ||
}); | ||
|
||
testWidgets('does not add screenshot for feedback events', (tester) async { | ||
await tester.runAsync(() async { | ||
final sut = fixture.getSut(null, false); | ||
|
||
await tester.pumpWidget( | ||
SentryScreenshotWidget( | ||
child: Text('Catching Pokémon is a snap!', | ||
textDirection: TextDirection.ltr), | ||
), | ||
); | ||
|
||
final feedback = SentryFeedback( | ||
message: 'message', | ||
contactEmail: '[email protected]', | ||
name: 'Joe Dirt', | ||
associatedEventId: null, | ||
); | ||
final feedbackEvent = SentryEvent( | ||
type: 'feedback', | ||
contexts: Contexts(feedback: feedback), | ||
level: SentryLevel.info, | ||
); | ||
|
||
final hint = Hint(); | ||
await sut.apply(feedbackEvent, hint); | ||
|
||
expect(hint.screenshot, isNull); | ||
}); | ||
}); | ||
|
||
group('beforeScreenshot', () { | ||
testWidgets('does add screenshot if beforeScreenshot returns true', | ||
(tester) async { | ||
|