2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2016-07-25 20:57:37 +00:00
|
|
|
require 'browser_test_helper'
|
|
|
|
|
|
|
|
class AutoWizardBrowserTest < TestCase
|
|
|
|
def test_auto_wizard
|
|
|
|
@browser = browser_instance
|
|
|
|
location(url: browser_url)
|
|
|
|
|
|
|
|
watch_for(
|
2018-12-19 17:31:51 +00:00
|
|
|
css: 'body',
|
|
|
|
value: 'auto wizard is enabled',
|
2016-07-25 20:57:37 +00:00
|
|
|
timeout: 10,
|
|
|
|
)
|
|
|
|
|
|
|
|
location(url: "#{browser_url}/#getting_started/auto_wizard")
|
|
|
|
|
|
|
|
watch_for(
|
2018-12-19 17:31:51 +00:00
|
|
|
css: 'body',
|
|
|
|
value: 'auto wizard is enabled',
|
2016-07-25 20:57:37 +00:00
|
|
|
timeout: 10,
|
|
|
|
)
|
|
|
|
|
|
|
|
location(url: "#{browser_url}/#getting_started/auto_wizard/secret_token")
|
|
|
|
|
|
|
|
watch_for(
|
2018-12-19 17:31:51 +00:00
|
|
|
css: '.user-menu .user a',
|
2016-07-25 20:57:37 +00:00
|
|
|
attribute: 'title',
|
2018-12-19 17:31:51 +00:00
|
|
|
value: 'hans.atila@zammad.org',
|
|
|
|
timeout: 20,
|
2016-07-25 20:57:37 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
clues_close
|
|
|
|
|
2018-09-17 07:01:17 +00:00
|
|
|
# wait unless elasticsearch has index all objects from auto wizard
|
|
|
|
sleep 10
|
|
|
|
|
2016-07-25 20:57:37 +00:00
|
|
|
organization_open_by_search(
|
|
|
|
value: 'Demo Organization',
|
|
|
|
)
|
|
|
|
watch_for(
|
2018-12-19 17:31:51 +00:00
|
|
|
css: '.active .profile-window',
|
2016-07-25 20:57:37 +00:00
|
|
|
value: 'Demo Organization',
|
|
|
|
)
|
|
|
|
watch_for(
|
2018-12-19 17:31:51 +00:00
|
|
|
css: '.active .profile-window',
|
2016-07-25 20:57:37 +00:00
|
|
|
value: 'Atila',
|
|
|
|
)
|
|
|
|
|
|
|
|
logout
|
|
|
|
|
|
|
|
login(
|
|
|
|
username: 'hans.atila@zammad.org',
|
|
|
|
password: 'Z4mm4dr0ckZ!',
|
|
|
|
)
|
|
|
|
watch_for(
|
2018-12-19 17:31:51 +00:00
|
|
|
css: '.user-menu .user a',
|
2016-07-25 20:57:37 +00:00
|
|
|
attribute: 'title',
|
2018-12-19 17:31:51 +00:00
|
|
|
value: 'hans.atila@zammad.org',
|
|
|
|
timeout: 8,
|
2016-07-25 20:57:37 +00:00
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|