mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +02:00
Added Registrar feature tests
This commit is contained in:
parent
bcb283e2f1
commit
45bed63cad
12 changed files with 218 additions and 25 deletions
18
spec/support/registrar_helpers.rb
Normal file
18
spec/support/registrar_helpers.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
module RegistrarHelpers
|
||||
def registrar_sign_in(_user = nil)
|
||||
# TODO: try to make it run with before :all and speed it up
|
||||
visit registrar_login_path
|
||||
page.should have_css('a[href="/registrar/login/mid"]')
|
||||
|
||||
page.find('a[href="/registrar/login/mid"]').click
|
||||
|
||||
fill_in 'user_phone', with: '00007'
|
||||
click_button 'Log in'
|
||||
|
||||
page.should have_text('Log out')
|
||||
end
|
||||
end
|
||||
|
||||
RSpec.configure do |c|
|
||||
c.include RegistrarHelpers, type: :feature
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue