Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase committed May 21, 2024
1 parent d407cc4 commit 1dceadc
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,23 @@ void main() {
expect(crumb?.data?['view.class'], 'PopupMenuItem');
});
});

testWidgets('Add crumb for GestureDetector', (tester) async {
await tester.runAsync(() async {
final sut = fixture.getSut();

await tapMe(tester, sut, 'gesture_detector');
await tester.pumpAndSettle();

Breadcrumb? crumb;
fixture.hub.configureScope((scope) {
crumb = scope.breadcrumbs.last;
});
expect(crumb?.category, 'ui.click');
expect(crumb?.data?['view.id'], 'gesture_detector');
expect(crumb?.data?['view.class'], 'GestureDetector');
});
});
});

group('$SentryUserInteractionWidget performance', () {
Expand Down Expand Up @@ -477,6 +494,13 @@ class Page1 extends StatelessWidget {
),
],
),
GestureDetector(
key: ValueKey('gesture_detector'),
onTap: () => {
// print('gesture_detector'),
},
child: Text('gesture detector'),
)
],
),
),
Expand Down

0 comments on commit 1dceadc

Please sign in to comment.