Test stabilization: Once in a while uploads take longer than expected.

This commit is contained in:
Thorsten Eckel 2018-07-06 09:14:53 +02:00
parent 12ea65f84f
commit 8172b17733

View file

@ -49,13 +49,20 @@ class AgentTicketAttachmentTest < TestCase
Rails.root.join('test', 'data', 'upload', 'upload2.jpg')],
)
# upload might take a while
watch_for(
css: '.content.active .newTicket .attachments',
value: 'upload1.txt',
)
watch_for(
css: '.content.active .newTicket .attachments',
value: 'upload2.jpg',
)
# submit form
click(css: '.content.active .js-submit')
sleep 5
# no warning
#alert = @browser.switch_to.alert
# check if ticket is shown and attachment exists
location_check(url: '#ticket/zoom/')
sleep 2
@ -95,6 +102,12 @@ class AgentTicketAttachmentTest < TestCase
files: [Rails.root.join('test', 'data', 'upload', 'upload1.txt')],
)
# upload might take a while
watch_for(
css: '.content.active .article-add .attachments',
value: 'upload1.txt',
)
# submit form
click(css: '.content.active .js-submit')
sleep 2
@ -137,6 +150,16 @@ class AgentTicketAttachmentTest < TestCase
Rails.root.join('test', 'data', 'upload', 'upload2.jpg')],
)
# upload might take a while
watch_for(
css: '.content.active .article-add .attachments',
value: 'upload1.txt',
)
watch_for(
css: '.content.active .article-add .attachments',
value: 'upload2.jpg',
)
# submit form
click(css: '.content.active .js-submit')
sleep 2