Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. scenario 'user has dispatch permission and valid attributes', js: true do
  2. sign_in('jdoe')
  3. page.visit path
  4. page.fill_in 'contact_text_input', with: 'Jimmy'
  5. page.select 'Medium - 3 Hours', from: 'Priority'
  6. page.fill_in 'Created By', with: 'John Doe'
  7. page.click_button 'Create This'
  8. save_and_open_page
  9. expect(page.current_path).to eq("/dispatch")
  10. expect(page).to have_content('This was created successfully')
  11. end
  12.  
  13. def sign_in(username)
  14. page.visit '/'
  15. page.fill_in 'Username', with: username
  16. page.fill_in 'Password', with: 'test'
  17. page.click_button 'Log In'
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement