From e2f6c691e8257b34f4d8c008917239affff799dd Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 25 Jan 2021 10:22:36 -0800 Subject: [PATCH 01/17] Revert "Revert "[ci][image_picker]enable xcode 12/iOS 14 for all tasks except lint (#3304)" (#3459)" This reverts commit 18124285feeba5f62e2e0deafab3ef93e5895426. --- .cirrus.yml | 50 +++++++++++++------ .../image_picker/image_picker/CHANGELOG.md | 4 ++ .../ImagePickerFromGalleryUITests.m | 20 ++++++-- .../image_picker/image_picker/pubspec.yaml | 2 +- 4 files changed, 58 insertions(+), 18 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 4ec73ea3f24c..aa56ca26d82b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -117,6 +117,7 @@ task: env: INTEGRATION_TEST_PATH: "./packages/integration_test" upgrade_script: + - sudo gem install cocoapods - flutter channel stable - flutter upgrade - flutter channel master @@ -134,13 +135,14 @@ task: - xvfb-run ./script/incremental_build.sh drive-examples --linux task: + # Xcode 11 task + # TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12. # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins only_if: $CIRRUS_TAG == '' use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' osx_instance: image: catalina-xcode-11.3.1-flutter upgrade_script: - - sudo gem install cocoapods - flutter channel stable - flutter upgrade - flutter channel master @@ -151,17 +153,6 @@ task: - xcrun simctl list - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot matrix: - - name: build_all_plugins_ipa - env: - matrix: - CHANNEL: "master" - CHANNEL: "stable" - script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - - ./script/build_all_plugins_app.sh ios --no-codesign - name: lint_darwin_plugins env: matrix: @@ -173,6 +164,37 @@ task: # Skip the dummy podspecs used to placate the tool. - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm - ./script/incremental_build.sh podspecs + +task: + # Xcode 12 task + # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins + only_if: $CIRRUS_TAG == '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' + osx_instance: + image: big-sur-xcode-12.3 + upgrade_script: + - sudo gem install cocoapods + - flutter channel stable + - flutter upgrade + - flutter channel master + - flutter upgrade + - git fetch origin master + activate_script: pub global activate flutter_plugin_tools + create_simulator_script: + - xcrun simctl list + - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot + matrix: + - name: build_all_plugins_ipa + env: + matrix: + CHANNEL: "master" + CHANNEL: "stable" + script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + - ./script/build_all_plugins_app.sh ios --no-codesign - name: build-ipas+drive-examples env: PATH: $PATH:/usr/local/bin @@ -193,13 +215,13 @@ task: - flutter channel $CHANNEL - ./script/incremental_build.sh build-examples --ipa - ./script/incremental_build.sh drive-examples - - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS + - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.3" task: # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins only_if: $CIRRUS_TAG == '' use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' osx_instance: - image: catalina-xcode-11.3.1-flutter + image: big-sur-xcode-12.3 setup_script: - flutter config --enable-macos-desktop upgrade_script: diff --git a/packages/image_picker/image_picker/CHANGELOG.md b/packages/image_picker/image_picker/CHANGELOG.md index 1b3146d532fa..1a09758d13ef 100644 --- a/packages/image_picker/image_picker/CHANGELOG.md +++ b/packages/image_picker/image_picker/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.6.7+22 + +* iOS: update XCUITests to separate each test session. + ## 0.6.7+21 * Update the example app: remove the deprecated `RaisedButton` and `FlatButton` widgets. diff --git a/packages/image_picker/image_picker/example/ios/RunnerUITests/ImagePickerFromGalleryUITests.m b/packages/image_picker/image_picker/example/ios/RunnerUITests/ImagePickerFromGalleryUITests.m index 74df795a3df3..e30fabd2d071 100644 --- a/packages/image_picker/image_picker/example/ios/RunnerUITests/ImagePickerFromGalleryUITests.m +++ b/packages/image_picker/image_picker/example/ios/RunnerUITests/ImagePickerFromGalleryUITests.m @@ -16,6 +16,7 @@ @interface ImagePickerFromGalleryUITests : XCTestCase @implementation ImagePickerFromGalleryUITests - (void)setUp { + [super setUp]; // Delete the app if already exists, to test permission popups self.continueAfterFailure = NO; @@ -31,7 +32,7 @@ - (void)setUp { if (![allPhotoPermission waitForExistenceWithTimeout: kElementWaitingTime]) { os_log_error(OS_LOG_DEFAULT, "%@", - self.app.debugDescription); + weakSelf.app.debugDescription); XCTFail(@"Failed due to not able to find " @"allPhotoPermission button with %@ seconds", @(kElementWaitingTime)); @@ -42,7 +43,7 @@ - (void)setUp { if (![ok waitForExistenceWithTimeout: kElementWaitingTime]) { os_log_error(OS_LOG_DEFAULT, "%@", - self.app.debugDescription); + weakSelf.app.debugDescription); XCTFail(@"Failed due to not able to find ok button " @"with %@ seconds", @(kElementWaitingTime)); @@ -53,11 +54,19 @@ - (void)setUp { }]; } +- (void)tearDown { + [super tearDown]; + [self.app terminate]; +} + - (void)testPickingFromGallery { - [self launchPickerAndCancel]; [self launchPickerAndPick]; } +- (void)testCancel { + [self launchPickerAndCancel]; +} + - (void)launchPickerAndCancel { // Find and tap on the pick from gallery button. NSPredicate* predicateToFindImageFromGalleryButton = @@ -160,6 +169,10 @@ - (void)launchPickerAndPick { XCTAssertTrue(pickButton.exists); [pickButton tap]; + // There is a known bug where the permission popups interruption won't get fired until a tap + // happened in the app. We expect a permission popup so we do a tap here. + [self.app tap]; + // Find an image and tap on it. (IOS 14 UI, images are showing directly) XCUIElement* aImage; if (@available(iOS 14, *)) { @@ -177,6 +190,7 @@ - (void)launchPickerAndPick { identifier:@"PhotosGridView"] .cells.firstMatch; } + os_log_error(OS_LOG_DEFAULT, "description before picking image %@", self.app.debugDescription); if (![aImage waitForExistenceWithTimeout:kElementWaitingTime]) { os_log_error(OS_LOG_DEFAULT, "%@", self.app.debugDescription); XCTFail(@"Failed due to not able to find an image with %@ seconds", @(kElementWaitingTime)); diff --git a/packages/image_picker/image_picker/pubspec.yaml b/packages/image_picker/image_picker/pubspec.yaml index 789ca13d5bcb..075c90627bf4 100755 --- a/packages/image_picker/image_picker/pubspec.yaml +++ b/packages/image_picker/image_picker/pubspec.yaml @@ -2,7 +2,7 @@ name: image_picker description: Flutter plugin for selecting images from the Android and iOS image library, and taking new pictures with the camera. homepage: https://github.com/flutter/plugins/tree/master/packages/image_picker/image_picker -version: 0.6.7+21 +version: 0.6.7+22 flutter: plugin: From d685d446dcbaf5b2021661c4dd2e66d4d0115b7e Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 25 Jan 2021 10:29:09 -0800 Subject: [PATCH 02/17] try xcode 12 --- .cirrus.yml | 278 +++++++++--------- .../webview_flutter_test.dart | 2 +- script/incremental_build.sh | 34 +-- 3 files changed, 157 insertions(+), 157 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index aa56ca26d82b..a0e84e82451b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,110 +1,110 @@ -task: - # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG == '' - use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' - container: - dockerfile: .ci/Dockerfile - cpu: 8 - memory: 16G - env: - INTEGRATION_TEST_PATH: "./packages/integration_test" - upgrade_script: - - flutter channel stable - - flutter upgrade - - flutter channel master - - flutter upgrade - - git fetch origin master - activate_script: pub global activate flutter_plugin_tools - matrix: - - name: publishable - script: - - flutter channel master - - ./script/check_publish.sh - - name: format - install_script: - - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - - sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" - - sudo apt-get update - - sudo apt-get install -y --allow-unauthenticated clang-format-7 - format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7 - - name: test - env: - matrix: - CHANNEL: "master" - CHANNEL: "stable" - test_script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - - ./script/incremental_build.sh test - - name: analyze - env: - matrix: - CHANNEL: "master" - CHANNEL: "stable" - script: ./script/incremental_build.sh analyze - - name: build_all_plugins_apk - env: - matrix: - CHANNEL: "master" - CHANNEL: "stable" - script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - - ./script/build_all_plugins_app.sh apk - - name: integration_web_smoke_test - # Tests integration example test in web. - only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" - install_script: - - flutter config --enable-web - - git clone https://github.com/flutter/web_installers.git - - cd web_installers/packages/web_drivers/ - - pub get - - dart lib/web_driver_installer.dart chromedriver --install-only - - ./chromedriver/chromedriver --port=4444 & - test_script: - - cd $INTEGRATION_TEST_PATH/example/ - - flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome - - name: build-apks+java-test+firebase-test-lab - env: - matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" - matrix: - CHANNEL: "master" - CHANNEL: "stable" - MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] - GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] - script: - # TODO(jackson): Allow web plugins once supported on stable - # https://github.com/flutter/flutter/issues/42864 - - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi - - flutter channel $CHANNEL - # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they - # might include non-ASCII characters which makes Gradle crash. - # See: https://github.com/flutter/flutter/issues/24935 - # This is a temporary workaround until we figure how to properly configure - # a UTF8 locale on Cirrus (or until the Gradle bug is fixed). - # TODO(amirh): Set the locale to UTF8. - - echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt - - echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt - - export CIRRUS_CHANGE_MESSAGE="" - - export CIRRUS_COMMIT_MESSAGE="" - - ./script/incremental_build.sh build-examples --apk - - ./script/incremental_build.sh java-test # must come after apk build - - if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then - - echo "This user does not have permission to run Firebase Test Lab tests." - - else - - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json - - ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 - - fi - - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` - - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` +# task: +# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins +# only_if: $CIRRUS_TAG == '' +# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' +# container: +# dockerfile: .ci/Dockerfile +# cpu: 8 +# memory: 16G +# env: +# INTEGRATION_TEST_PATH: "./packages/integration_test" +# upgrade_script: +# - flutter channel stable +# - flutter upgrade +# - flutter channel master +# - flutter upgrade +# - git fetch origin master +# activate_script: pub global activate flutter_plugin_tools +# matrix: +# - name: publishable +# script: +# - flutter channel master +# - ./script/check_publish.sh +# - name: format +# install_script: +# - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - +# - sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" +# - sudo apt-get update +# - sudo apt-get install -y --allow-unauthenticated clang-format-7 +# format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7 +# - name: test +# env: +# matrix: +# CHANNEL: "master" +# CHANNEL: "stable" +# test_script: +# # TODO(jackson): Allow web plugins once supported on stable +# # https://github.com/flutter/flutter/issues/42864 +# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi +# - flutter channel $CHANNEL +# - ./script/incremental_build.sh test +# - name: analyze +# env: +# matrix: +# CHANNEL: "master" +# CHANNEL: "stable" +# script: ./script/incremental_build.sh analyze +# - name: build_all_plugins_apk +# env: +# matrix: +# CHANNEL: "master" +# CHANNEL: "stable" +# script: +# # TODO(jackson): Allow web plugins once supported on stable +# # https://github.com/flutter/flutter/issues/42864 +# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi +# - flutter channel $CHANNEL +# - ./script/build_all_plugins_app.sh apk +# - name: integration_web_smoke_test +# # Tests integration example test in web. +# only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" +# install_script: +# - flutter config --enable-web +# - git clone https://github.com/flutter/web_installers.git +# - cd web_installers/packages/web_drivers/ +# - pub get +# - dart lib/web_driver_installer.dart chromedriver --install-only +# - ./chromedriver/chromedriver --port=4444 & +# test_script: +# - cd $INTEGRATION_TEST_PATH/example/ +# - flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome +# - name: build-apks+java-test+firebase-test-lab +# env: +# matrix: +# PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" +# PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" +# PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" +# PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" +# matrix: +# CHANNEL: "master" +# CHANNEL: "stable" +# MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] +# GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] +# script: +# # TODO(jackson): Allow web plugins once supported on stable +# # https://github.com/flutter/flutter/issues/42864 +# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi +# - flutter channel $CHANNEL +# # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they +# # might include non-ASCII characters which makes Gradle crash. +# # See: https://github.com/flutter/flutter/issues/24935 +# # This is a temporary workaround until we figure how to properly configure +# # a UTF8 locale on Cirrus (or until the Gradle bug is fixed). +# # TODO(amirh): Set the locale to UTF8. +# - echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt +# - echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt +# - export CIRRUS_CHANGE_MESSAGE="" +# - export CIRRUS_COMMIT_MESSAGE="" +# - ./script/incremental_build.sh build-examples --apk +# - ./script/incremental_build.sh java-test # must come after apk build +# - if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then +# - echo "This user does not have permission to run Firebase Test Lab tests." +# - else +# - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json +# - ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 +# - fi +# - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` +# - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` task: # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins @@ -133,38 +133,6 @@ task: - flutter channel master - ./script/incremental_build.sh build-examples --linux - xvfb-run ./script/incremental_build.sh drive-examples --linux - -task: - # Xcode 11 task - # TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12. - # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG == '' - use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' - osx_instance: - image: catalina-xcode-11.3.1-flutter - upgrade_script: - - flutter channel stable - - flutter upgrade - - flutter channel master - - flutter upgrade - - git fetch origin master - activate_script: pub global activate flutter_plugin_tools - create_simulator_script: - - xcrun simctl list - - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot - matrix: - - name: lint_darwin_plugins - env: - matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" - script: - # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. - - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm - # Skip the dummy podspecs used to placate the tool. - - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm - - ./script/incremental_build.sh podspecs - task: # Xcode 12 task # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins @@ -216,6 +184,38 @@ task: - ./script/incremental_build.sh build-examples --ipa - ./script/incremental_build.sh drive-examples - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.3" + +task: + # Xcode 11 task + # TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12. + # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins + only_if: $CIRRUS_TAG == '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' + osx_instance: + image: catalina-xcode-11.3.1-flutter + upgrade_script: + - flutter channel stable + - flutter upgrade + - flutter channel master + - flutter upgrade + - git fetch origin master + activate_script: pub global activate flutter_plugin_tools + create_simulator_script: + - xcrun simctl list + - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot + matrix: + - name: lint_darwin_plugins + env: + matrix: + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" + script: + # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. + - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm + # Skip the dummy podspecs used to placate the tool. + - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm + - ./script/incremental_build.sh podspecs + task: # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins only_if: $CIRRUS_TAG == '' diff --git a/packages/webview_flutter/example/integration_test/webview_flutter_test.dart b/packages/webview_flutter/example/integration_test/webview_flutter_test.dart index 5f39cc3d86d2..978e5429d7be 100644 --- a/packages/webview_flutter/example/integration_test/webview_flutter_test.dart +++ b/packages/webview_flutter/example/integration_test/webview_flutter_test.dart @@ -144,7 +144,7 @@ void main() { await pageLoaded.future; expect(messagesReceived, isEmpty); - await controller.evaluateJavascript('Echo.postMessage("hello");'); + await controller.evaluateJavascript('Echo.postMessage("hello");1;'); expect(messagesReceived, equals(['hello'])); }); diff --git a/script/incremental_build.sh b/script/incremental_build.sh index 3911f0a6e9c8..1acda101b6c6 100755 --- a/script/incremental_build.sh +++ b/script/incremental_build.sh @@ -47,22 +47,22 @@ BRANCH_NAME="${BRANCH_NAME:-"$(git rev-parse --abbrev-ref HEAD)"}" # otherwise it gets treated as a single argument. PLUGIN_SHARDING=($PLUGIN_SHARDING) -if [[ "${BRANCH_NAME}" == "master" ]]; then +# if [[ "${BRANCH_NAME}" == "master" ]]; then echo "Running for all packages" - (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) -else - # Sets CHANGED_PACKAGES - check_changed_packages + (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" ${PLUGIN_SHARDING[@]}) +# else +# # Sets CHANGED_PACKAGES +# check_changed_packages - if [[ "$CHANGED_PACKAGES" == "" ]]; then - echo "No changes detected in packages." - echo "Running for all packages" - (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) - else - echo running "${ACTIONS[@]}" - (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) - echo "Running version check for changed packages" - # TODO(egarciad): Enable this check once in master. - # (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools version-check --base_sha="$(get_branch_base_sha)") - fi -fi +# if [[ "$CHANGED_PACKAGES" == "" ]]; then +# echo "No changes detected in packages." +# echo "Running for all packages" +# (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) +# else +# echo running "${ACTIONS[@]}" +# (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) +# echo "Running version check for changed packages" +# # TODO(egarciad): Enable this check once in master. +# # (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools version-check --base_sha="$(get_branch_base_sha)") +# fi +# fi From 5bd22d30d9908c63a571ad79baf324a65401ef57 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 25 Jan 2021 10:32:14 -0800 Subject: [PATCH 03/17] add todo message --- .../example/integration_test/webview_flutter_test.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/webview_flutter/example/integration_test/webview_flutter_test.dart b/packages/webview_flutter/example/integration_test/webview_flutter_test.dart index 978e5429d7be..50af77fe6c6e 100644 --- a/packages/webview_flutter/example/integration_test/webview_flutter_test.dart +++ b/packages/webview_flutter/example/integration_test/webview_flutter_test.dart @@ -144,6 +144,10 @@ void main() { await pageLoaded.future; expect(messagesReceived, isEmpty); + // Append a return value "1" in the end will prevent an iOS platform exception. + // See: https://github.com/flutter/flutter/issues/66318#issuecomment-701105380 + // TODO(cyanglaz): remove the workaround "1" in the end when the below issue is fixed. + // https://github.com/flutter/flutter/issues/66318 await controller.evaluateJavascript('Echo.postMessage("hello");1;'); expect(messagesReceived, equals(['hello'])); }); From e724a9c63f46cbeadd892295c83b65574a2b5c59 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 25 Jan 2021 10:34:34 -0800 Subject: [PATCH 04/17] fix sudo gem install cocoapods --- .cirrus.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index a0e84e82451b..6160d6216101 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -117,7 +117,6 @@ task: env: INTEGRATION_TEST_PATH: "./packages/integration_test" upgrade_script: - - sudo gem install cocoapods - flutter channel stable - flutter upgrade - flutter channel master @@ -133,6 +132,7 @@ task: - flutter channel master - ./script/incremental_build.sh build-examples --linux - xvfb-run ./script/incremental_build.sh drive-examples --linux + task: # Xcode 12 task # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins @@ -194,6 +194,7 @@ task: osx_instance: image: catalina-xcode-11.3.1-flutter upgrade_script: + - sudo gem install cocoapods - flutter channel stable - flutter upgrade - flutter channel master From ffc6bbeaffca2e9c8ae8bd8b6fdd0fc25b6fea55 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 25 Jan 2021 10:52:06 -0800 Subject: [PATCH 05/17] only test all on master --- .cirrus.yml | 114 ++++++++++++++++++++++++++-------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 6160d6216101..c7e9fb2e94cb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -185,61 +185,61 @@ task: - ./script/incremental_build.sh drive-examples - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.3" -task: - # Xcode 11 task - # TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12. - # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG == '' - use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' - osx_instance: - image: catalina-xcode-11.3.1-flutter - upgrade_script: - - sudo gem install cocoapods - - flutter channel stable - - flutter upgrade - - flutter channel master - - flutter upgrade - - git fetch origin master - activate_script: pub global activate flutter_plugin_tools - create_simulator_script: - - xcrun simctl list - - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot - matrix: - - name: lint_darwin_plugins - env: - matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" - script: - # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. - - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm - # Skip the dummy podspecs used to placate the tool. - - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm - - ./script/incremental_build.sh podspecs +# task: +# # Xcode 11 task +# # TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12. +# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins +# only_if: $CIRRUS_TAG == '' +# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' +# osx_instance: +# image: catalina-xcode-11.3.1-flutter +# upgrade_script: +# - sudo gem install cocoapods +# - flutter channel stable +# - flutter upgrade +# - flutter channel master +# - flutter upgrade +# - git fetch origin master +# activate_script: pub global activate flutter_plugin_tools +# create_simulator_script: +# - xcrun simctl list +# - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot +# matrix: +# - name: lint_darwin_plugins +# env: +# matrix: +# PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" +# PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" +# script: +# # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. +# - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm +# # Skip the dummy podspecs used to placate the tool. +# - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm +# - ./script/incremental_build.sh podspecs -task: - # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins - only_if: $CIRRUS_TAG == '' - use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' - osx_instance: - image: big-sur-xcode-12.3 - setup_script: - - flutter config --enable-macos-desktop - upgrade_script: - - sudo gem install cocoapods - - flutter channel master - - flutter upgrade - - git fetch origin master - activate_script: pub global activate flutter_plugin_tools - matrix: - - name: build_all_plugins_app - script: - - flutter channel master - - ./script/build_all_plugins_app.sh macos - - name: build-apps+drive-examples - env: - PATH: $PATH:/usr/local/bin - build_script: - - flutter channel master - - ./script/incremental_build.sh build-examples --macos --no-ipa - - ./script/incremental_build.sh drive-examples --macos +# task: +# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins +# only_if: $CIRRUS_TAG == '' +# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' +# osx_instance: +# image: big-sur-xcode-12.3 +# setup_script: +# - flutter config --enable-macos-desktop +# upgrade_script: +# - sudo gem install cocoapods +# - flutter channel master +# - flutter upgrade +# - git fetch origin master +# activate_script: pub global activate flutter_plugin_tools +# matrix: +# - name: build_all_plugins_app +# script: +# - flutter channel master +# - ./script/build_all_plugins_app.sh macos +# - name: build-apps+drive-examples +# env: +# PATH: $PATH:/usr/local/bin +# build_script: +# - flutter channel master +# - ./script/incremental_build.sh build-examples --macos --no-ipa +# - ./script/incremental_build.sh drive-examples --macos From 4cf6e7c53a6640e09515ef18fc191fa6b11b42ab Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 25 Jan 2021 11:02:40 -0800 Subject: [PATCH 06/17] remove stable comment --- script/incremental_build.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/script/incremental_build.sh b/script/incremental_build.sh index 1acda101b6c6..3a23007c95f2 100755 --- a/script/incremental_build.sh +++ b/script/incremental_build.sh @@ -47,22 +47,22 @@ BRANCH_NAME="${BRANCH_NAME:-"$(git rev-parse --abbrev-ref HEAD)"}" # otherwise it gets treated as a single argument. PLUGIN_SHARDING=($PLUGIN_SHARDING) -# if [[ "${BRANCH_NAME}" == "master" ]]; then +if [[ "${BRANCH_NAME}" == "master" ]]; then echo "Running for all packages" (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" ${PLUGIN_SHARDING[@]}) -# else -# # Sets CHANGED_PACKAGES -# check_changed_packages +else + # Sets CHANGED_PACKAGES + check_changed_packages -# if [[ "$CHANGED_PACKAGES" == "" ]]; then -# echo "No changes detected in packages." -# echo "Running for all packages" -# (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) -# else -# echo running "${ACTIONS[@]}" -# (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) -# echo "Running version check for changed packages" -# # TODO(egarciad): Enable this check once in master. -# # (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools version-check --base_sha="$(get_branch_base_sha)") -# fi -# fi + if [[ "$CHANGED_PACKAGES" == "" ]]; then + echo "No changes detected in packages." + echo "Running for all packages" + (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) + else + echo running "${ACTIONS[@]}" + (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) + echo "Running version check for changed packages" + # TODO(egarciad): Enable this check once in master. + # (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools version-check --base_sha="$(get_branch_base_sha)") + fi +fi From 72d67c036af72f72484b0594c90765f66371dbae Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 25 Jan 2021 11:20:04 -0800 Subject: [PATCH 07/17] one shard for easy debugging --- .cirrus.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index c7e9fb2e94cb..6d44566275ef 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -168,10 +168,10 @@ task: PATH: $PATH:/usr/local/bin PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera/camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter" matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 1" + # PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + # PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + # PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" matrix: CHANNEL: "master" CHANNEL: "stable" From c8d3cdc939e8911007ba9186a53ea57a80fd62f5 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 25 Jan 2021 11:56:58 -0800 Subject: [PATCH 08/17] running for all pacakges --- script/incremental_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/incremental_build.sh b/script/incremental_build.sh index 3a23007c95f2..ec2155a98802 100755 --- a/script/incremental_build.sh +++ b/script/incremental_build.sh @@ -60,7 +60,7 @@ else (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) else echo running "${ACTIONS[@]}" - (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) + (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) echo "Running version check for changed packages" # TODO(egarciad): Enable this check once in master. # (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools version-check --base_sha="$(get_branch_base_sha)") From 1bb0fbbae60f7150becca316fbc3bd74c4cd6d98 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 25 Jan 2021 13:16:06 -0800 Subject: [PATCH 09/17] emtpy changed package list --- script/common.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/script/common.sh b/script/common.sh index 7950a3ea71cd..dfc1407597f0 100644 --- a/script/common.sh +++ b/script/common.sh @@ -26,22 +26,22 @@ function check_changed_packages() { CHANGED_PACKAGES="" CHANGED_PACKAGE_LIST=() - # Filter out packages that have been deleted. - for package in "${packages[@]}"; do - if [ -d "$REPO_DIR/packages/$package" ]; then - CHANGED_PACKAGES="${CHANGED_PACKAGES},$package" - CHANGED_PACKAGE_LIST=("${CHANGED_PACKAGE_LIST[@]}" "$package") - fi - done + # # Filter out packages that have been deleted. + # for package in "${packages[@]}"; do + # if [ -d "$REPO_DIR/packages/$package" ]; then + # CHANGED_PACKAGES="${CHANGED_PACKAGES},$package" + # CHANGED_PACKAGE_LIST=("${CHANGED_PACKAGE_LIST[@]}" "$package") + # fi + # done - if [[ "${#CHANGED_PACKAGE_LIST[@]}" == 0 ]]; then - echo "No changes detected in packages." - else - echo "Detected changes in the following ${#CHANGED_PACKAGE_LIST[@]} package(s):" - for package in "${CHANGED_PACKAGE_LIST[@]}"; do - echo "$package" - done - echo "" - fi + # if [[ "${#CHANGED_PACKAGE_LIST[@]}" == 0 ]]; then + # echo "No changes detected in packages." + # else + # echo "Detected changes in the following ${#CHANGED_PACKAGE_LIST[@]} package(s):" + # for package in "${CHANGED_PACKAGE_LIST[@]}"; do + # echo "$package" + # done + # echo "" + # fi return 0 } From 8518abf0c1f6aa5cd186b9584501e3d8a96f3e80 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Mon, 25 Jan 2021 13:17:42 -0800 Subject: [PATCH 10/17] upate test --- .../example/integration_test/webview_flutter_test.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/webview_flutter/example/integration_test/webview_flutter_test.dart b/packages/webview_flutter/example/integration_test/webview_flutter_test.dart index 50af77fe6c6e..6c96b519d6fb 100644 --- a/packages/webview_flutter/example/integration_test/webview_flutter_test.dart +++ b/packages/webview_flutter/example/integration_test/webview_flutter_test.dart @@ -887,6 +887,7 @@ void main() { const int Y_SCROLL = 321; await controller.scrollTo(X_SCROLL, Y_SCROLL); + await tester.pumpAndSettle(Duration(seconds: 3)); int scrollPosX = await controller.getScrollX(); int scrollPosY = await controller.getScrollY(); expect(X_SCROLL, scrollPosX); @@ -894,6 +895,7 @@ void main() { // Check scrollBy() (on top of scrollTo()) await controller.scrollBy(X_SCROLL, Y_SCROLL); + await tester.pumpAndSettle(Duration(seconds: 3)); scrollPosX = await controller.getScrollX(); scrollPosY = await controller.getScrollY(); expect(X_SCROLL * 2, scrollPosX); From 621da6080e894a4427a47cfd14fe2ab5c7fa4b85 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 26 Jan 2021 10:06:54 -0800 Subject: [PATCH 11/17] bring back shards to prevent timeout --- .cirrus.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 6d44566275ef..c7e9fb2e94cb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -168,10 +168,10 @@ task: PATH: $PATH:/usr/local/bin PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera/camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter" matrix: - PLUGIN_SHARDING: "--shardIndex 0 --shardCount 1" - # PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" - # PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" - # PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" matrix: CHANNEL: "master" CHANNEL: "stable" From e86020dc7ea47068109f474679f87cc6b4dbd3ef Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 26 Jan 2021 10:26:36 -0800 Subject: [PATCH 12/17] running all --- script/incremental_build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/incremental_build.sh b/script/incremental_build.sh index ec2155a98802..3911f0a6e9c8 100755 --- a/script/incremental_build.sh +++ b/script/incremental_build.sh @@ -49,7 +49,7 @@ PLUGIN_SHARDING=($PLUGIN_SHARDING) if [[ "${BRANCH_NAME}" == "master" ]]; then echo "Running for all packages" - (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" ${PLUGIN_SHARDING[@]}) + (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) else # Sets CHANGED_PACKAGES check_changed_packages @@ -60,7 +60,7 @@ else (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) else echo running "${ACTIONS[@]}" - (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) + (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) echo "Running version check for changed packages" # TODO(egarciad): Enable this check once in master. # (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools version-check --base_sha="$(get_branch_base_sha)") From bee2693cb3094d8d1be604e9aa2f298f635bd896 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 26 Jan 2021 10:47:34 -0800 Subject: [PATCH 13/17] revert testing code and update version --- .cirrus.yml | 328 +++++++++++++------------- packages/webview_flutter/CHANGELOG.md | 4 + packages/webview_flutter/pubspec.yaml | 2 +- script/common.sh | 32 +-- script/incremental_build.sh | 2 +- 5 files changed, 186 insertions(+), 182 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index c7e9fb2e94cb..461528a6b194 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,110 +1,110 @@ -# task: -# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins -# only_if: $CIRRUS_TAG == '' -# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' -# container: -# dockerfile: .ci/Dockerfile -# cpu: 8 -# memory: 16G -# env: -# INTEGRATION_TEST_PATH: "./packages/integration_test" -# upgrade_script: -# - flutter channel stable -# - flutter upgrade -# - flutter channel master -# - flutter upgrade -# - git fetch origin master -# activate_script: pub global activate flutter_plugin_tools -# matrix: -# - name: publishable -# script: -# - flutter channel master -# - ./script/check_publish.sh -# - name: format -# install_script: -# - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - -# - sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" -# - sudo apt-get update -# - sudo apt-get install -y --allow-unauthenticated clang-format-7 -# format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7 -# - name: test -# env: -# matrix: -# CHANNEL: "master" -# CHANNEL: "stable" -# test_script: -# # TODO(jackson): Allow web plugins once supported on stable -# # https://github.com/flutter/flutter/issues/42864 -# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi -# - flutter channel $CHANNEL -# - ./script/incremental_build.sh test -# - name: analyze -# env: -# matrix: -# CHANNEL: "master" -# CHANNEL: "stable" -# script: ./script/incremental_build.sh analyze -# - name: build_all_plugins_apk -# env: -# matrix: -# CHANNEL: "master" -# CHANNEL: "stable" -# script: -# # TODO(jackson): Allow web plugins once supported on stable -# # https://github.com/flutter/flutter/issues/42864 -# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi -# - flutter channel $CHANNEL -# - ./script/build_all_plugins_app.sh apk -# - name: integration_web_smoke_test -# # Tests integration example test in web. -# only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" -# install_script: -# - flutter config --enable-web -# - git clone https://github.com/flutter/web_installers.git -# - cd web_installers/packages/web_drivers/ -# - pub get -# - dart lib/web_driver_installer.dart chromedriver --install-only -# - ./chromedriver/chromedriver --port=4444 & -# test_script: -# - cd $INTEGRATION_TEST_PATH/example/ -# - flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome -# - name: build-apks+java-test+firebase-test-lab -# env: -# matrix: -# PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" -# PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" -# PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" -# PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" -# matrix: -# CHANNEL: "master" -# CHANNEL: "stable" -# MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] -# GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] -# script: -# # TODO(jackson): Allow web plugins once supported on stable -# # https://github.com/flutter/flutter/issues/42864 -# - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi -# - flutter channel $CHANNEL -# # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they -# # might include non-ASCII characters which makes Gradle crash. -# # See: https://github.com/flutter/flutter/issues/24935 -# # This is a temporary workaround until we figure how to properly configure -# # a UTF8 locale on Cirrus (or until the Gradle bug is fixed). -# # TODO(amirh): Set the locale to UTF8. -# - echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt -# - echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt -# - export CIRRUS_CHANGE_MESSAGE="" -# - export CIRRUS_COMMIT_MESSAGE="" -# - ./script/incremental_build.sh build-examples --apk -# - ./script/incremental_build.sh java-test # must come after apk build -# - if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then -# - echo "This user does not have permission to run Firebase Test Lab tests." -# - else -# - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json -# - ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 -# - fi -# - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` -# - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` +task: + # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins + only_if: $CIRRUS_TAG == '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_PR == '' + container: + dockerfile: .ci/Dockerfile + cpu: 8 + memory: 16G + env: + INTEGRATION_TEST_PATH: "./packages/integration_test" + upgrade_script: + - flutter channel stable + - flutter upgrade + - flutter channel master + - flutter upgrade + - git fetch origin master + activate_script: pub global activate flutter_plugin_tools + matrix: + - name: publishable + script: + - flutter channel master + - ./script/check_publish.sh + - name: format + install_script: + - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + - sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" + - sudo apt-get update + - sudo apt-get install -y --allow-unauthenticated clang-format-7 + format_script: ./script/incremental_build.sh format --travis --clang-format=clang-format-7 + - name: test + env: + matrix: + CHANNEL: "master" + CHANNEL: "stable" + test_script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + - ./script/incremental_build.sh test + - name: analyze + env: + matrix: + CHANNEL: "master" + CHANNEL: "stable" + script: ./script/incremental_build.sh analyze + - name: build_all_plugins_apk + env: + matrix: + CHANNEL: "master" + CHANNEL: "stable" + script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + - ./script/build_all_plugins_app.sh apk + - name: integration_web_smoke_test + # Tests integration example test in web. + only_if: "changesInclude('.cirrus.yml', 'packages/integration_test/**') || $CIRRUS_PR == ''" + install_script: + - flutter config --enable-web + - git clone https://github.com/flutter/web_installers.git + - cd web_installers/packages/web_drivers/ + - pub get + - dart lib/web_driver_installer.dart chromedriver --install-only + - ./chromedriver/chromedriver --port=4444 & + test_script: + - cd $INTEGRATION_TEST_PATH/example/ + - flutter drive -v --driver=test_driver/integration_test.dart --target=integration_test/example_test.dart -d web-server --release --browser-name=chrome + - name: build-apks+java-test+firebase-test-lab + env: + matrix: + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4" + PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4" + matrix: + CHANNEL: "master" + CHANNEL: "stable" + MAPS_API_KEY: ENCRYPTED[596a9f6bca436694625ac50851dc5da6b4d34cba8025f7db5bc9465142e8cd44e15f69e3507787753accebfc4910d550] + GCLOUD_FIREBASE_TESTLAB_KEY: ENCRYPTED[07586610af1fdfc894e5969f70ef2458341b9b7e9c3b7c4225a663b4a48732b7208a4d91c3b7d45305a6b55fa2a37fc4] + script: + # TODO(jackson): Allow web plugins once supported on stable + # https://github.com/flutter/flutter/issues/42864 + - if [[ "$CHANNEL" -eq "stable" ]]; then find . | grep _web$ | xargs rm -rf; fi + - flutter channel $CHANNEL + # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they + # might include non-ASCII characters which makes Gradle crash. + # See: https://github.com/flutter/flutter/issues/24935 + # This is a temporary workaround until we figure how to properly configure + # a UTF8 locale on Cirrus (or until the Gradle bug is fixed). + # TODO(amirh): Set the locale to UTF8. + - echo "$CIRRUS_CHANGE_MESSAGE" > /tmp/cirrus_change_message.txt + - echo "$CIRRUS_COMMIT_MESSAGE" > /tmp/cirrus_commit_message.txt + - export CIRRUS_CHANGE_MESSAGE="" + - export CIRRUS_COMMIT_MESSAGE="" + - ./script/incremental_build.sh build-examples --apk + - ./script/incremental_build.sh java-test # must come after apk build + - if [[ $GCLOUD_FIREBASE_TESTLAB_KEY == ENCRYPTED* ]]; then + - echo "This user does not have permission to run Firebase Test Lab tests." + - else + - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json + - ./script/incremental_build.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 + - fi + - export CIRRUS_CHANGE_MESSAGE=`cat /tmp/cirrus_change_message.txt` + - export CIRRUS_COMMIT_MESSAGE=`cat /tmp/cirrus_commit_message.txt` task: # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins @@ -185,61 +185,61 @@ task: - ./script/incremental_build.sh drive-examples - ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=14.3" -# task: -# # Xcode 11 task -# # TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12. -# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins -# only_if: $CIRRUS_TAG == '' -# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' -# osx_instance: -# image: catalina-xcode-11.3.1-flutter -# upgrade_script: -# - sudo gem install cocoapods -# - flutter channel stable -# - flutter upgrade -# - flutter channel master -# - flutter upgrade -# - git fetch origin master -# activate_script: pub global activate flutter_plugin_tools -# create_simulator_script: -# - xcrun simctl list -# - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot -# matrix: -# - name: lint_darwin_plugins -# env: -# matrix: -# PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" -# PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" -# script: -# # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. -# - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm -# # Skip the dummy podspecs used to placate the tool. -# - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm -# - ./script/incremental_build.sh podspecs +task: + # Xcode 11 task + # TODO(cyanglaz): merge Xcode 11 task to Xcode 12 task when all the matrix can be run in Xcode 12. + # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins + only_if: $CIRRUS_TAG == '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' + osx_instance: + image: catalina-xcode-11.3.1-flutter + upgrade_script: + - sudo gem install cocoapods + - flutter channel stable + - flutter upgrade + - flutter channel master + - flutter upgrade + - git fetch origin master + activate_script: pub global activate flutter_plugin_tools + create_simulator_script: + - xcrun simctl list + - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot + matrix: + - name: lint_darwin_plugins + env: + matrix: + PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2" + PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2" + script: + # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation. + - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm + # Skip the dummy podspecs used to placate the tool. + - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm + - ./script/incremental_build.sh podspecs -# task: -# # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins -# only_if: $CIRRUS_TAG == '' -# use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' -# osx_instance: -# image: big-sur-xcode-12.3 -# setup_script: -# - flutter config --enable-macos-desktop -# upgrade_script: -# - sudo gem install cocoapods -# - flutter channel master -# - flutter upgrade -# - git fetch origin master -# activate_script: pub global activate flutter_plugin_tools -# matrix: -# - name: build_all_plugins_app -# script: -# - flutter channel master -# - ./script/build_all_plugins_app.sh macos -# - name: build-apps+drive-examples -# env: -# PATH: $PATH:/usr/local/bin -# build_script: -# - flutter channel master -# - ./script/incremental_build.sh build-examples --macos --no-ipa -# - ./script/incremental_build.sh drive-examples --macos +task: + # don't run on release tags since it creates O(n^2) tasks where n is the number of plugins + only_if: $CIRRUS_TAG == '' + use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true' + osx_instance: + image: big-sur-xcode-12.3 + setup_script: + - flutter config --enable-macos-desktop + upgrade_script: + - sudo gem install cocoapods + - flutter channel master + - flutter upgrade + - git fetch origin master + activate_script: pub global activate flutter_plugin_tools + matrix: + - name: build_all_plugins_app + script: + - flutter channel master + - ./script/build_all_plugins_app.sh macos + - name: build-apps+drive-examples + env: + PATH: $PATH:/usr/local/bin + build_script: + - flutter channel master + - ./script/incremental_build.sh build-examples --macos --no-ipa + - ./script/incremental_build.sh drive-examples --macos diff --git a/packages/webview_flutter/CHANGELOG.md b/packages/webview_flutter/CHANGELOG.md index 867ea1757985..9c54b4cc207d 100644 --- a/packages/webview_flutter/CHANGELOG.md +++ b/packages/webview_flutter/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.0-nullsafety.4 + +* Update integration test to workaround an iOS 14 issue with `evaluateJavascript`. + ## 2.0.0-nullsafety.3 * Fix `onWebResourceError` on iOS. diff --git a/packages/webview_flutter/pubspec.yaml b/packages/webview_flutter/pubspec.yaml index 8bdd790e5e36..11769acce2ba 100644 --- a/packages/webview_flutter/pubspec.yaml +++ b/packages/webview_flutter/pubspec.yaml @@ -1,6 +1,6 @@ name: webview_flutter description: A Flutter plugin that provides a WebView widget on Android and iOS. -version: 2.0.0-nullsafety.3 +version: 2.0.0-nullsafety.4 homepage: https://github.com/flutter/plugins/tree/master/packages/webview_flutter environment: diff --git a/script/common.sh b/script/common.sh index dfc1407597f0..7950a3ea71cd 100644 --- a/script/common.sh +++ b/script/common.sh @@ -26,22 +26,22 @@ function check_changed_packages() { CHANGED_PACKAGES="" CHANGED_PACKAGE_LIST=() - # # Filter out packages that have been deleted. - # for package in "${packages[@]}"; do - # if [ -d "$REPO_DIR/packages/$package" ]; then - # CHANGED_PACKAGES="${CHANGED_PACKAGES},$package" - # CHANGED_PACKAGE_LIST=("${CHANGED_PACKAGE_LIST[@]}" "$package") - # fi - # done + # Filter out packages that have been deleted. + for package in "${packages[@]}"; do + if [ -d "$REPO_DIR/packages/$package" ]; then + CHANGED_PACKAGES="${CHANGED_PACKAGES},$package" + CHANGED_PACKAGE_LIST=("${CHANGED_PACKAGE_LIST[@]}" "$package") + fi + done - # if [[ "${#CHANGED_PACKAGE_LIST[@]}" == 0 ]]; then - # echo "No changes detected in packages." - # else - # echo "Detected changes in the following ${#CHANGED_PACKAGE_LIST[@]} package(s):" - # for package in "${CHANGED_PACKAGE_LIST[@]}"; do - # echo "$package" - # done - # echo "" - # fi + if [[ "${#CHANGED_PACKAGE_LIST[@]}" == 0 ]]; then + echo "No changes detected in packages." + else + echo "Detected changes in the following ${#CHANGED_PACKAGE_LIST[@]} package(s):" + for package in "${CHANGED_PACKAGE_LIST[@]}"; do + echo "$package" + done + echo "" + fi return 0 } diff --git a/script/incremental_build.sh b/script/incremental_build.sh index 3911f0a6e9c8..726f83cfe734 100755 --- a/script/incremental_build.sh +++ b/script/incremental_build.sh @@ -46,7 +46,7 @@ BRANCH_NAME="${BRANCH_NAME:-"$(git rev-parse --abbrev-ref HEAD)"}" # This has to be turned into a list and then split out to the command line, # otherwise it gets treated as a single argument. PLUGIN_SHARDING=($PLUGIN_SHARDING) - +(cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) if [[ "${BRANCH_NAME}" == "master" ]]; then echo "Running for all packages" (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) From 67afc0b8a332f5415c97a89ac0e8849d2eb8dcad Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 26 Jan 2021 10:48:06 -0800 Subject: [PATCH 14/17] remove bump and settle --- .../example/integration_test/webview_flutter_test.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/webview_flutter/example/integration_test/webview_flutter_test.dart b/packages/webview_flutter/example/integration_test/webview_flutter_test.dart index 6c96b519d6fb..245a85ed1c57 100644 --- a/packages/webview_flutter/example/integration_test/webview_flutter_test.dart +++ b/packages/webview_flutter/example/integration_test/webview_flutter_test.dart @@ -887,7 +887,7 @@ void main() { const int Y_SCROLL = 321; await controller.scrollTo(X_SCROLL, Y_SCROLL); - await tester.pumpAndSettle(Duration(seconds: 3)); + // await tester.pumpAndSettle(Duration(seconds: 3)); int scrollPosX = await controller.getScrollX(); int scrollPosY = await controller.getScrollY(); expect(X_SCROLL, scrollPosX); @@ -895,7 +895,7 @@ void main() { // Check scrollBy() (on top of scrollTo()) await controller.scrollBy(X_SCROLL, Y_SCROLL); - await tester.pumpAndSettle(Duration(seconds: 3)); + // await tester.pumpAndSettle(Duration(seconds: 3)); scrollPosX = await controller.getScrollX(); scrollPosY = await controller.getScrollY(); expect(X_SCROLL * 2, scrollPosX); From 63eb27cce8ca29b4237475c192af2f2452c3f288 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 26 Jan 2021 10:58:42 -0800 Subject: [PATCH 15/17] fix --- script/incremental_build.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/script/incremental_build.sh b/script/incremental_build.sh index 726f83cfe734..1f87cc502c65 100755 --- a/script/incremental_build.sh +++ b/script/incremental_build.sh @@ -46,7 +46,6 @@ BRANCH_NAME="${BRANCH_NAME:-"$(git rev-parse --abbrev-ref HEAD)"}" # This has to be turned into a list and then split out to the command line, # otherwise it gets treated as a single argument. PLUGIN_SHARDING=($PLUGIN_SHARDING) -(cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) if [[ "${BRANCH_NAME}" == "master" ]]; then echo "Running for all packages" (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) From d7daa746f46c1a5edad7b086ae017492630602f3 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Tue, 26 Jan 2021 11:46:32 -0800 Subject: [PATCH 16/17] fix --- script/incremental_build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/script/incremental_build.sh b/script/incremental_build.sh index 1f87cc502c65..3911f0a6e9c8 100755 --- a/script/incremental_build.sh +++ b/script/incremental_build.sh @@ -46,6 +46,7 @@ BRANCH_NAME="${BRANCH_NAME:-"$(git rev-parse --abbrev-ref HEAD)"}" # This has to be turned into a list and then split out to the command line, # otherwise it gets treated as a single argument. PLUGIN_SHARDING=($PLUGIN_SHARDING) + if [[ "${BRANCH_NAME}" == "master" ]]; then echo "Running for all packages" (cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]}) From 75597c9d59fc8dcd160fc4706bf81013c4c70fd9 Mon Sep 17 00:00:00 2001 From: Chris Yang Date: Fri, 29 Jan 2021 09:55:13 -0800 Subject: [PATCH 17/17] remove commented out code --- .../example/integration_test/webview_flutter_test.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/webview_flutter/example/integration_test/webview_flutter_test.dart b/packages/webview_flutter/example/integration_test/webview_flutter_test.dart index 245a85ed1c57..50af77fe6c6e 100644 --- a/packages/webview_flutter/example/integration_test/webview_flutter_test.dart +++ b/packages/webview_flutter/example/integration_test/webview_flutter_test.dart @@ -887,7 +887,6 @@ void main() { const int Y_SCROLL = 321; await controller.scrollTo(X_SCROLL, Y_SCROLL); - // await tester.pumpAndSettle(Duration(seconds: 3)); int scrollPosX = await controller.getScrollX(); int scrollPosY = await controller.getScrollY(); expect(X_SCROLL, scrollPosX); @@ -895,7 +894,6 @@ void main() { // Check scrollBy() (on top of scrollTo()) await controller.scrollBy(X_SCROLL, Y_SCROLL); - // await tester.pumpAndSettle(Duration(seconds: 3)); scrollPosX = await controller.getScrollX(); scrollPosY = await controller.getScrollY(); expect(X_SCROLL * 2, scrollPosX);