From 3a2b8d0aba78a77fd84f0b74bf196540f0f5080d Mon Sep 17 00:00:00 2001 From: Koji Wakamiya Date: Sun, 14 Dec 2025 12:09:38 +0900 Subject: [PATCH 1/4] chore: Integration test on Web --- .github/workflows/integration_test.yaml | 19 +++++++++++++++++++ example/integration_test/app_test.dart | 10 +++++----- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index f91633d..eeecb46 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -82,3 +82,22 @@ jobs: - name: Run Flutter Integration tests working-directory: example run: flutter test integration_test -d macos + + drive_web: + name: Web + runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + contents: read + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # v2.21.0 + with: + channel: stable + cache: true + - uses: nanasess/setup-chromedriver@5ff44aa4cd179b6eac920e1146ac199e29bbad15 # v2 + - name: Start chromedriver + run: chromedriver --port=4444 & + - name: Run Flutter Integration tests + working-directory: example + run: flutter drive --driver=test_driver/integration_test.dart --target=integration_test/app_test.dart -d web-server \ diff --git a/example/integration_test/app_test.dart b/example/integration_test/app_test.dart index 9734878..47a6340 100644 --- a/example/integration_test/app_test.dart +++ b/example/integration_test/app_test.dart @@ -2,9 +2,9 @@ import 'package:flutter/foundation.dart' show kIsWeb, defaultTargetPlatform, TargetPlatform; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:image/image.dart' as img; import 'package:integration_test/integration_test.dart'; import 'package:platform_image_converter/platform_image_converter.dart'; -import 'package:image/image.dart' as img; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); @@ -281,7 +281,7 @@ void main() { quality: 100, ), throwsA(isA()), - reason: 'WebP output is only supported on Android', + reason: 'WebP output is only supported on Android and Web.', ); } }); @@ -318,7 +318,7 @@ void main() { quality: 50, ), throwsA(isA()), - reason: 'WebP output is only supported on Android', + reason: 'WebP output is only supported on Android and Web.', ); } }, @@ -373,7 +373,7 @@ void main() { quality: 100, ), throwsA(isA()), - reason: 'WebP output is only supported on Android', + reason: 'WebP output is only supported on Android and Web.', ); } }); @@ -415,7 +415,7 @@ void main() { format: OutputFormat.webp, ), throwsA(isA()), - reason: 'WebP output should be unsupported on Web, iOS, and macOS', + reason: 'WebP output is not supported on this platform.', ); } }); From abf2abfe280638b190f641c60e3fe6416701f5ba Mon Sep 17 00:00:00 2001 From: Koji Wakamiya Date: Sun, 14 Dec 2025 12:21:44 +0900 Subject: [PATCH 2/4] chore: Modify --- .github/workflows/integration_test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index eeecb46..fb645a0 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -14,7 +14,7 @@ jobs: contents: read strategy: matrix: - api-level: [29, 35] + api-level: [29] fail-fast: false steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -46,7 +46,7 @@ jobs: contents: read strategy: matrix: - simulator: [{os: "18.6", model: "iPhone SE (3rd generation)"}, {os: "26.1", model: "iPhone SE (3rd generation)"}] + simulator: [{os: "18.6", model: "iPhone SE (3rd generation)"}] fail-fast: false steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 From 013f99e9c559890d30ff323d5a7bd30b8f1594c3 Mon Sep 17 00:00:00 2001 From: Koji Wakamiya Date: Sun, 14 Dec 2025 12:31:06 +0900 Subject: [PATCH 3/4] chore: Update integration_test.yaml --- .github/workflows/integration_test.yaml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index fb645a0..23906b7 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -8,6 +8,7 @@ on: jobs: drive_android: + name: Android runs-on: ubuntu-latest timeout-minutes: 15 permissions: @@ -41,7 +42,7 @@ jobs: drive_ios: name: iOS runs-on: macos-latest - timeout-minutes: 25 + timeout-minutes: 20 permissions: contents: read strategy: @@ -95,9 +96,10 @@ jobs: with: channel: stable cache: true - - uses: nanasess/setup-chromedriver@5ff44aa4cd179b6eac920e1146ac199e29bbad15 # v2 - - name: Start chromedriver - run: chromedriver --port=4444 & + - name: Setup chromedriver + run: | + npx @puppeteer/browsers install chromedriver@stable + chromedriver --port=4444 & - name: Run Flutter Integration tests working-directory: example run: flutter drive --driver=test_driver/integration_test.dart --target=integration_test/app_test.dart -d web-server \ From f2545558e3dee5499ee74d71c0079f11d7218363 Mon Sep 17 00:00:00 2001 From: Koji Wakamiya Date: Sun, 14 Dec 2025 12:40:15 +0900 Subject: [PATCH 4/4] refactor: Code cleanup --- example/integration_test/app_test.dart | 3 +-- example/test_driver/integration_test.dart | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/example/integration_test/app_test.dart b/example/integration_test/app_test.dart index 47a6340..c56c4e8 100644 --- a/example/integration_test/app_test.dart +++ b/example/integration_test/app_test.dart @@ -1,5 +1,4 @@ -import 'package:flutter/foundation.dart' - show kIsWeb, defaultTargetPlatform, TargetPlatform; +import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:image/image.dart' as img; diff --git a/example/test_driver/integration_test.dart b/example/test_driver/integration_test.dart index b38629c..172b4b7 100644 --- a/example/test_driver/integration_test.dart +++ b/example/test_driver/integration_test.dart @@ -1,3 +1,5 @@ import 'package:integration_test/integration_test_driver.dart'; -Future main() => integrationDriver(); +void main() async { + await integrationDriver(); +}