0
0
Fork 0

Fix log out from user menu not working on Safari (#31402)

This commit is contained in:
Renaud Chaput 2024-08-13 19:49:23 +02:00 committed by GitHub
parent 2b1670da48
commit c3e1d86d58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 102 additions and 34 deletions

View file

@ -0,0 +1,43 @@
# frozen_string_literal: true
require 'rails_helper'
describe 'Log out' do
include ProfileStories
before do
as_a_logged_in_user
end
describe 'Logging out from the preferences' do
it 'logs the user out' do
visit settings_path
within '.sidebar' do
click_on 'Logout'
end
expect(page).to have_title(I18n.t('auth.login'))
expect(page).to have_current_path('/auth/sign_in')
end
end
describe 'Logging out from the JS app', :js, :streaming do
it 'logs the user out' do
visit root_path
within '.navigation-bar' do
click_on 'Menu'
end
within '.dropdown-menu' do
click_on 'Logout'
end
click_on 'Log out'
expect(page).to have_title(I18n.t('auth.login'))
expect(page).to have_current_path('/auth/sign_in')
end
end
end