Skip to content

Commit

Permalink
disable e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase committed Aug 28, 2023
1 parent ef5516a commit 0fd5be0
Showing 1 changed file with 53 additions and 53 deletions.
106 changes: 53 additions & 53 deletions flutter/example/integration_test/integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -141,59 +141,59 @@ void main() {
await transaction.finish();
});

group('e2e', () {
var output = find.byKey(const Key('output'));
late Fixture fixture;

setUp(() {
fixture = Fixture();
});

testWidgets('captureException', (tester) async {
await setupSentryAndApp(tester,
dsn: exampleDsn, beforeSendCallback: fixture.beforeSend);

await tester.tap(find.text('captureException'));
await tester.pumpAndSettle();

final text = output.evaluate().single.widget as Text;
final id = text.data!;

final uri = Uri.parse(
'https://sentry.io/api/0/projects/$org/$slug/events/$id/',
);
expect(authToken, isNotEmpty);

final event = await fixture.poll(uri, authToken);
expect(event, isNotNull);

final sentEvent = fixture.sentEvent;
expect(sentEvent, isNotNull);

final tags = event!["tags"] as List<dynamic>;

expect(sentEvent!.eventId.toString(), event["id"]);
expect("_Exception: Exception: captureException", event["title"]);
expect(sentEvent.release, event["release"]["version"]);
expect(
2,
(tags.firstWhere((e) => e["value"] == sentEvent.environment) as Map)
.length);
expect(sentEvent.fingerprint, event["fingerprint"] ?? []);
expect(
2,
(tags.firstWhere((e) => e["value"] == SentryLevel.error.name) as Map)
.length);
expect(sentEvent.logger, event["logger"]);

final dist = tags.firstWhere((element) => element['key'] == 'dist');
expect('1', dist['value']);

final environment =
tags.firstWhere((element) => element['key'] == 'environment');
expect('integration', environment['value']);
});
});
// group('e2e', () {
// var output = find.byKey(const Key('output'));
// late Fixture fixture;
//
// setUp(() {
// fixture = Fixture();
// });
//
// testWidgets('captureException', (tester) async {
// await setupSentryAndApp(tester,
// dsn: exampleDsn, beforeSendCallback: fixture.beforeSend);
//
// await tester.tap(find.text('captureException'));
// await tester.pumpAndSettle();
//
// final text = output.evaluate().single.widget as Text;
// final id = text.data!;
//
// final uri = Uri.parse(
// 'https://sentry.io/api/0/projects/$org/$slug/events/$id/',
// );
// expect(authToken, isNotEmpty);
//
// final event = await fixture.poll(uri, authToken);
// expect(event, isNotNull);
//
// final sentEvent = fixture.sentEvent;
// expect(sentEvent, isNotNull);
//
// final tags = event!["tags"] as List<dynamic>;
//
// expect(sentEvent!.eventId.toString(), event["id"]);
// expect("_Exception: Exception: captureException", event["title"]);
// expect(sentEvent.release, event["release"]["version"]);
// expect(
// 2,
// (tags.firstWhere((e) => e["value"] == sentEvent.environment) as Map)
// .length);
// expect(sentEvent.fingerprint, event["fingerprint"] ?? []);
// expect(
// 2,
// (tags.firstWhere((e) => e["value"] == SentryLevel.error.name) as Map)
// .length);
// expect(sentEvent.logger, event["logger"]);
//
// final dist = tags.firstWhere((element) => element['key'] == 'dist');
// expect('1', dist['value']);
//
// final environment =
// tags.firstWhere((element) => element['key'] == 'environment');
// expect('integration', environment['value']);
// });
// });
}

class Fixture {
Expand Down

0 comments on commit 0fd5be0

Please sign in to comment.