EarlGrey icon indicating copy to clipboard operation
EarlGrey copied to clipboard

EarlGrey 2.0 | Add CocoaPods support for users.

Open tirodkar opened this issue 6 years ago • 6 comments

tirodkar avatar Apr 01 '19 20:04 tirodkar

Any update with this? I see version 2.0.0 is still not available on CocoaPods. I see some progress was made to update the Podspecs file for the 2.0.0 release a month ago ( #1000 ) but no movement since.

adil-hussain-84 avatar Sep 04 '19 09:09 adil-hussain-84

It is available. Take a look at https://github.com/google/EarlGrey/blob/earlgrey2/docs/cocoapods-setup.md. We need to look more into white-box support using category bundles, but the rest works.

tirodkar avatar Sep 04 '19 14:09 tirodkar

Hi @tirodkar, Can you please tell me if there is any additional step/setup that needs to be performed with respect to cocoapods setup? Is only installing pods sufficient ? or we need to perform some additional steps eg: adding a bridging header (for swift), or anything else.

I tried the same but when I tried writing test cases, I was not getting auto-complete options after Earlgrey (for eg: Earlgrey.selectElement() and so ). In Suggestion i'm getting EarlGrey.selectElement(with: <<error type>>)

Note: I have added EarlGrey.swift file manually.

Please let me know if there is anything else that needs to be done. Thanks..!!

jainhitesh3 avatar Sep 16 '19 14:09 jainhitesh3

@jainhitesh3: I just tried upgrading from EarlGrey 1.15.1 to EarlGreyTest 2.0.0 but it looks like the EarlGrey.swift has a fair number of compilation errors which will need fixing.

@tirodkar: Thanks for the link. Any idea why it's necessary to add an 'EarlGreyApp' pod dependency in the application target?

adil-hussain-84 avatar Sep 25 '19 16:09 adil-hussain-84

EarlGrey 2.0 is based on XCUITest which is a UI test - the app and test are two different processes. That's why we need an App and Test config.

tirodkar avatar Sep 25 '19 18:09 tirodkar

@adil-hussain-84: For me, the error resolved after Building the project. After building the project I am getting auto-complete (which I was not getting earlier).

Strangely, Once I do the clean build (and cleaning of derived data), I'm again getting the same errors, but after building it is getting resolved. Maybe you can also try the same.

jainhitesh3 avatar Sep 26 '19 06:09 jainhitesh3