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