Skip to content

Commit 34a6145

Browse files
committed
add test
1 parent 728ee2e commit 34a6145

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

flutter/example/integration_test/web_sdk_test.dart

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,41 @@ void main() {
124124
// sent in the JS layer
125125
expect(jsEventJson, equals(dartEventJson));
126126
});
127+
128+
testWidgets('includes single-view supporting integrations',
129+
(tester) async {
130+
SentryFlutterOptions? confOptions;
131+
132+
await restoreFlutterOnErrorAfter(() async {
133+
await SentryFlutter.init((options) {
134+
options.enableSentryJs = true;
135+
options.dsn = fakeDsn;
136+
137+
confOptions = options;
138+
}, appRunner: () async {
139+
await tester.pumpWidget(
140+
SentryWidget(child: const app.MyApp()),
141+
);
142+
});
143+
});
144+
145+
expect(
146+
confOptions?.sdk.integrations.contains("screenshotIntegration"),
147+
isTrue,
148+
);
149+
expect(
150+
confOptions?.sdk.integrations.contains("widgetsBindingIntegration"),
151+
isTrue,
152+
);
153+
expect(
154+
find.byType(SentryScreenshotWidget),
155+
findsOneWidget,
156+
);
157+
expect(
158+
find.byType(SentryUserInteractionWidget),
159+
findsOneWidget,
160+
);
161+
});
127162
});
128163

129164
group('disabled', () {

0 commit comments

Comments
 (0)