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',
)
tasks_close_all()
end
def test_bbb_customer_ticket_create_with_one_group
@ -137,6 +139,8 @@ class AgentTicketActionLevel0Test < TestCase
value: 'one group - some body 1234 äöüß',
)
tasks_close_all()
end
def test_ccc_agent_ticket_create_with_more_groups

View file

@ -4,12 +4,12 @@ require 'browser_test_helper'
class AuthTest < TestCase
def test_authentication
@browser = browser_instance
location( url: browser_url )
location(url: browser_url)
match(
css: '#login',
value: 'username',
)
click( css: '#login button' )
click(css: '#login button')
sleep 4
match(
@ -22,6 +22,7 @@ class AuthTest < TestCase
username: 'nicole.braun@zammad.org',
password: 'test',
)
tasks_close_all()
# reload page
reload()
@ -42,7 +43,7 @@ class AuthTest < TestCase
def test_authentication_new_browser_without_permanent_cookie_no_session_should_be
@browser = browser_instance
location( url: browser_url )
location(url: browser_url)
match(
css: '#login',
value: 'username',
@ -51,7 +52,7 @@ class AuthTest < TestCase
def test_new_browser_with_permanent_cookie_login
@browser = browser_instance
location( url: browser_url )
location(url: browser_url)
# login with username/password
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}
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}'")
else
raise "not matching value '#{params[:value]}' in cookie '#{cookie}'"