Improved tests.

This commit is contained in:
Martin Edenhofer 2016-06-10 00:25:13 +02:00
parent 7bd6731a23
commit a93fe5b807
4 changed files with 7 additions and 5 deletions

View file

@ -88,9 +88,12 @@ class AgentTicketActionLevel0Test < TestCase
# customer ticket create # customer ticket create
click(css: 'a[href="#new"]') click(css: 'a[href="#new"]')
click(css: 'a[href="#customer_ticket_new"]', wait: 5) click(css: 'a[href="#customer_ticket_new"]')
exists(css: '.newTicket') watch_for(
css: '.newTicket',
value: 'New Ticket',
)
exists_not(css: '.newTicket select[name="group_id"]') exists_not(css: '.newTicket select[name="group_id"]')
set( set(

View file

@ -115,7 +115,6 @@ class FirstStepsTest < TestCase
css: '#content .js-formSetting', css: '#content .js-formSetting',
type: 'on', type: 'on',
) )
sleep 2
click(css: '#navigation a[href="#dashboard"]') click(css: '#navigation a[href="#dashboard"]')
hit = false hit = false
(1..38).each { (1..38).each {

View file

@ -29,7 +29,6 @@ class FormTest < TestCase
css: '#content .js-formSetting', css: '#content .js-formSetting',
type: 'off', type: 'off',
) )
sleep 2
customer = browser_instance customer = browser_instance
location( location(
@ -47,7 +46,6 @@ class FormTest < TestCase
css: '#content .js-formSetting', css: '#content .js-formSetting',
type: 'on', type: 'on',
) )
sleep 2
reload( reload(
browser: customer, browser: customer,

View file

@ -649,9 +649,11 @@ class TestCase < Test::Unit::TestCase
if !checked if !checked
if params[:type] == 'on' if params[:type] == 'on'
instance.find_elements(css: "#{params[:css]} label")[0].click instance.find_elements(css: "#{params[:css]} label")[0].click
sleep 2
end end
elsif params[:type] == 'off' elsif params[:type] == 'off'
instance.find_elements(css: "#{params[:css]} label")[0].click instance.find_elements(css: "#{params[:css]} label")[0].click
sleep 2
end end
end end