-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[e2e] e2e web changes part1: registering web extension. #2502
Conversation
yjbanov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you write a test for this change?
Note that the E2E plugin is currently tested using a cross-platform Dart integration test that lives here: https://github.com/flutter/plugins/blob/master/packages/e2e/example/test_driver/example_e2e.dart So, enabling the integration test for the browser platform on the flutter/plugins CI would result in functional testing of web support. This would require changing the plugin repo's Cirrus configuration: https://github.com/flutter/plugins/blob/master/.cirrus.yml That said, a unit test would obviously be useful as well. |
I think we can't write a unit test unless we use a tool like felt. Since we need the browser to tests the main functionality. We need what felt does such as downloading chrome and testing the file with it. |
|
I think it's fine to use a system-installed Chrome for testing the test harness itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this! Finally web app and plugin developers can run e2e integration tests that previously only worked on mobile.
This change LGTM modulo Cirrus integration (which we agreed can be done in its own PR that tests all plugins). I filed an issue for that: flutter/flutter#50654
It might need to get refactored a bit once we add screenshots but we can cross that bridge when we get to it without making any breaking changes.
6aad0a5 to
ebb6f6e
Compare
* e2e web changes part1: registering web extension. * update pubspec yaml version * update changelog * changes by format tool
* e2e web changes part1: registering web extension. * update pubspec yaml version * update changelog * changes by format tool
* e2e web changes part1: registering web extension. * update pubspec yaml version * update changelog * changes by format tool
Description
In order to use different e2e package for Flutter Web engine integration tests we need to add some
web specific parts to the code. These can be found here as a demo: PR
In this particular change we are registering flutter driver commands to the browser. They will be accessed as window.$flutter_command
Related Issues
flutter/flutter#50212
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?