Skip to content

Commit b71613a

Browse files
authored
Merge branch 'main' into feat/proxy-setup
2 parents 89c0915 + ffa37ac commit b71613a

File tree

2 files changed

+45
-34
lines changed

2 files changed

+45
-34
lines changed

.github/workflows/testflight.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # [email protected]
1818
- run: xcodes select 15.0.1
19-
- uses: ruby/setup-ruby@50ba3386b050ad5b97a41fcb81240cbee1d1821f # pin@v1.188.0
19+
- uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # pin@v1.190.0
2020
with:
2121
ruby-version: '2.7.5'
2222
bundler-cache: true

flutter/test/sentry_flutter_test.dart

+44-33
Original file line numberDiff line numberDiff line change
@@ -666,39 +666,50 @@ void main() {
666666
await expectLater(SentryFlutter.pauseAppHangTracking(), completes);
667667
});
668668

669-
test(
670-
'should add DartExceptionTypeIdentifier and FlutterExceptionTypeIdentifier by default',
671-
() async {
672-
SentryOptions? actualOptions;
673-
await SentryFlutter.init(
674-
(options) {
675-
options.dsn = fakeDsn;
676-
options.automatedTestMode = true;
677-
actualOptions = options;
678-
},
679-
appRunner: appRunner,
680-
);
681-
682-
expect(actualOptions!.exceptionTypeIdentifiers.length, 2);
683-
// Flutter identifier should be first as it's more specific
684-
expect(
685-
actualOptions!.exceptionTypeIdentifiers.first,
686-
isA<CachingExceptionTypeIdentifier>().having(
687-
(c) => c.identifier,
688-
'wrapped identifier',
689-
isA<FlutterExceptionTypeIdentifier>(),
690-
),
691-
);
692-
expect(
693-
actualOptions!.exceptionTypeIdentifiers[1],
694-
isA<CachingExceptionTypeIdentifier>().having(
695-
(c) => c.identifier,
696-
'wrapped identifier',
697-
isA<DartExceptionTypeIdentifier>(),
698-
),
699-
);
700-
701-
await Sentry.close();
669+
group('exception identifiers', () {
670+
setUp(() async {
671+
loadTestPackage();
672+
await Sentry.close();
673+
});
674+
675+
test(
676+
'should add DartExceptionTypeIdentifier and FlutterExceptionTypeIdentifier by default',
677+
() async {
678+
SentryOptions? actualOptions;
679+
await SentryFlutter.init(
680+
(options) {
681+
options.dsn = fakeDsn;
682+
options.automatedTestMode = true;
683+
actualOptions = options;
684+
},
685+
appRunner: appRunner,
686+
platformChecker: getPlatformChecker(
687+
platform: MockPlatform.android(),
688+
isWeb: true,
689+
),
690+
);
691+
692+
expect(actualOptions!.exceptionTypeIdentifiers.length, 2);
693+
// Flutter identifier should be first as it's more specific
694+
expect(
695+
actualOptions!.exceptionTypeIdentifiers.first,
696+
isA<CachingExceptionTypeIdentifier>().having(
697+
(c) => c.identifier,
698+
'wrapped identifier',
699+
isA<FlutterExceptionTypeIdentifier>(),
700+
),
701+
);
702+
expect(
703+
actualOptions!.exceptionTypeIdentifiers[1],
704+
isA<CachingExceptionTypeIdentifier>().having(
705+
(c) => c.identifier,
706+
'wrapped identifier',
707+
isA<DartExceptionTypeIdentifier>(),
708+
),
709+
);
710+
711+
await Sentry.close();
712+
});
702713
});
703714
}
704715

0 commit comments

Comments
 (0)