Improved tests.

This commit is contained in:
Martin Edenhofer 2016-02-02 13:11:44 +01:00
parent cf0f65ff7a
commit d530152509
3 changed files with 6 additions and 4 deletions

View file

@ -145,6 +145,7 @@ class FormTest < TestCase
browser: customer, browser: customer,
css: 'body div.modal .js-close', css: 'body div.modal .js-close',
) )
sleep 1
exists_not( exists_not(
browser: customer, browser: customer,
css: 'body div.modal', css: 'body div.modal',
@ -246,6 +247,7 @@ class FormTest < TestCase
browser: customer, browser: customer,
css: 'body div.modal .js-close', css: 'body div.modal .js-close',
) )
sleep 1
exists_not( exists_not(
browser: customer, browser: customer,
css: 'body div.modal', css: 'body div.modal',

View file

@ -187,7 +187,7 @@ class TwitterBrowserTest < TestCase
) )
# wait till new streaming of channel is active # wait till new streaming of channel is active
sleep 50 sleep 60
# start tweet from customer # start tweet from customer
client = Twitter::REST::Client.new do |config| client = Twitter::REST::Client.new do |config|
@ -216,7 +216,7 @@ class TwitterBrowserTest < TestCase
watch_for( watch_for(
css: '.content.active', css: '.content.active',
value: hash, value: hash,
timeout: 24, timeout: 36,
) )
ticket_open_by_title( ticket_open_by_title(

View file

@ -185,7 +185,7 @@ class TwitterTest < ActiveSupport::TestCase
) )
# fetch check system account # fetch check system account
sleep 15 sleep 20
article = nil article = nil
(1..3).each { (1..3).each {
Channel.fetch Channel.fetch
@ -193,7 +193,7 @@ class TwitterTest < ActiveSupport::TestCase
# check if ticket and article has been created # check if ticket and article has been created
article = Ticket::Article.find_by(message_id: tweet.id) article = Ticket::Article.find_by(message_id: tweet.id)
break if article break if article
sleep 15 sleep 20
} }
assert(article) assert(article)
assert_equal('@me_bauer', article.from, 'ticket article from') assert_equal('@me_bauer', article.from, 'ticket article from')