Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Addidng additional examples to step definitons #127

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

sajjadhossain
Copy link

added additional documents, added examples to all step definitions for additional clarity when running 'behat -di' or 'behat -dl'

Sajjad Hossain and others added 3 commits June 1, 2015 15:13
… additional clarity when running 'behat -di' or 'behat -dl'
… additional clarity when running 'behat -di' or 'behat -dl'
Oops, added hardcoded url possibly causing tests to fail
@sajjadhossain
Copy link
Author

Seems scrutenizer is failing at the below step which may be unrelated:

Installing SSH Keys 00:01
The command exited with code 1.

@sanpii
Copy link
Member

sanpii commented Jun 3, 2015

Can you split your PR in two: on for the documentation for existing steps, second for new steps.

Don’t forget to add tests for the new steps.

@sajjadhossain
Copy link
Author

Sure thing, thanks for the feedback. As for tests around the new steps I assume you mean unit tests, which I am still unfamiliar with. Is there any way you can point me to an article or lesson of sorts that will make that learning-curve less intense? I've worked with PHPUnit with a very limited scope in my prior work.

@sanpii
Copy link
Member

sanpii commented Jun 3, 2015

As for tests around the new steps I assume you mean unit tests

No, a behat tests. See tests/features/browser.feature

@sajjadhossain
Copy link
Author

Sure, thats cake! thanks!!! Also your context work is great and has taught me a lot!!!

@sajjadhossain
Copy link
Author

Ok so i added tests in browser.feature. Specifically:

Scenario: Regression for new step definitions added by sajjadhossain on 6/5/15
    Given I am on "/"
    And I am on a new session
    And I set my browser window size to 15 inch MacBook Retina
    And I set my browser window size to "500" x "500"
    When I go to "https://github.com/Behatch/contexts"
    And I scroll to the bottom
    And I scroll to the top
    When I go to "http://www.javascripter.net/faq/alert.htm"
    And I press "Try it now"
    And I confirm the popup
    Then I should see "Alert: Modal Message Box"

I also did some grammatical changes and follow @stof 's recommendations for examples and methods. Let me know if there is anything else I can do! Thanks again!

@sajjadhossain
Copy link
Author

Hmm thats odd, @sanpii I cant reproduce that error, mink allows me to resize my windows for all my tests using your context... I use the same implementation for my instance of Behat.

And I set my browser window size to 15 inch MacBook Retina # tests/features/browser.feature:86
  Window resizing is not supported by Behat\Mink\Driver\GoutteDriver (Behat\Mink\Exception\UnsupportedDriverActionException)

@sajjadhossain
Copy link
Author

@sanpii LMK if this addresses your initial concerns or if anything needs to be revisited, Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants