diff --git a/app/assets/javascripts/app/controllers/import_freshdesk.coffee b/app/assets/javascripts/app/controllers/import_freshdesk.coffee index 42b16e066..910aec332 100644 --- a/app/assets/javascripts/app/controllers/import_freshdesk.coffee +++ b/app/assets/javascripts/app/controllers/import_freshdesk.coffee @@ -165,7 +165,7 @@ class ImportFreshdesk extends App.ControllerWizardFullScreen @$('.js-error').addClass('hide') if !_.isEmpty(data.finished_at) && _.isEmpty(data.result['error']) - window.location.reload() + @redirectToLogin() return if !_.isEmpty(data.result) diff --git a/app/assets/javascripts/app/controllers/import_zendesk.coffee b/app/assets/javascripts/app/controllers/import_zendesk.coffee index a9ac9932b..8d982a5b5 100644 --- a/app/assets/javascripts/app/controllers/import_zendesk.coffee +++ b/app/assets/javascripts/app/controllers/import_zendesk.coffee @@ -163,7 +163,7 @@ class ImportZendesk extends App.ControllerWizardFullScreen @$('.js-error').addClass('hide') if !_.isEmpty(data.finished_at) && _.isEmpty(data.result['error']) - window.location.reload() + @redirectToLogin() return if !_.isEmpty(data.result) diff --git a/spec/system/import/freshdesk_spec.rb b/spec/system/import/freshdesk_spec.rb index e5fc58ba6..f0771b515 100644 --- a/spec/system/import/freshdesk_spec.rb +++ b/spec/system/import/freshdesk_spec.rb @@ -112,7 +112,13 @@ RSpec.describe 'Import Freshdesk', type: :system, set_up: false, authenticated_a Rake::Task['zammad:setup:auto_wizard'].execute - expect(page).to have_text('Login') + expect(page).to have_text(Setting.get('fqdn')) + + # Check that the login is working and also the left navigation side bar is visible. + login( + username: 'admin@example.com', + password: 'test', + ) end end end diff --git a/spec/system/import/zendesk_spec.rb b/spec/system/import/zendesk_spec.rb index 40058452e..f9db78fdb 100644 --- a/spec/system/import/zendesk_spec.rb +++ b/spec/system/import/zendesk_spec.rb @@ -121,7 +121,13 @@ RSpec.describe 'Import Zendesk', type: :system, set_up: false, authenticated_as: Rake::Task['zammad:setup:auto_wizard'].execute - expect(page).to have_text('Login') + expect(page).to have_text(Setting.get('fqdn')) + + # Check that the login is working and also the left navigation side bar is visible. + login( + username: 'admin@example.com', + password: 'test', + ) end end end