Unverified Commit ca2d7b3d authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Remove package image dependency (#74763)

parent cf5d9623
......@@ -10,7 +10,7 @@ dependencies:
flutter_driver:
sdk: flutter
cupertino_icons: 1.0.2
device_info: 2.0.0-nullsafety.1
device_info: 2.0.0-nullsafety.2
archive: 3.0.0-nullsafety.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
characters: 1.1.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
......@@ -77,4 +77,4 @@ flutter:
assets:
- assets/
# PUBSPEC CHECKSUM: e6f1
# PUBSPEC CHECKSUM: 7af2
......@@ -7,13 +7,13 @@ dependencies:
flutter:
sdk: flutter
collection: 1.15.0-nullsafety.5
device_info: 2.0.0-nullsafety.1
device_info: 2.0.0-nullsafety.2
intl: 0.17.0-nullsafety.2
connectivity: 3.0.0-nullsafety.1
connectivity: 3.0.0-nullsafety.3
string_scanner: 1.1.0-nullsafety.3
url_launcher: 6.0.0-nullsafety.1
url_launcher: 6.0.0-nullsafety.4
cupertino_icons: 1.0.2
video_player: 2.0.0-nullsafety.2
video_player: 2.0.0-nullsafety.7
scoped_model:
git:
url: https://github.com/kevmoo/scoped_model.git
......@@ -27,7 +27,7 @@ dependencies:
characters: 1.1.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
charcode: 1.2.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
clock: 1.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
connectivity_macos: 0.1.0+7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
connectivity_macos: 0.2.0-nullsafety # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
connectivity_platform_interface: 2.0.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
device_info_platform_interface: 2.0.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
js: 0.6.3-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
......@@ -273,4 +273,4 @@ flutter:
- asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Regular.ttf
- asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Light.ttf
# PUBSPEC CHECKSUM: 4392
# PUBSPEC CHECKSUM: 7fb4
......@@ -20,7 +20,7 @@ dependencies:
sdk: flutter
# This integration test includes a watchOS pod. Add a Flutter plugin
# to prompt the tool to run pod install.
device_info: 2.0.0-nullsafety.1
device_info: 2.0.0-nullsafety.2
characters: 1.1.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
collection: 1.15.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
......@@ -91,4 +91,4 @@ flutter:
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
# PUBSPEC CHECKSUM: 6950
# PUBSPEC CHECKSUM: f751
......@@ -5,7 +5,6 @@ environment:
sdk: ">=2.8.0 <3.0.0"
dependencies:
image: 3.0.0-nullsafety.0
flutter:
sdk: flutter
flutter_driver:
......@@ -41,7 +40,6 @@ dependencies:
package_config: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
path: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
pedantic: 1.10.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
petitparser: 4.0.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
pool: 1.5.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
shelf: 0.7.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
......@@ -64,7 +62,6 @@ dependencies:
web_socket_channel: 1.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
webdriver: 3.0.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
webkit_inspection_protocol: 0.7.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
xml: 5.0.0-nullsafety.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
dev_dependencies:
......@@ -78,4 +75,4 @@ dev_dependencies:
flutter:
uses-material-design: true
# PUBSPEC CHECKSUM: 0385
# PUBSPEC CHECKSUM: 410e
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_driver/flutter_driver.dart';
import 'package:image/image.dart';
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
void main() {
group('FlutterDriver', () {
FlutterDriver driver;
setUpAll(() async {
driver = await FlutterDriver.connect();
});
tearDownAll(() async {
await driver.close();
});
test('should take screenshot', () async {
final SerializableFinder toggleBtn = find.byValueKey('toggle');
// Cards use a magic background color that we look for in the screenshots.
final Matcher cardsAreVisible = contains(getColor(0xff, 0x01, 0x02));
await driver.waitFor(toggleBtn);
bool cardsShouldBeVisible = false;
Image imageBefore = decodePng(await driver.screenshot());
for (int i = 0; i < 10; i += 1) {
await driver.tap(toggleBtn);
cardsShouldBeVisible = !cardsShouldBeVisible;
final Image imageAfter = decodePng(await driver.screenshot());
if (cardsShouldBeVisible) {
expect(imageBefore.data, isNot(cardsAreVisible));
expect(imageAfter.data, cardsAreVisible);
} else {
expect(imageBefore.data, cardsAreVisible);
expect(imageAfter.data, isNot(cardsAreVisible));
}
imageBefore = imageAfter;
}
}, timeout: const Timeout(Duration(minutes: 2)));
});
}
......@@ -22,54 +22,58 @@ import '../runner/flutter_command.dart';
/// Map from package name to package version, used to artificially pin a pub
/// package version in cases when upgrading to the latest breaks Flutter.
const Map<String, String> _kManuallyPinnedDependencies = <String, String>{
// Add pinned packages here.
// Add pinned packages here. Please leave a comment explaining why.
// PACKAGES WITH INCOMPATIBLE LATER VERSIONS
// Dart analyzer does not catch renamed or deleted files.
// Therefore, we control the version of flutter_gallery_assets so that
// existing tests do not fail when the package has a new version.
'flutter_gallery_assets': '^0.2.0',
'mockito': '4.1.1', // Prevent mockito from upgrading to the source gen version.
'vm_service_client': '0.2.6+2', // Final version before being marked deprecated.
'flutter_template_images': '1.0.1', // Must always exactly match flutter_tools template.
'shelf': '0.7.5',
// Dart team owned nnbd deps
'archive': '3.0.0-nullsafety.0',
'async': '2.5.0-nullsafety.3',
'boolean_selector': '2.1.0-nullsafety.3',
'characters': '1.1.0-nullsafety.5',
'charcode': '1.2.0-nullsafety.3',
'clock': '1.1.0-nullsafety.3',
'collection': '1.15.0-nullsafety.5',
'intl': '0.17.0-nullsafety.2',
'fake_async': '1.2.0-nullsafety.3',
'js': '0.6.3-nullsafety.3',
'matcher': '0.12.10-nullsafety.3',
'meta': '1.3.0-nullsafety.6',
'path': '1.8.0-nullsafety.3',
'pedantic': '1.10.0-nullsafety.3',
'pool': '1.5.0-nullsafety.3',
'source_maps': '0.10.10-nullsafety.3',
'source_map_stack_trace': '2.1.0-nullsafety.4',
'source_span': '1.8.0-nullsafety.4',
'stack_trace': '1.10.0-nullsafety.6',
'stream_channel': '2.1.0-nullsafety.3',
'string_scanner': '1.1.0-nullsafety.3',
'term_glyph': '1.2.0-nullsafety.3',
'test': '1.16.0-nullsafety.16',
'test_api': '0.2.19-nullsafety.6',
'test_core': '0.3.12-nullsafety.15',
'typed_data': '1.3.0-nullsafety.5',
'vector_math': '2.1.0-nullsafety.5',
// Flutter team owned nnbd deps
'platform': '3.0.0-nullsafety.4',
'file': '6.0.0-nullsafety.4',
'process': '4.0.0-nullsafety.4',
'process_runner': '4.0.0-nullsafety.5',
'mockito': '4.1.1', // Prevent mockito from upgrading to the source gen version.
'vm_service_client': '0.2.6+2', // Final version before being marked deprecated.
// DART TEAM OWNED NNBD DEPS
'archive': '">=3.0.0-nullsafety.0"',
'async': '">=2.5.0-nullsafety.3"',
'boolean_selector': '">=2.1.0-nullsafety.3"',
'characters': '">=1.1.0-nullsafety.5"',
'charcode': '">=1.2.0-nullsafety.3"',
'clock': '">=1.1.0-nullsafety.3"',
'collection': '">=1.15.0-nullsafety.5"',
'fake_async': '">=1.2.0-nullsafety.3"',
'intl': '">=0.17.0-nullsafety.2"',
'js': '">=0.6.3-nullsafety.3"',
'matcher': '">=0.12.10-nullsafety.3"',
'meta': '">=1.3.0-nullsafety.6"',
'path': '">=1.8.0-nullsafety.3"',
'pedantic': '">=1.10.0-nullsafety.3"',
'petitparser': '">=4.0.0-nullsafety.1"',
'pool': '">=1.5.0-nullsafety.3"',
'source_map_stack_trace': '">=2.1.0-nullsafety.4"',
'source_maps': '">=0.10.10-nullsafety.3"',
'source_span': '">=1.8.0-nullsafety.4"',
'stack_trace': '">=1.10.0-nullsafety.6"',
'stream_channel': '">=2.1.0-nullsafety.3"',
'string_scanner': '">=1.1.0-nullsafety.3"',
'term_glyph': '">=1.2.0-nullsafety.3"',
'test': '">=1.16.0-nullsafety.16"',
'test_api': '">=0.2.19-nullsafety.6"',
'test_core': '">=0.3.12-nullsafety.15"',
'typed_data': '">=1.3.0-nullsafety.5"',
'vector_math': '">=2.1.0-nullsafety.5"',
'xml': '">=5.0.0-nullsafety.1"',
// FLUTTER TEAM OWNED NNBD DEPS
'connectivity': '">=3.0.0-nullsafety.1"',
'device_info': '">=2.0.0-nullsafety.1"',
'file': '">=6.0.0-nullsafety.4"',
'platform': '">=3.0.0-nullsafety.4"',
'process': '">=4.0.0-nullsafety.4"',
'process_runner': '">=4.0.0-nullsafety.5"',
'url_launcher': '">=6.0.0-nullsafety.1"',
'video_player': '">=2.0.0-nullsafety.2"',
// MYSTERIES
'path_provider': '1.6.14',
'video_player': '2.0.0-nullsafety.2',
'url_launcher': '6.0.0-nullsafety.1',
'connectivity': '3.0.0-nullsafety.1',
'device_info': '2.0.0-nullsafety.1',
'camera': '0.6.4+5',
'shelf': '0.7.5',
};
class UpdatePackagesCommand extends FlutterCommand {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment