Skip to content

Commit

Permalink
Disable canvasKit renderer tests for beta channel (#1894)
Browse files Browse the repository at this point in the history
* Disable canvasKit renderer tests for ‚beta‘ channel

* fix condition

* fix analyzer issues
  • Loading branch information
denrase authored Feb 28, 2024
1 parent 55610cd commit b0811cc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 24 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,17 @@ jobs:
cd flutter
flutter pub get
- name: Test chrome
- name: Test chrome (exclude canvasKit)
if: runner.os == 'Linux'
run: |
cd flutter
flutter test --platform chrome --test-randomize-ordering-seed=random --exclude-tags canvasKit
# TODO: Revert when canvasKit is available again in `beta` channel
- name: Test chrome (canvasKit)
if: runner.os == 'Linux' && matrix.sdk != 'beta'
run: |
cd flutter
flutter test --platform chrome --test-randomize-ordering-seed=random --tags canvasKit --web-renderer canvaskit
- name: Test VM with coverage
Expand Down
27 changes: 4 additions & 23 deletions flutter/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -478,12 +478,8 @@ class MainScaffold extends StatelessWidget {
TooltipButton(
onPressed: () async {
final id = await Sentry.captureMessage('UserFeedback');
// ignore: use_build_context_synchronously
if (!context.isMounted) {
return;
}

// ignore: use_build_context_synchronously
if (!context.mounted) return;
await showDialog(
context: context,
builder: (context) {
Expand Down Expand Up @@ -906,12 +902,7 @@ Future<void> makeWebRequest(BuildContext context) async {

await transaction.finish(status: const SpanStatus.ok());

// ignore: use_build_context_synchronously
if (!context.isMounted) {
return;
}

// ignore: use_build_context_synchronously
if (!context.mounted) return;
await showDialog<void>(
context: context,
builder: (context) {
Expand Down Expand Up @@ -957,12 +948,7 @@ Future<void> makeWebRequestWithDio(BuildContext context) async {
await span.finish();
}

// ignore: use_build_context_synchronously
if (!context.isMounted) {
return;
}

// ignore: use_build_context_synchronously
if (!context.mounted) return;
await showDialog<void>(
context: context,
builder: (context) {
Expand Down Expand Up @@ -992,12 +978,7 @@ Future<void> showDialogWithTextAndImage(BuildContext context) async {
final text =
await DefaultAssetBundle.of(context).loadString('assets/lorem-ipsum.txt');

// ignore: use_build_context_synchronously
if (!context.isMounted) {
return;
}

// ignore: use_build_context_synchronously
if (!context.mounted) return;
await showDialog<void>(
context: context,
// gets tracked if using SentryNavigatorObserver
Expand Down

0 comments on commit b0811cc

Please sign in to comment.