Improved finish of import.
This commit is contained in:
parent
ea10d24c38
commit
e779f459b4
3 changed files with 16 additions and 17 deletions
|
@ -18,6 +18,12 @@ class Index extends App.ControllerContent
|
|||
|
||||
@fetch()
|
||||
|
||||
@bind('import:finished', =>
|
||||
console.log('import:finished')
|
||||
@Config.set('system_init_done', true)
|
||||
@navigate '#'
|
||||
)
|
||||
|
||||
fetch: ->
|
||||
|
||||
# get data
|
||||
|
@ -79,7 +85,6 @@ class Index extends App.ControllerContent
|
|||
success: (data, status, xhr) =>
|
||||
|
||||
# validate form
|
||||
console.log(data)
|
||||
if data.result is 'ok'
|
||||
@urlStatus.attr('data-state', 'success')
|
||||
@linkErrorMessage.text('')
|
||||
|
@ -103,7 +108,6 @@ class Index extends App.ControllerContent
|
|||
success: (data, status, xhr) =>
|
||||
|
||||
# validate form
|
||||
console.log(data)
|
||||
if data.result is 'ok'
|
||||
@delay( @updateMigration, 3000 )
|
||||
)
|
||||
|
|
|
@ -412,6 +412,11 @@ module Import::OTRS
|
|||
Setting.set('system_init_done', true)
|
||||
Setting.set('import_mode', false)
|
||||
|
||||
# broadcast import finish
|
||||
Sessions.broadcast(
|
||||
event: 'import:finished',
|
||||
)
|
||||
|
||||
true
|
||||
end
|
||||
|
||||
|
|
|
@ -20,9 +20,9 @@ class OtrsImportBrowserTest < TestCase
|
|||
|
||||
click(css: 'a[href="#import/otrs"]')
|
||||
|
||||
click(css: 'a.js-download')
|
||||
click(css: '.js-download')
|
||||
|
||||
click(css: 'a.js-otrs-link')
|
||||
click(css: '.js-otrs-link')
|
||||
|
||||
set(
|
||||
css: '#otrs-link',
|
||||
|
@ -33,24 +33,14 @@ class OtrsImportBrowserTest < TestCase
|
|||
css: 'svg.icon-checkmark'
|
||||
)
|
||||
|
||||
click(css: 'a.js-migration-start')
|
||||
click(css: '.js-migration-start')
|
||||
|
||||
watch_for(
|
||||
css: 'body',
|
||||
value: 'xxxx',
|
||||
timeout: 10,
|
||||
value: 'login',
|
||||
timeout: 300,
|
||||
)
|
||||
|
||||
# click import
|
||||
|
||||
# click otrs
|
||||
|
||||
# enter otrs url + key
|
||||
|
||||
# watch for import start
|
||||
|
||||
# watch for import end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue