2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2018-12-19 14:47:15 +00:00
|
|
|
RSpec.configure do |config|
|
|
|
|
config.before(:each, type: :system) do |example|
|
|
|
|
# check if system should get set up
|
|
|
|
next if !example.metadata.fetch(:set_up, true)
|
|
|
|
|
2020-05-14 21:32:49 +00:00
|
|
|
# check if system is already set up and perform setup via auto_wizard if needed
|
|
|
|
Rake::Task['zammad:setup:auto_wizard'].execute if !Setting.get('system_init_done')
|
2018-12-19 14:47:15 +00:00
|
|
|
|
|
|
|
# skip intro/clues for created agents/admins
|
2021-08-17 12:10:02 +00:00
|
|
|
%w[admin@example.com agent1@example.com].each do |login|
|
2018-12-19 14:47:15 +00:00
|
|
|
user = User.find_by(login: login)
|
|
|
|
user.preferences[:intro] = true
|
|
|
|
user.save!
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|