mirror of
https://github.com/flutter/packages.git
synced 2025-05-31 21:48:04 +08:00
[ci] Pin Chromium version for web tests (#4620)
Switches the web tests from using the version of Chrome installed by the Dockerfile, which is whatever happened to be stable when the image is generated, and thus not hermetic, to a pinned version of Chromium. This uses a slightly modified version of the script that is already used for flutter/packages. Since Chromium doesn't support mp4 playback, this updates the `video_player` integration tests to use WebM on web instead, to avoid having all the tests fail in CI. Part of https://github.com/flutter/flutter/issues/84712
This commit is contained in:
@ -10,11 +10,13 @@
|
||||
`--packages=path_provide_ios` now works.
|
||||
- `--run-on-changed-packages` now includes only the changed packages in a
|
||||
federated plugin, not all packages in that plugin.
|
||||
- Fix `federation-safety-check` handling of plugin deletion, and of top-level
|
||||
- Fixes `federation-safety-check` handling of plugin deletion, and of top-level
|
||||
files in unfederated plugins whose names match federated plugin heuristics
|
||||
(e.g., `packages/foo/foo_android.iml`).
|
||||
- Add an auto-retry for failed Firebase Test Lab tests as a short-term patch
|
||||
- Adds an auto-retry for failed Firebase Test Lab tests as a short-term patch
|
||||
for flake issues.
|
||||
- Adds support for `CHROME_EXECUTABLE` in `drive-examples` to match similar
|
||||
`flutter` behavior.
|
||||
|
||||
## 0.7.3
|
||||
|
||||
|
@ -120,7 +120,9 @@ class DriveExamplesCommand extends PackageLoopingCommand {
|
||||
'-d',
|
||||
'web-server',
|
||||
'--web-port=7357',
|
||||
'--browser-name=chrome'
|
||||
'--browser-name=chrome',
|
||||
if (platform.environment.containsKey('CHROME_EXECUTABLE'))
|
||||
'--chrome-binary=${platform.environment['CHROME_EXECUTABLE']}',
|
||||
],
|
||||
if (getBoolArg(kPlatformWindows))
|
||||
kPlatformWindows: <String>['-d', 'windows'],
|
||||
|
@ -584,6 +584,58 @@ void main() {
|
||||
]));
|
||||
});
|
||||
|
||||
test('driving a web plugin with CHROME_EXECUTABLE', () async {
|
||||
final Directory pluginDirectory = createFakePlugin(
|
||||
'plugin',
|
||||
packagesDir,
|
||||
extraFiles: <String>[
|
||||
'example/test_driver/plugin_test.dart',
|
||||
'example/test_driver/plugin.dart',
|
||||
],
|
||||
platformSupport: <String, PlatformDetails>{
|
||||
kPlatformWeb: const PlatformDetails(PlatformSupport.inline),
|
||||
},
|
||||
);
|
||||
|
||||
final Directory pluginExampleDirectory =
|
||||
pluginDirectory.childDirectory('example');
|
||||
|
||||
mockPlatform.environment['CHROME_EXECUTABLE'] = '/path/to/chrome';
|
||||
|
||||
final List<String> output = await runCapturingPrint(runner, <String>[
|
||||
'drive-examples',
|
||||
'--web',
|
||||
]);
|
||||
|
||||
expect(
|
||||
output,
|
||||
containsAllInOrder(<Matcher>[
|
||||
contains('Running for plugin'),
|
||||
contains('No issues found!'),
|
||||
]),
|
||||
);
|
||||
|
||||
expect(
|
||||
processRunner.recordedCalls,
|
||||
orderedEquals(<ProcessCall>[
|
||||
ProcessCall(
|
||||
getFlutterCommand(mockPlatform),
|
||||
const <String>[
|
||||
'drive',
|
||||
'-d',
|
||||
'web-server',
|
||||
'--web-port=7357',
|
||||
'--browser-name=chrome',
|
||||
'--chrome-binary=/path/to/chrome',
|
||||
'--driver',
|
||||
'test_driver/plugin_test.dart',
|
||||
'--target',
|
||||
'test_driver/plugin.dart'
|
||||
],
|
||||
pluginExampleDirectory.path),
|
||||
]));
|
||||
});
|
||||
|
||||
test('driving when plugin does not suppport Windows is a no-op', () async {
|
||||
createFakePlugin('plugin', packagesDir, extraFiles: <String>[
|
||||
'example/test_driver/plugin_test.dart',
|
||||
|
@ -30,6 +30,9 @@ class MockPlatform extends Mock implements Platform {
|
||||
Uri get script => isWindows
|
||||
? Uri.file(r'C:\foo\bar', windows: true)
|
||||
: Uri.file('/foo/bar', windows: false);
|
||||
|
||||
@override
|
||||
Map<String, String> environment = <String, String>{};
|
||||
}
|
||||
|
||||
class MockProcess extends Mock implements io.Process {
|
||||
|
Reference in New Issue
Block a user