Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

@nturgut
Copy link
Contributor

@nturgut nturgut commented Feb 5, 2020

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.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@nturgut nturgut requested a review from collinjackson February 5, 2020 21:06
@nturgut nturgut self-assigned this Feb 5, 2020
@nturgut nturgut requested a review from digiter as a code owner February 5, 2020 21:10
@nturgut nturgut requested review from yjbanov and removed request for digiter February 5, 2020 21:15
Copy link
Contributor

@yjbanov yjbanov left a 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?

@collinjackson
Copy link
Contributor

collinjackson commented Feb 6, 2020

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.

@nturgut
Copy link
Contributor Author

nturgut commented Feb 8, 2020

Can you write a test for this change?

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.

@yjbanov
Copy link
Contributor

yjbanov commented Feb 10, 2020

I think it's fine to use a system-installed Chrome for testing the test harness itself.

Copy link
Contributor

@collinjackson collinjackson left a 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.

@nturgut nturgut merged commit a4a64e5 into flutter:master Feb 12, 2020
sanekyy pushed a commit to sanekyy/plugins that referenced this pull request Feb 18, 2020
* e2e web changes part1: registering web extension.

* update pubspec yaml version

* update changelog

* changes by format tool
EdwinRomelta pushed a commit to EdwinRomelta/plugins that referenced this pull request Jun 11, 2020
* e2e web changes part1: registering web extension.

* update pubspec yaml version

* update changelog

* changes by format tool
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
* e2e web changes part1: registering web extension.

* update pubspec yaml version

* update changelog

* changes by format tool
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants