diff --git a/app/assets/javascripts/app/controllers/import_freshdesk.coffee b/app/assets/javascripts/app/controllers/import_freshdesk.coffee index 8f1ac6c21..e09c8b8eb 100644 --- a/app/assets/javascripts/app/controllers/import_freshdesk.coffee +++ b/app/assets/javascripts/app/controllers/import_freshdesk.coffee @@ -164,7 +164,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_kayako.coffee b/app/assets/javascripts/app/controllers/import_kayako.coffee index 49ebb5765..781a705fd 100644 --- a/app/assets/javascripts/app/controllers/import_kayako.coffee +++ b/app/assets/javascripts/app/controllers/import_kayako.coffee @@ -165,7 +165,7 @@ class ImportKayako 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 57fd72f7c..63feda5dd 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 34630bead..bbead178e 100644 --- a/spec/system/import/freshdesk_spec.rb +++ b/spec/system/import/freshdesk_spec.rb @@ -113,6 +113,12 @@ RSpec.describe 'Import Freshdesk', type: :system, set_up: false, authenticated_a Rake::Task['zammad:setup:auto_wizard'].execute 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/kayako_spec.rb b/spec/system/import/kayako_spec.rb index ce226033e..8ffcbafc8 100644 --- a/spec/system/import/kayako_spec.rb +++ b/spec/system/import/kayako_spec.rb @@ -113,12 +113,18 @@ RSpec.describe 'Import Kayako', type: :system, set_up: false, authenticated_as: .and(have_css('.js-tickets .js-total', text: '5')) end - it 'shows login after import is finished' do + it 'shows login after import is finished and process login' do job.update! finished_at: Time.zone.now Rake::Task['zammad:setup:auto_wizard'].execute 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 60ab45af7..4eff59b34 100644 --- a/spec/system/import/zendesk_spec.rb +++ b/spec/system/import/zendesk_spec.rb @@ -122,6 +122,12 @@ RSpec.describe 'Import Zendesk', type: :system, set_up: false, authenticated_as: Rake::Task['zammad:setup:auto_wizard'].execute 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