Fixed bug: Results have to get compared in the browser since the backend runs in the test mode and the frontend in production.
This commit is contained in:
parent
0acedd39c2
commit
3202f8a51a
2 changed files with 29 additions and 10 deletions
|
@ -151,7 +151,11 @@ class Index extends App.ControllerContent
|
||||||
success: (data, status, xhr) =>
|
success: (data, status, xhr) =>
|
||||||
|
|
||||||
if data.result is 'import_done'
|
if data.result is 'import_done'
|
||||||
window.location.reload()
|
delay = 0
|
||||||
|
if @Config.get('developer_mode') is true
|
||||||
|
delay = 5000
|
||||||
|
|
||||||
|
@delay(window.location.reload, delay)
|
||||||
return
|
return
|
||||||
|
|
||||||
if data.result is 'error'
|
if data.result is 'error'
|
||||||
|
|
|
@ -79,17 +79,32 @@ class ZendeskImportBrowserTest < TestCase
|
||||||
click(css: '.js-migration-start')
|
click(css: '.js-migration-start')
|
||||||
|
|
||||||
watch_for(
|
watch_for(
|
||||||
css: 'body',
|
css: '.js-group .js-done',
|
||||||
value: 'login',
|
value: '2',
|
||||||
|
timeout: 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
watch_for(
|
||||||
|
css: '.js-organization .js-done',
|
||||||
|
value: '1',
|
||||||
|
timeout: 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
watch_for(
|
||||||
|
css: '.js-user .js-done',
|
||||||
|
value: '141',
|
||||||
|
timeout: 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
watch_for(
|
||||||
|
css: '.js-ticket .js-done',
|
||||||
|
value: '143',
|
||||||
timeout: 300,
|
timeout: 300,
|
||||||
)
|
)
|
||||||
|
|
||||||
assert_equal( 143, User.count, 'users' )
|
watch_for(
|
||||||
assert_equal( 3, Group.count, 'groups' )
|
css: 'body',
|
||||||
assert_equal( 5, Role.count, 'roles' )
|
value: 'login',
|
||||||
assert_equal( 2, Organization.count, 'organizations' )
|
)
|
||||||
assert_equal( 144, Ticket.count, 'tickets' )
|
|
||||||
assert_equal( 151, Ticket::Article.count, 'ticket articles' )
|
|
||||||
assert_equal( 2, Store.count, 'ticket article attachments' )
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue