Improved chat tests.
This commit is contained in:
parent
b4d34bed5b
commit
1a506cd150
4 changed files with 11 additions and 8 deletions
|
@ -102,6 +102,7 @@ class App.ControllerGenericIndex extends App.Controller
|
|||
super
|
||||
|
||||
# set title
|
||||
if @pageData.title
|
||||
@title @pageData.title, true
|
||||
|
||||
# set nav bar
|
||||
|
|
|
@ -85,7 +85,7 @@ class UsersController < ApplicationController
|
|||
group_ids = []
|
||||
role_ids = []
|
||||
if count <= 2
|
||||
Role.where(name: [ Z_ROLENAME_ADMIN, 'Agent', 'Chat', 'CTI']).each { |role|
|
||||
Role.where(name: [ Z_ROLENAME_ADMIN, 'Agent', 'Chat']).each { |role|
|
||||
role_ids.push role.id
|
||||
}
|
||||
Group.all().each { |group|
|
||||
|
|
|
@ -18,8 +18,10 @@ class Setting < ApplicationModel
|
|||
@@lookup_at = nil # rubocop:disable Style/ClassVars
|
||||
@@lookup_timeout = if ENV['ZAMMAD_SETTING_TTL'] # rubocop:disable Style/ClassVars
|
||||
ENV['ZAMMAD_SETTING_TTL'].to_i.seconds
|
||||
else
|
||||
elsif Rails.env.production?
|
||||
2.minutes
|
||||
else
|
||||
15.seconds
|
||||
end
|
||||
|
||||
=begin
|
||||
|
|
|
@ -70,7 +70,7 @@ class ChatTest < TestCase
|
|||
sleep 15 # wait for rerendering
|
||||
switch(
|
||||
browser: agent,
|
||||
css: '#navigation .js-switch',
|
||||
css: '#navigation .js-chatMenuItem .js-switch',
|
||||
type: 'off',
|
||||
)
|
||||
click(
|
||||
|
@ -108,7 +108,7 @@ class ChatTest < TestCase
|
|||
)
|
||||
switch(
|
||||
browser: agent,
|
||||
css: '#navigation .js-switch',
|
||||
css: '#navigation .js-chatMenuItem .js-switch',
|
||||
type: 'on',
|
||||
)
|
||||
reload(
|
||||
|
@ -610,7 +610,7 @@ class ChatTest < TestCase
|
|||
|
||||
exists(
|
||||
browser: agent,
|
||||
css: '#navigation .js-switch input[checked]'
|
||||
css: '#navigation .js-chatMenuItem .js-switch input[checked]'
|
||||
)
|
||||
|
||||
# no customer action, hide widget
|
||||
|
@ -658,11 +658,11 @@ class ChatTest < TestCase
|
|||
# check if agent is offline, idle timeout, chat not answered
|
||||
exists_not(
|
||||
browser: agent,
|
||||
css: '#navigation .js-switch input[checked]'
|
||||
css: '#navigation .js-chatMenuItem .js-switch input[checked]'
|
||||
)
|
||||
switch(
|
||||
browser: agent,
|
||||
css: '#navigation .js-switch',
|
||||
css: '#navigation .js-chatMenuItem .js-switch',
|
||||
type: 'on',
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue