42 lines
1.5 KiB
Gherkin
42 lines
1.5 KiB
Gherkin
Feature: Sign up as user using facebook
|
|
Note that facebook is automatically signing in
|
|
|
|
@javascript
|
|
Scenario: Happy flow
|
|
Given there is no user information stored in the local storage
|
|
When I visit the user obtain token path
|
|
Then I should be signed in as a user through facebook
|
|
When I wait 4 seconds
|
|
Then I should be redirected to the user home
|
|
And the newly created user info should be stored in the local storage
|
|
|
|
@javascript
|
|
Scenario: Already signed in user visits obtain token path
|
|
Given I am signed in as a user
|
|
When I visit '/user'
|
|
And I wait 4 seconds
|
|
Then I should be redirected to the user home
|
|
And the newly created user info should be stored in the local storage
|
|
|
|
@javascript
|
|
Scenario: Expired token
|
|
Given I visit '/user'
|
|
And I wait 4 seconds
|
|
And I am signed out as a user
|
|
When the user authentication token changes
|
|
And I visit '/user'
|
|
And I wait 4 seconds
|
|
Then the newly created user info should be stored in the local storage
|
|
|
|
@javascript
|
|
Scenario: Authenciation when there is a list already active
|
|
Given there is a confirmed and open supplier
|
|
And there is a facebook user
|
|
And the user has an active order
|
|
When I visit the user obtain token path
|
|
And I wait 1 second
|
|
Then the user should be redirected to the user order overview page
|
|
|
|
Scenario: Facebook problem OmniAuth.config.mock_auth[:facebook] = :invalid_credentials
|
|
Scenario: Valid facebook login, but declines information requested by scope
|