Add feature "Sign up"
This commit is contained in:
parent
7e9864e021
commit
7e41039609
|
@ -0,0 +1,11 @@
|
|||
Feature: Sign up
|
||||
Background:
|
||||
Given I visit sign up page
|
||||
|
||||
Scenario:
|
||||
When I fill form with the following data:
|
||||
| Email | user@example.com |
|
||||
| Пароль | q1w2e3r4t5y6 |
|
||||
| Подтверждение пароля | q1w2e3r4t5y6 |
|
||||
And I click the form button "Регистрация"
|
||||
Then I see main page
|
|
@ -4,6 +4,24 @@ When 'I visit main page' do
|
|||
visit '/'
|
||||
end
|
||||
|
||||
When 'I visit sign up page' do
|
||||
visit '/users/sign_up'
|
||||
end
|
||||
|
||||
When 'I fill form with the following data:' do |table|
|
||||
within 'form' do
|
||||
table.rows.each do |(key, value)|
|
||||
fill_in key, with: value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
When 'I click the form button {string}' do |string|
|
||||
within 'form' do
|
||||
click_on string
|
||||
end
|
||||
end
|
||||
|
||||
Then 'I see main page' do
|
||||
expect(page).to have_css(
|
||||
'h1',
|
||||
|
|
Reference in New Issue