mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
DEV: Remove the use of Capybara::Session#quit
(#24978)
Why this change? This is what `Capybara::Session#quit` does: ``` def quit @driver.quit if @driver.respond_to? :quit @document = @driver = nil @touched = false @server&.reset_error! end ``` One notable thing is that it resets server errors which means that any server errors encountered by a session is cleared. That is not what we want since it hides errors even though `Capybara.raise_server_errors` has been set to `true`.
This commit is contained in:

committed by
GitHub

parent
043fa28fab
commit
68a3f7783e
@ -213,14 +213,13 @@ RSpec.describe "User menu notifications | sidebar", type: :system do
|
||||
channel.send_message("this is fine @#{other_user.username}")
|
||||
find(".invite-link", wait: 5).click
|
||||
|
||||
using_session(:user_1) do |session|
|
||||
using_session(:user_1) do
|
||||
sign_in(other_user)
|
||||
visit("/")
|
||||
find(".header-dropdown-toggle.current-user").click
|
||||
|
||||
expect(find("#user-menu-button-chat-notifications")).to have_content(1)
|
||||
expect(find("#quick-access-all-notifications")).to have_css(".chat-invitation.unread")
|
||||
session.quit
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user