Alex's Slip-box

These are my org-mode notes in sort of Zettelkasten style

capybara window management

See this SO Answer

  • window_opened_by method with block passed that contains the action that will open a new browser window.
  • within_window the switch to a window context to run expections
1: new_window = window_opened_by { click_link 'will open a new window' }
2: within_window new_window do
3:   expect(page).to have_current_path '/new/window/url'
4: end