We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, setting test adapter globally breaks multisession Capybara Action Cable tests.
We can add a share context to use another adapter (e.g. async) for specific tests and (optionally) include it to type: :feature specs:
type: :feature
context "multiple sessions", action_cable: :async do scenario "all users see new question in real-time" do Capybara.using_session('author') do sign_in(user) visit questions_path end Capybara.using_session('guest') do visit questions_path end Capybara.using_session('author') do page.find("#add_question_btn").trigger('click') fill_in 'Title', with: 'Test question' fill_in 'Body', with: 'test text' click_on 'Save' expect(page).to have_content 'Test question' expect(page).to have_content 'test text' end Capybara.using_session('guest') do expect(page).to have_content 'Test question' expect(page).to_not have_content 'No questions found(' end end end
The text was updated successfully, but these errors were encountered:
[Closes #4] Add shared contexts to switch between adapters
2399fd3
1717f6a
ab17c98
No branches or pull requests
Currently, setting test adapter globally breaks multisession Capybara Action Cable tests.
We can add a share context to use another adapter (e.g. async) for specific tests and (optionally) include it to
type: :feature
specs:The text was updated successfully, but these errors were encountered: