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
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"]')
set(

View file

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

View file

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

View file

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