Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs and make them more lean #458

Merged
merged 4 commits into from Mar 30, 2017
Merged

Conversation

tirodkar
Copy link
Collaborator

No description provided.

docs/faq.md Outdated
@@ -18,9 +26,16 @@ assertions. The ability to search for elements (using search actions) makes test
UI changes. For example, EarlGrey provides APIs that allow searching for elements in scrollable
containers, regardless of the amount of scrolling required.

**Why do tests have the video cropped? How can I get them to fit in the video frame?**
Copy link
Collaborator

Choose a reason for hiding this comment

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

IIRC it's not cropped. It's just scaled w/ borders around it. Plz double check?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

docs/faq.md Outdated
**I get a crash with “Could not swizzle …”**

This means that EarlGrey is trying to swizzle a method that it has swizzled before. It is a result of EarlGrey being linked to more than once. Ensure that only the **Test Target**
This means that EarlGrey is trying to swizzle a method that it has swizzled before. It is a result
of EarlGrey being linked to more than once. Ensure that only the **Test Target**
depends on *EarlGrey.framework* and EarlGrey.framework is embedded in the app under test (i.e. *$TEST_HOST*) from the
test target's build phase.
Copy link
Collaborator

Choose a reason for hiding this comment

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

from the test target's build phase via Copy File(s) Script?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done


### CocoaPods installation

