diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2f0e07..10768b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,14 @@ jobs: - name: Install and start chromedriver run: | - npx --yes @puppeteer/browsers install chromedriver@stable + # `chromedriver@stable` tracks the latest ChromeDriver release, which + # can be ahead of the Chrome binary pre-installed on the runner image + # (they're updated on independent schedules). ChromeDriver refuses to + # start a session against a Chrome major version it doesn't support, + # so pin to the major version of the Chrome actually on the runner. + CHROME_VERSION=$(google-chrome --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+') + CHROME_MAJOR=${CHROME_VERSION%%.*} + npx --yes @puppeteer/browsers install chromedriver@${CHROME_MAJOR} CHROMEDRIVER=$(find "$PWD" -type f -name chromedriver | head -n 1) chmod +x "$CHROMEDRIVER" "$CHROMEDRIVER" --port=4444 & @@ -103,10 +110,17 @@ jobs: sleep 1 done + # Not --release: WidgetTester.enterText/receiveAction inject fake + # text-input platform messages tagged with a magic client id of -1. + # The framework only honors that id inside an `assert(() {...}())` + # block (flutter's services/text_input.dart), which release/profile + # builds strip entirely — so in --release the synthetic keystrokes + # this test sends are silently dropped and the todo never gets + # typed. Debug mode keeps the assert, so the test can actually + # drive the UI. - name: Run web integration tests run: | flutter drive \ --driver=test_driver/integration_test.dart \ --target=integration_test/todo_flow_test.dart \ - -d web-server \ - --release + -d web-server