1
0
Fork 0

Remove unnecessary step definitions

This commit is contained in:
Alex Kotov 2019-05-03 13:00:05 +05:00
parent a06c78c915
commit 92893381e2
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
3 changed files with 0 additions and 88 deletions

View File

@ -8,27 +8,3 @@ Then 'I see the main page' do
expect(page.current_path).to eq '/'
expect(page).to have_css 'h1', text: 'Либертарианская партия России'
end
Then 'I see the join button' do
expect(page).to have_link 'Вступить'
end
Then 'I do not see the join button' do
expect(page).not_to have_link 'Вступить'
end
When 'I click the join button' do
click_on 'Вступить'
end
Then 'I see the membership application button' do
expect(page).to have_link 'Ваше заявление'
end
Then 'I do not see the membership application button' do
expect(page).not_to have_link 'Ваше заявление'
end
When 'I click the membership application button' do
click_on 'Ваше заявление'
end

View File

@ -1,61 +0,0 @@
# frozen_string_literal: true
Then 'I see membership application creation form' do
expect(page.current_path).to eq '/join'
expect(page).to have_field 'Фамилия'
expect(page).to have_field 'Имя'
expect(page).to have_field 'Отчество'
end
Then 'I see the membership application tracking page' do
expect(page.current_path).to eq '/application'
expect(page).to have_css 'h1', text: 'Ваше заявление в обработке'
expect(page).to have_css(
'p.lead',
text: <<~TEXT.split("\n").join(' '),
На данной странице вы можете отслеживать статус вашего заявления.
Сохраните её в закладки браузера. Также на указанный вами адрес
электронной почты была отправлена ссылка на данную страницу.
В ближайшее время с вами свяжутся по указанным вами контактам.
TEXT
)
end
Then 'I see that I am already a party supporter' do
expect(page.current_path).to eq '/application'
expect(page).to have_css 'h1', text: 'Поздравляем!'
expect(page).to have_css 'p.lead',
text: 'Вы уже являетесь сторонником ' \
'Либертарианской партии России!'
end
Then 'I see that I am already a party member' do
expect(page.current_path).to eq '/application'
expect(page).to have_css 'h1', text: 'Поздравляем!'
expect(page).to have_css 'p.lead',
text: 'Вы уже являетесь членом ' \
'Либертарианской партии России!'
end
Then 'I see that I am excluded from party' do
expect(page.current_path).to eq '/application'
expect(page).to have_css 'h1', text: 'Вы исключены из партии'
expect(page).to have_css 'p.lead',
text: 'Вы были исключены из ' \
'Либертарианской партии России ' \
'и не можете подать заявление на вступление.'
end
When 'I send a membership application' do
visit '/join'
within 'form' do
fill_in 'Фамилия', with: Faker::Name.last_name
fill_in 'Имя', match: :prefer_exact, with: Faker::Name.first_name
fill_in 'Адрес электронной почты', with: Faker::Internet.email
fill_in 'Телефон', with: Faker::PhoneNumber.phone_number
click_on 'Отправить заявление'
end
end

View File

@ -58,7 +58,6 @@ end
Given 'I am signed in as party supporter' do
@person = create :supporter_person
@account = create :usual_account, person: @person
create :membership_app, account: @account
visit '/users/sign_in'
@ -75,7 +74,6 @@ end
Given 'I am signed in as party member' do
@person = create :member_person
@account = create :usual_account, person: @person
create :membership_app, account: @account
visit '/users/sign_in'
@ -92,7 +90,6 @@ end
Given 'I am signed in as excluded party member' do
@person = create :excluded_person
@account = create :usual_account, person: @person
create :membership_app, account: @account
visit '/users/sign_in'