1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/features/step_definitions/membership_application.rb

28 lines
980 B
Ruby
Raw Normal View History

2018-12-13 01:23:12 -05:00
# frozen_string_literal: true
Then 'I see membership application creation form' do
expect(page.current_path).to eq '/membership_apps/new'
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 match %r{\A/membership_apps/\d+\z}
expect(page).to have_css 'h2', text: 'Ваше заявление в обработке'
end
When 'I send a membership application' do
visit '/membership_apps/new'
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