1
0
Fork 0

Add feature "Sign in"

This commit is contained in:
Alex Kotov 2018-12-01 05:52:13 +05:00
parent cc34db6591
commit a88709d1db
No known key found for this signature in database
GPG key ID: 4E831250F47DE154
2 changed files with 16 additions and 0 deletions

12
features/sign_in.feature Normal file
View 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"

View file

@ -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',