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

[e2e] Creates basic support/documentation/example to iOS. #2394

Merged
merged 9 commits into from
Dec 12, 2019

Conversation

AlbertWang0116
Copy link
Contributor

Description

* Updates iOS E2EPlugin and add skeleton iOS test case E2EIosTest.
* Adds instructions to README.md about e2e testing on iOS device.
* Applies iOS e2e to example.

Related Issues

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.

  • [x ] 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.

* Adds instructions to README.md about e2e testing on iOS device.
* Applies iOS e2e to example.
* Adds instructions to README.md about e2e testing on iOS device.
* Applies iOS e2e to example.
Comment on lines +173 to +174
You need to change `iOS/Podfile` to avoid test target statically linking to the plugins. One way is to
link all of the plugins dynamically:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI the context behind this:

If the app statically links to plugins, the test target also needs to statically link to the same library. This is a known issue with CocoaPods. If we want to keep the static linking, we need to tell Podfile not to inherit search path from the main target[1], and remove $(inherited) in .xcconfig of the test target[2]. This is a tedious work for users, so I just put a simpler workaround (dynamic linking) here.

We can still allow the static linking, by resolving the additional steps mentioned above by flutter tools.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AlbertWang0116
Copy link
Contributor Author

@collinjackson

@collinjackson collinjackson self-requested a review December 11, 2019 00:32
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.

Looks good, I have just a few minor suggestions.

packages/e2e/CHANGELOG.md Outdated Show resolved Hide resolved
packages/e2e/CHANGELOG.md Outdated Show resolved Hide resolved
packages/e2e/CHANGELOG.md Outdated Show resolved Hide resolved
packages/e2e/README.md Outdated Show resolved Hide resolved
packages/e2e/README.md Outdated Show resolved Hide resolved
packages/e2e/ios/Classes/E2EIosTest.m Outdated Show resolved Hide resolved
AlbertWang0116 and others added 3 commits December 10, 2019 16:42
Applied all suggested comments!

Co-Authored-By: Collin Jackson <jackson@google.com>
@AlbertWang0116
Copy link
Contributor Author

I made E2EIosTest fallback not to be a XCTestCase class for now. Otherwise iOS app won't run until developer manually open .xcodeproj and run a test case. Flutter tool should be able to resolve this, then we can switch E2EIosTest to XCTestCase.

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.

Landing this as a functionality update since it introduces new API surface area on iOS.

As a follow-on PR, could you please update the documentation to explain how to run the tests on the command line (so that Firebase Test Lab can be used on CI)

@@ -1,3 +1,8 @@
## 0.2.2+4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## 0.2.2+4
## 0.2.3

@collinjackson collinjackson merged commit 1d16548 into flutter:master Dec 12, 2019
sanekyy pushed a commit to sanekyy/plugins that referenced this pull request Dec 21, 2019
* * Updates E2EPlugin and add skeleton iOS test case E2EIosTest.
* Adds instructions to README.md about e2e testing on iOS device.
* Applies iOS e2e to example.

Co-Authored-By: Collin Jackson <jackson@google.com>
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
* * Updates E2EPlugin and add skeleton iOS test case E2EIosTest.
* Adds instructions to README.md about e2e testing on iOS device.
* Applies iOS e2e to example.

Co-Authored-By: Collin Jackson <jackson@google.com>
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.

3 participants