Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: flutter wasm #2231

Merged
merged 4 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading