On 03/15/2010 01:57 PM, Jason Guiditta wrote:
> These tests should now fail, next patch in series will
> make them pass again.  They reflect where the design
> changes will be, so it should be easy to see much of
> what to look for in the next patch.
> ---
>   src/features/authentication.feature             |   22 
> +++++++++++++---------
>   src/features/step_definitions/authentication.rb |    2 +-
>   2 files changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/src/features/authentication.feature 
> b/src/features/authentication.feature
> index add2c95..0dea3ac 100644
> --- a/src/features/authentication.feature
> +++ b/src/features/authentication.feature
> @@ -3,16 +3,20 @@ Feature: User authentication
>     As a user
>     I must register and log in
>
> +  @register
>     Scenario: Register as new user
>       Given I am on the homepage
> -    When I follow "Register"
> +    When I follow "Create one now"
>       Then I should be on the new account page
> +    And I should see "New Account"
>       When I fill in the following:
> -      | login | testuser |
> -      | email    | [email protected] |
> -      | password | secret |
> -      | password confirmation | secret |
> -    And I press "Register"
> +      | Choose a username | testuser             |
> +      | Choose a password | secret               |
> +      | Confirm password  | secret               |
> +      | First name        | Joe                  |
> +      | Last name         | Tester               |
> +      | Email             | [email protected] |
> +    And I press "Create Account"
>       Then I should be on the account page
>       And I should see "User registered!"
>
> @@ -35,7 +39,7 @@ Feature: User authentication
>       And I am on the homepage
>       When I want to edit my profile
>       And I follow "Edit"
> -    Then I should see "Edit My Profile"
> +    Then I should see "Edit my profile"
>       When I fill in "email" with "[email protected]"
>       And I press "Update"
>       Then I should be on the account page
> @@ -47,5 +51,5 @@ Feature: User authentication
>       When I follow "Log out"
>       Then I should be logged out
>       And I should see "Logout successful!"
> -    And I should see "Register"
> -    And I should see "Login"
> +    And I should see "Create one now."
> +    And I should see "Please sign in"
> diff --git a/src/features/step_definitions/authentication.rb 
> b/src/features/step_definitions/authentication.rb
> index e5917ce..92e7874 100644
> --- a/src/features/step_definitions/authentication.rb
> +++ b/src/features/step_definitions/authentication.rb
> @@ -5,7 +5,7 @@ end
>   def login(login, password)
>     user
>     visit path_to("the login page")
> -  fill_in "Login", :with =>  login
> +  fill_in "Username", :with =>  login
>     fill_in "Password", :with =>  password
>     click_button "Login"
>   end
>    
ACK looks good, both 'rake spec' and 'cucumber 
features/authentication.feature' works. I'd remove the commit message 
about 'these tests should now fail' before you push though.

     -Mo
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to