For EarlGrey, we highly recommend [CocoaPods](https://cocoapods.org/) as the best way to get started.
#### Step 1: Set up a Unit target ///// EarlGrey adds changes to the test target's Scheme and Build Phases
Copy link
Collaborator

Choose a reason for hiding this comment

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

///// ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Comment I forgot to erase. Thanks.


<img src="images/image00.png" width="500">
Click Next → "Add a Test Target Name" → Finish.
Copy link
Collaborator

Choose a reason for hiding this comment

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

make this bold like others? or keep em consistent. also what's special about "Add a Test Target Name". I don't think Xcode 8 has those screens.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It isn't a concrete button title but more of an action to be done. Made the step actions bold throughout.

`pod install` command. If your **Test Target(s)** do not contain these changes to the
[Scheme](#scheme-changes) and [Build Phases](#build-phase-changes) after running
`pod install`, please re-run `pod install` again.
And clock on Close.
Copy link
Collaborator

Choose a reason for hiding this comment

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

clock => click...make Close bold?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

:( Done.

PROJECT_NAME = 'SampleApp'
TEST_TARGET = 'SampleAppTests'
SCHEME_FILE = 'SampleAppTests.xcscheme'
```ruby
Copy link
Collaborator

Choose a reason for hiding this comment

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

indentations seem to be removed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

To download a particular version of the gem, use `gem install earlgrey -v x.y.z`.
5. Install the EarlGrey gem by doing `gem install earlgrey` and then do the `pod install`.

Notes:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to highlight this like notes, maybe light blue or green section?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It doesn't seem like it's possible to add color to plaintext in Github markdown.

http://stackoverflow.com/questions/11509830/how-to-add-color-to-githubs-readme-md-file


2. As part of the initial build step, a script **setup-earlgrey.sh** will be run to download all the required dependencies. Without it, you might find dependencies like `fishhook` and `OCHamcrest` shown as missing in the folder structure.
2. As part of the initial build step, a script **setup-earlgrey.sh** will be run to download all the
Copy link
Collaborator

Choose a reason for hiding this comment

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

link to setup-earlgrey.sh

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

#### Step 1: Set up a test target for Carthage

See [Step 1 from the `CocoaPods installation`](#step-1-set-up-a-test-target) detailed above.

#### Step 2: Configure carthage

Install Carthage
1. Install Carthage

`brew update; brew install carthage`
Copy link
Collaborator

Choose a reason for hiding this comment

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

instead of ` so that it looks like the code blocks above. The color of code block using ` seems slightly different from

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd have to surround all in a ``` to get them to look the same. These are steps to be performed rather than code blocks, so I'd assume that should be fine. Do you think it would be better to turn these into code blocks?


The EarlGrey tests are hosted from the application being tested. Make sure the test target is setup
correctly to launch the app under test:

1. Under the **General** tab:
* **Host Application** is set to the app under test.
Copy link
Collaborator

Choose a reason for hiding this comment

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

this shows up as:

Under the General tab: a) Host Application is set to the app under test.

Please fix it here and for the other numbered bullets below

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Adding a) etc. doesn't seem to indent this correctly. Just changed this to * everywhere.

@tirodkar tirodkar force-pushed the docsUpdate branch 6 times, most recently from 71e5def to c6876c1 Compare March 20, 2017 07:46
docs/faq.md Outdated
@@ -1,5 +1,13 @@
# FAQ

**I did a fresh `git clone` of the EarlGreyExample CocoaPods Demo project followed by a
`pod install`. However, I get an error similar to `No such module 'EarlGrey'`.**
This is a known issue with EarlGrey's CocoaPods support. EarlGrey requires some additions to the
Copy link
Contributor

Choose a reason for hiding this comment

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

you need an empty line after the bold text

**question**

answer

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

docs/faq.md Outdated
test project's Build Settings and Schemes. If your **Test Target(s)** do not contain these changes
to the [Scheme](./install-and-run.md#scheme-changes) and
[Build Phases](./install-and-run.md#build-phase-changes) after running `pod install`, please re-run
`pod install` again.'
Copy link
Contributor

Choose a reason for hiding this comment

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

again.' should have the ' removed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

docs/faq.md Outdated
@@ -29,7 +46,7 @@ undefined.” in the logs**

This usually means that EarlGrey is being linked to more than once. Ensure that only the **Test Target**
depends on *EarlGrey.framework* and EarlGrey.framework is embedded in the app under test (i.e. *$TEST_HOST*) from the
test target's build phase.
test target's built products via a Copy File(s) script.
Copy link
Contributor

Choose a reason for hiding this comment

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

built products via a Copy File(s) script.

is not correct. Xcode refers to Build Phases

build_phases_fail

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed to Copy Files(s) Build Phase

You can add EarlGrey to Xcode projects in two ways: using CocoaPods, or as a framework. If you wish to contribute to the EarlGrey project, the **EarlGrey.xcodeproj** generated from the [GitHub Installation](#github-installation) section is integrated with the Unit and Functional Test projects for you to work with the source.
You can add EarlGrey to Xcode projects in three ways: using CocoaPods, Carthage or manually through the Xcode Project.

For EarlGrey, we highly recommend [CocoaPods](http://cocoapods.org/pods/EarLGrey) as the best way to get started.
Copy link
Contributor

Choose a reason for hiding this comment

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

Use https. Also the L should not be capitalized.

https://cocoapods.org/pods/EarlGrey

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

To download a particular version of the gem, use `gem install earlgrey -v x.y.z`.
Notes:
* Call the `configure_for_earlgrey` method for each target / Scheme.
* For compatibility between different versions, please peruse [this doc](https://github.com/google/EarlGrey/tree/master/docs/versions.md).
Copy link
Contributor

Choose a reason for hiding this comment

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

please see [this doc] seems more natural.

I think we should start matching the gem versions with EG versions. Asking users to consult a compatability document isn't a great user experience.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We tried discussing this before. Won't going from 0.1.6 to 1.8 or so be odd?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think so. Using 0.1.6 for EarlGrey 1.8 is a bit confusing. The gem is stable now, is there a reason to stay on 0.x.x?

Gem 1.8 for EarlGrey 1.8 seems like a natural fit.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds fine. We're going to have to get them to parity sometime soon, though it would probably break semantic versioning for the gem. @khandpur WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think moving to 1.x.x is in line with semver.

How do I know when to release 1.0.0?

If your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If you’re worrying a lot about backwards compatibility, you should probably already be 1.0.0.

http://semver.org/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But to keep them in parity we're going to have to move them to 1.8.1 for the next release right? Will that be fine?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it will be fine. In general there's no deep meaning to the Ruby gem version numbers. In this specific case, I think version parity is more important than strictly following semver.

1. Download the source for EarlGrey and its dependencies.
* Download EarlGrey's source code from the [Latest Release](https://github.com/google/EarlGrey/archive/1.0.0.zip)
1. Download the source for EarlGrey and its dependencies.
* Download EarlGrey's source code from the [Latest Release](https://github.com/google/EarlGrey/archive/1.0.0.zip)
Copy link
Contributor

Choose a reason for hiding this comment

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

1.0 is not the latest release. Use this link instead:

https://github.com/google/EarlGrey/releases/latest

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. Thanks!


* Unzip and go to the `EarlGrey-1.0.0/EarlGrey` directory that contains **EarlGrey.xcodeproj**.
* Unzip and go to the `EarlGrey-1.0.0/EarlGrey` directory that contains **EarlGrey.xcodeproj**.
Copy link
Contributor

Choose a reason for hiding this comment

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

should probably make this version independent:

EarlGrey-x.y.z/EarlGrey

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

```

> For compatibility with Swift, we use `grey_allOfMatchers()` and `grey_anyOfMatchers()` instead of `grey_allOf()`
and `grey_anyOf()` respectively.
> For compatibility with Swift 2.3, we use `grey_allOfMatchers()` and `grey_anyOfMatchers()`
Copy link
Contributor

Choose a reason for hiding this comment

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

is this no longer an issue on Swift 3? otherwise I don't think it makes sense to say 2.3.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We still use grey_allOfMatchers in Swift 3. Removed the 2.3 sicne it was a little confusing.

docs/faq.md Outdated
launch screen images present for all supported devices (see
[iOS Developer Library, Launch Files](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/LaunchImages.html)).

**Why does EarlGrey need to modify the test's scheme and add a Copy Files Build Phase?**
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@khandpur PTAL. Added a question to address info for the scheme changes.


### Carthage Installation

EarlGrey supports Carthage via [the EarlGrey gem.](https://rubygems.org/gems/earlgrey)

#### Step 1: Set up a test target for Carthage

See [Step 1 from the `CocoaPods installation`](#step-1-set-up-a-test-target) detailed above.
Copy link

@AVandelay AVandelay Mar 20, 2017

Choose a reason for hiding this comment

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

Can this just be written out? Section 3 documents running pod install which shouldn't apply here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@AVandelay sorry, I'm a little confused here.

#### Step 1: Set up a Unit target doesn't mention pod install. Am I looking at something else?

Choose a reason for hiding this comment

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

sorry. I was comparing with the version currently published. Looks like this comment is irrelevant now.

## Install EarlGrey

You can add EarlGrey to Xcode projects in two ways: using CocoaPods, or as a framework. If you wish to contribute to the EarlGrey project, the **EarlGrey.xcodeproj** generated from the [GitHub Installation](#github-installation) section is integrated with the Unit and Functional Test projects for you to work with the source.
You can add EarlGrey to Xcode projects in three ways: using CocoaPods, Carthage or manually through the Xcode Project.
Copy link
Collaborator

Choose a reason for hiding this comment

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

using CocoaPods, Carthage or manually

Can we add links for each so clicking on Cocoapods takes me directly to cocoapods installation instructions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.


### CocoaPods installation

For EarlGrey, we highly recommend [CocoaPods](https://cocoapods.org/) as the best way to get started.
#### Step 1: Set up a Unit target
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unit => Unit test

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

configure_for_earlgrey(installer, PROJECT_NAME, TEST_TARGET, SCHEME_FILE) # EarlGrey Gem Call
end
```
4. Install the EarlGrey gem by doing `gem install earlgrey` and then do the `pod install`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move gem install out to first step.

Then in the step where user is asked to do configure_for_earlgrey, tell them they do it for each target / Scheme.

The very last step should be pod install along with this note:
For compatibility between different versions, please see this doc. To download a particular version of the gem, use gem install earlgrey -v x.y.z.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Notes:
* Call the `configure_for_earlgrey` method for each target / Scheme.
* For compatibility between different versions, please see [this doc](https://github.com/google/EarlGrey/tree/master/docs/versions.md).
To download a particular version of the gem, use `gem install earlgrey -v x.y.z`.

#### Step 3: Run the pod install command
Copy link
Collaborator

Choose a reason for hiding this comment

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

Rename this as you've already done pod install.

Step 3: Open workspace and verify that you see EarlGrey.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

1. Download the source for EarlGrey and its dependencies.
* Download EarlGrey's source code from the [Latest Release](https://github.com/google/EarlGrey/archive/1.0.0.zip)
1. Download the source for EarlGrey and its dependencies.
* Download EarlGrey's source code from the [Latest Release](https://github.com/google/EarlGrey/releases/latest)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not intended correctly here and below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. Changed the indentation throughout.

1. Include the `EarlGrey.swift` file in your Swift Test Project. The file contains functions that
implement C preprocessor macros that aren't available in Swift.
#### Using the [earlgrey gem](https://rubygems.org/gems/earlgrey):
* We recommend uisng the EarlGrey gem to use EarlGrey with Swift.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove this. It's inferred

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

EarlGrey.select(elementWithMatcher: grey_accessibilityID("ClickMe"))
.assert(grey_sufficientlyVisible())
// Select the button with Accessibility ID "clickMe" and assert it's visible.
EarlGrey.select(elementWithMatcher: grey_accessibilityID("ClickMe"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

indentation

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

```

> For compatibility with Swift, we use `grey_allOfMatchers()` and `grey_anyOfMatchers()` instead of `grey_allOf()`
and `grey_anyOf()` respectively.
> For compatibility with Swift, we use `grey_allOfMatchers()` and `grey_anyOfMatchers()` instead
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't need this at all here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

EarlGrey currently supports Swift 3.0 and 2.3. While 3.0 is the default, you can also use 2.3 by adding
`{swift: true, swift_version: 2.3}`.
EarlGrey currently supports Swift 3.0 and 2.3. While 3.0 is the default, you can also use 2.3
by adding `{swift: true, swift_version: 2.3}`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

{swift: true, swift_version: 2.3} where? in Podfile?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed this altogether. Don't think it's needed and the gem docs provide any needed details.

@@ -263,40 +275,39 @@ your test and in your application code and use the built-in tools seamlessly.

### Swift
Copy link
Collaborator

Choose a reason for hiding this comment

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

Get rid of this section and move it closer to where are integrating w/ gem and manual installation when they're integrating with EarlGrey. Makes them optional for swift only.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. Moved the needed sections to the installation steps.

docs/faq.md Outdated
@@ -1,5 +1,14 @@
# FAQ

**I did a fresh `git clone` of the EarlGreyExample CocoaPods Demo project followed by a
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't Hao's changes nullify this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It most certainly will.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Kept it here for now for Hao to update it with the latest changes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

He plans on getting it in for the next release so lets remove this? we might forget to not remove it.

docs/faq.md Outdated
launch screen images present for all supported devices (see
[iOS Developer Library, Launch Files](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/LaunchImages.html)).

**Why does EarlGrey need to modify the test's scheme and add a Copy Files Build Phase?**
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this really one of the FAQ?

In general, we shouldn't add Q's to FAQ section unless they are actually asked frequently. For one-time questions SO is the better option.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add this to ifaq.md for infrequently asked questions? This came up as part of the AWS eval. It'd be nice to have an official answer instead of sending people to SO or Google. Other iOS frameworks don't require this setup so I think it makes sense to explain why this is necessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added an ifaq.md file with this question.

docs/faq.md Outdated
@@ -29,7 +58,7 @@ undefined.” in the logs**

This usually means that EarlGrey is being linked to more than once. Ensure that only the **Test Target**
depends on *EarlGrey.framework* and EarlGrey.framework is embedded in the app under test (i.e. *$TEST_HOST*) from the
test target's build phase.
test target's built products via a Copy File(s) Build Phase.

**Is there a way to return a specific element?**
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be much higher, probably the 2nd from the top. If you're modifying FAQs anyways, I'd suggest look at the existing entries and re-order them based on popularity with highest on the top.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Reordered.

@tirodkar tirodkar force-pushed the docsUpdate branch 5 times, most recently from 2bec234 to 81fe48d Compare March 27, 2017 06:17
docs/faq.md Outdated
of EarlGrey being linked to more than once. Ensure that only the **Test Target**
depends on *EarlGrey.framework* and EarlGrey.framework is embedded in the app under test (i.e. *$TEST_HOST*) from the
test target's build phase.

**How do I check whether an element exists in the UI hierarchy?**
Copy link
Collaborator

Choose a reason for hiding this comment

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

Under How should I handle animations?, there's a code snippet that shows how to speed up animations:
UIApplication.sharedApplication().keyWindow?.layer.speed = 100

Could we change it to use the TestHelper instead?
https://github.com/google/EarlGrey/blob/master/EarlGrey/Common/GREYTestHelper.m

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

docs/ifaq.md Outdated
@@ -0,0 +1,13 @@
#IFAQ - Infrequently Asked Questions
Copy link
Collaborator

Choose a reason for hiding this comment

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

This doesn't render correctly:

https://github.com/tirodkar/EarlGrey/blob/7e5b64c693082b26628d481a1b8e39232474b0f3/docs/ifaq.md

Also are you planning on linking this file to README or from somewhere in FAQ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

README. Adding it.

## Prerequisites

For EarlGrey to function properly, make sure the app under test has correct launch screen images present for all supported devices (see [iOS Developer Library, Launch Files](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/LaunchImages.html)).
test.M
Copy link
Collaborator

Choose a reason for hiding this comment

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

M?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done


### CocoaPods installation
For EarlGrey, we highly recommend [CocoaPods](http://cocoapods.org/pods/EarlGrey) as the best way to get started.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The cocoapods link should point to the section inside this file for Cocoapods installation

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

configure_for_earlgrey(installer, PROJECT_NAME, TEST_TARGET, SCHEME_FILE) # EarlGrey Gem Call
end
```
The EarlGrey gem also copies the `EarlGrey.swift` file to your project directory if you're passing the `{swift: true}` parameter to the args for the configure_for_earlgrey() method.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Show code example for swift users. Majority will be using swift.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Now you're ready to start testing with EarlGrey!
If you need more control, review the available install options.
Now you're ready to start testing with EarlGrey!
If you need more control, review the available installation options in the `earlgrey gem`:
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is earlgrey gem highlighted as code here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed


`earlgrey help install`
`earlgrey help install`

### GitHub Installation

In cases where CocoaPods is not compatible with your project, you can add EarlGrey manually to your Xcode project.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't need to mention cocoapods not being compatible...Just say some like: if cocoapods or carthage don't work you then you can integrate manually.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

"If CocoaPods or Carthage doesn't suit your use case, then you can add EarlGrey manually to your Xcode project."


### GitHub Installation

In cases where CocoaPods is not compatible with your project, you can add EarlGrey manually to your Xcode project.

#### Step 1: Generate EarlGrey.framework

1. Download the source for EarlGrey and its dependencies.
* Download EarlGrey's source code from the [Latest Release](https://github.com/google/EarlGrey/archive/1.0.0.zip)
1. Download the source for EarlGrey.
Copy link
Collaborator

Choose a reason for hiding this comment

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

How is this 1. different from 1. below? Can you please view the files in md viewer and fix all the rendering / layout issues?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed the extra 1.


#### Step 2: Add EarlGrey as a dependency of the project which contains your app under test

1. Close **EarlGrey.xcodeproj** so that it is no longer open in any Xcode window. Once closed, drag **EarlGrey.xcodeproj** from its directory into your App’s project or workspace in Xcode. To verify this, you should find `EarlGrey` in the list of targets of your app in Xcode:
1. Close **EarlGrey.xcodeproj** so that it is no longer
Copy link
Collaborator

Choose a reason for hiding this comment

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

why the abrupt break in line after "no longer" ?


3. Add EarlGrey as a Target Dependency to the Test Target:
```
**Project** → **Test Target** → **Build Phases** → **Link Binary With Libraries** → **+ (Add Sign)** → **EarlGrey.framework**
Copy link
Collaborator

Choose a reason for hiding this comment

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

** isn't bolding the texts

plz view in md viewer and fix such issues. I've spotted a lot of them already.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, ** doesn't work in code blocks. Removed em.

1. Download the source for EarlGrey and its dependencies.
* Download EarlGrey's source code from the [Latest Release](https://github.com/google/EarlGrey/archive/1.0.0.zip)
1. Download EarlGrey's source code from the
[Latest Release](https://github.com/google/EarlGrey/releases/tag/1.8.0).
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets link to https://github.com/google/EarlGrey/releases instead, the latest will be on the top any ways otherwise we will have to keep updating this link

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@khandpur could we confirm this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to hao's idea

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Copy link
Collaborator

@khandpur khandpur left a comment

Choose a reason for hiding this comment

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

Minor nits.

docs/faq.md Outdated
@@ -1,5 +1,14 @@
# FAQ

**I did a fresh `git clone` of the EarlGreyExample CocoaPods Demo project followed by a
Copy link
Collaborator

Choose a reason for hiding this comment

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

He plans on getting it in for the next release so lets remove this? we might forget to not remove it.

README.md Outdated
@@ -46,6 +46,7 @@ You can also start new discussions with us on our [Google group](https://groups.
or request to join our [slack channel](https://googleoss.slack.com/messages/earlgrey).

* [FAQ](https://github.com/google/EarlGrey/tree/master/docs/faq.md)
Copy link
Collaborator

Choose a reason for hiding this comment

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

FAQ - Frequently Asked Questions


```swift
// Objective-C
[GREYTestHelper enableFastAnimation];
```

If the above doesn't help, you can temporarily disable synchronization to work around an animation
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: place the swift code example before objc.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@khandpur khandpur added the lgtm label Mar 30, 2017
@khandpur khandpur merged commit b8c746b into google:master Mar 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants