Skip to content

Commit

Permalink
test: flutter wasm (#2231)
Browse files Browse the repository at this point in the history
* test: flutter wasm

* temporarily disable failing tests

* fixup ci

* cleanup
  • Loading branch information
vaind authored Aug 14, 2024
1 parent ba56a96 commit 73d70bf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
defaults:
run:
shell: bash
working-directory: flutter
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -77,21 +78,23 @@ jobs:
- run: flutter upgrade

- name: Pub Get
run: |
cd flutter
flutter pub get
run: flutter pub get

- name: Test chrome
- name: Test web (JS)
if: matrix.target == 'web'
run: |
cd flutter
flutter test --platform chrome --test-randomize-ordering-seed=random --exclude-tags canvasKit
flutter test --platform chrome --test-randomize-ordering-seed=random --tags canvasKit --web-renderer canvaskit
- name: Test web (WASM)
if: matrix.target == 'web'
run: |
flutter test --platform chrome --wasm --test-randomize-ordering-seed=random --exclude-tags canvasKit
flutter test --platform chrome --wasm --test-randomize-ordering-seed=random --tags canvasKit --web-renderer canvaskit
- name: Test VM with coverage
if: matrix.target == 'linux' || matrix.target == 'macos' || matrix.target == 'windows'
run: |
cd flutter
flutter test --coverage --test-randomize-ordering-seed=random
dart run remove_from_coverage -f coverage/lcov.info -r 'binding.dart'
Expand All @@ -111,11 +114,11 @@ jobs:
exclude: 'lib/src/native/cocoa/binding.dart'

- name: Build ${{ matrix.target }}
working-directory: flutter/example
run: |
flutter config --enable-windows-desktop
flutter config --enable-macos-desktop
flutter config --enable-linux-desktop
cd flutter/example
TARGET=${{ matrix.target }}
flutter pub get
case $TARGET in
Expand Down
8 changes: 8 additions & 0 deletions flutter/test/integrations/flutter_error_integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ void main() {
expect(event.contexts['flutter_error_details']['context'],
'thrown while handling a gesture');
expect(event.contexts['flutter_error_details']['information'], 'foo bar');
}, onPlatform: {
// TODO stacktrace parsing for wasm is not implemented yet
// https://github.com/getsentry/sentry-dart/issues/1480
'wasm': Skip('WASM stack trace parsing not implemented yet'),
});

test('captures error with long FlutterErrorDetails.information', () async {
Expand Down Expand Up @@ -115,6 +119,10 @@ void main() {
'thrown while handling a gesture');
expect(event.contexts['flutter_error_details']['information'],
'foo bar\nHello World!');
}, onPlatform: {
// TODO stacktrace parsing for wasm is not implemented yet
// https://github.com/getsentry/sentry-dart/issues/1480
'wasm': Skip('WASM stack trace parsing not implemented yet'),
});

test('captures error with no FlutterErrorDetails', () async {
Expand Down

0 comments on commit 73d70bf

Please sign in to comment.