Add feature "Sign in"
This commit is contained in:
parent
cc34db6591
commit
a88709d1db
2 changed files with 16 additions and 0 deletions
12
features/sign_in.feature
Normal file
12
features/sign_in.feature
Normal file
|
@ -0,0 +1,12 @@
|
|||
Feature: Sign in
|
||||
Background:
|
||||
Given I visit "/users/sign_in"
|
||||
|
||||
Scenario:
|
||||
When I fill form with the following data:
|
||||
| key | value |
|
||||
| Email | user@example.com |
|
||||
| Пароль | q1w2e3r4t5y6 |
|
||||
And I click the form button "Войти"
|
||||
Then I see main page
|
||||
And I am logged in as "user@example.com"
|
|
@ -18,6 +18,10 @@ When 'I click the form button {string}' do |string|
|
|||
end
|
||||
end
|
||||
|
||||
Then 'I am logged in as {string}' do |string|
|
||||
expect(page).to have_css 'span.navbar-text', text: string
|
||||
end
|
||||
|
||||
Then 'I see main page' do
|
||||
expect(page).to have_css(
|
||||
'h1',
|
||||
|
|
Reference in a new issue