Browser tests enhanced.

This commit is contained in:
Martin Edenhofer 2016-03-10 08:39:41 +01:00
parent dc8d9b2461
commit ee991e1423
3 changed files with 10 additions and 5 deletions

View file

@ -79,6 +79,8 @@ class AgentTicketActionLevel0Test < TestCase
value: 'Sending', value: 'Sending',
) )
tasks_close_all()
end end
def test_bbb_customer_ticket_create_with_one_group def test_bbb_customer_ticket_create_with_one_group
@ -137,6 +139,8 @@ class AgentTicketActionLevel0Test < TestCase
value: 'one group - some body 1234 äöüß', value: 'one group - some body 1234 äöüß',
) )
tasks_close_all()
end end
def test_ccc_agent_ticket_create_with_more_groups def test_ccc_agent_ticket_create_with_more_groups

View file

@ -4,12 +4,12 @@ require 'browser_test_helper'
class AuthTest < TestCase class AuthTest < TestCase
def test_authentication def test_authentication
@browser = browser_instance @browser = browser_instance
location( url: browser_url ) location(url: browser_url)
match( match(
css: '#login', css: '#login',
value: 'username', value: 'username',
) )
click( css: '#login button' ) click(css: '#login button')
sleep 4 sleep 4
match( match(
@ -22,6 +22,7 @@ class AuthTest < TestCase
username: 'nicole.braun@zammad.org', username: 'nicole.braun@zammad.org',
password: 'test', password: 'test',
) )
tasks_close_all()
# reload page # reload page
reload() reload()
@ -42,7 +43,7 @@ class AuthTest < TestCase
def test_authentication_new_browser_without_permanent_cookie_no_session_should_be def test_authentication_new_browser_without_permanent_cookie_no_session_should_be
@browser = browser_instance @browser = browser_instance
location( url: browser_url ) location(url: browser_url)
match( match(
css: '#login', css: '#login',
value: 'username', value: 'username',
@ -51,7 +52,7 @@ class AuthTest < TestCase
def test_new_browser_with_permanent_cookie_login def test_new_browser_with_permanent_cookie_login
@browser = browser_instance @browser = browser_instance
location( url: browser_url ) location(url: browser_url)
# login with username/password # login with username/password
login( login(

View file

@ -806,7 +806,7 @@ class TestCase < Test::Unit::TestCase
# :name=>"_zammad_session_c25832f4de2", :value=>"adc31cd21615cb0a7ab269184ec8b76f", :path=>"/", :domain=>"localhost", :expires=>nil, :secure=>false} # :name=>"_zammad_session_c25832f4de2", :value=>"adc31cd21615cb0a7ab269184ec8b76f", :path=>"/", :domain=>"localhost", :expires=>nil, :secure=>false}
next if cookie[:name] !~ /#{params[:name]}/i next if cookie[:name] !~ /#{params[:name]}/i
if params.key?(:value ) && cookie[:value].to_s =~ /#{params[:value]}/i if params.key?(:value) && cookie[:value].to_s =~ /#{params[:value]}/i
assert(true, "matching value '#{params[:value]}' in cookie '#{cookie}'") assert(true, "matching value '#{params[:value]}' in cookie '#{cookie}'")
else else
raise "not matching value '#{params[:value]}' in cookie '#{cookie}'" raise "not matching value '#{params[:value]}' in cookie '#{cookie}'"