Fixed tests.
This commit is contained in:
parent
5b1a481cf1
commit
c6ee93d2d5
|
@ -102,10 +102,6 @@ class String
|
|||
|
||||
# remove style tags with content
|
||||
string.gsub!( %r{<style(|\s.+?)>(.+?)</style>}im, '')
|
||||
|
||||
# insert spaces on [A-z]\n[A-z]
|
||||
string.gsub!( /([A-z])\n([A-z])/m, '\1 \2' )
|
||||
|
||||
# remove empty lines
|
||||
string.gsub!( /^\s*/m, '' )
|
||||
|
||||
|
@ -117,6 +113,9 @@ class String
|
|||
placeholder = placeholder.gsub(/\n/, '###BR###')
|
||||
}
|
||||
|
||||
# insert spaces on [A-z]\n[A-z]
|
||||
string.gsub!( /([A-z])\n([A-z])/m, '\1 \2' )
|
||||
|
||||
# remove all new lines
|
||||
string.gsub!(/(\n\r|\r\r\n|\r\n|\n)/, '')
|
||||
|
||||
|
|
|
@ -186,6 +186,7 @@ class ChatTest < TestCase
|
|||
browser: agent,
|
||||
css: 'a[href="#customer_chat"]',
|
||||
)
|
||||
agent.find_elements( { css: '.active .chat-window .js-disconnect' } ).each(&:click)
|
||||
agent.find_elements( { css: '.active .chat-window .js-close' } ).each(&:click)
|
||||
|
||||
customer = browser_instance
|
||||
|
@ -273,7 +274,7 @@ class ChatTest < TestCase
|
|||
watch_for(
|
||||
browser: agent,
|
||||
css: '.active .chat-window',
|
||||
value: 'has closed the conversation',
|
||||
value: 'closed the conversation',
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -292,6 +293,7 @@ class ChatTest < TestCase
|
|||
browser: agent,
|
||||
css: 'a[href="#customer_chat"]',
|
||||
)
|
||||
agent.find_elements( { css: '.active .chat-window .js-disconnect' } ).each(&:click)
|
||||
agent.find_elements( { css: '.active .chat-window .js-close' } ).each(&:click)
|
||||
|
||||
customer = browser_instance
|
||||
|
@ -373,6 +375,10 @@ class ChatTest < TestCase
|
|||
css: '.zammad-chat',
|
||||
value: 'my name is me',
|
||||
)
|
||||
click(
|
||||
browser: agent,
|
||||
css: '.active .chat-window .js-disconnect',
|
||||
)
|
||||
click(
|
||||
browser: agent,
|
||||
css: '.active .chat-window .js-close',
|
||||
|
@ -395,6 +401,7 @@ class ChatTest < TestCase
|
|||
browser: customer,
|
||||
css: '.zammad-chat-is-open',
|
||||
)
|
||||
agent.find_elements( { css: '.active .chat-window .js-disconnect' } ).each(&:click)
|
||||
agent.find_elements( { css: '.active .chat-window .js-close' } ).each(&:click)
|
||||
sleep 2
|
||||
click(
|
||||
|
@ -440,6 +447,7 @@ class ChatTest < TestCase
|
|||
browser: agent,
|
||||
css: 'a[href="#customer_chat"]',
|
||||
)
|
||||
agent.find_elements( { css: '.active .chat-window .js-disconnect' } ).each(&:click)
|
||||
agent.find_elements( { css: '.active .chat-window .js-close' } ).each(&:click)
|
||||
|
||||
# set chat preferences
|
||||
|
@ -555,7 +563,7 @@ class ChatTest < TestCase
|
|||
watch_for(
|
||||
browser: agent,
|
||||
css: '.active .chat-window',
|
||||
value: 'has closed the conversation',
|
||||
value: 'closed the conversation',
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -574,6 +582,7 @@ class ChatTest < TestCase
|
|||
browser: agent,
|
||||
css: 'a[href="#customer_chat"]',
|
||||
)
|
||||
agent.find_elements( { css: '.active .chat-window .js-disconnect' } ).each(&:click)
|
||||
agent.find_elements( { css: '.active .chat-window .js-close' } ).each(&:click)
|
||||
|
||||
exists(
|
||||
|
|
|
@ -606,7 +606,7 @@ Registration AG Ulm HRB 534075 * General Manager Holger Felgner
|
|||
},
|
||||
{
|
||||
data: IO.read('test/fixtures/mail30.box'),
|
||||
body_md5: '23220f9537e59a8febc62705aa1c387c',
|
||||
body_md5: 'b4038e70d25854a023bce604c9f7a7ff',
|
||||
params: {
|
||||
from: 'Manfred Haert <Manfred.Haert@example.com>',
|
||||
from_email: 'Manfred.Haert@example.com',
|
||||
|
|
Loading…
Reference in a new issue