Test stabilization: Once in a while uploads take longer than expected.
This commit is contained in:
parent
12ea65f84f
commit
8172b17733
1 changed files with 26 additions and 3 deletions
|
@ -49,13 +49,20 @@ class AgentTicketAttachmentTest < TestCase
|
||||||
Rails.root.join('test', 'data', 'upload', 'upload2.jpg')],
|
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
|
# submit form
|
||||||
click(css: '.content.active .js-submit')
|
click(css: '.content.active .js-submit')
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
||||||
# no warning
|
|
||||||
#alert = @browser.switch_to.alert
|
|
||||||
|
|
||||||
# check if ticket is shown and attachment exists
|
# check if ticket is shown and attachment exists
|
||||||
location_check(url: '#ticket/zoom/')
|
location_check(url: '#ticket/zoom/')
|
||||||
sleep 2
|
sleep 2
|
||||||
|
@ -95,6 +102,12 @@ class AgentTicketAttachmentTest < TestCase
|
||||||
files: [Rails.root.join('test', 'data', 'upload', 'upload1.txt')],
|
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
|
# submit form
|
||||||
click(css: '.content.active .js-submit')
|
click(css: '.content.active .js-submit')
|
||||||
sleep 2
|
sleep 2
|
||||||
|
@ -137,6 +150,16 @@ class AgentTicketAttachmentTest < TestCase
|
||||||
Rails.root.join('test', 'data', 'upload', 'upload2.jpg')],
|
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
|
# submit form
|
||||||
click(css: '.content.active .js-submit')
|
click(css: '.content.active .js-submit')
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
Loading…
Reference in a new issue