Moved to css selectors for browser tests. Fixed setting widget.

This commit is contained in:
Martin Edenhofer 2013-02-22 11:36:00 +01:00
parent 093f1df438
commit 97377bf138
11 changed files with 424 additions and 143 deletions

View file

@ -31,13 +31,11 @@ class App.SettingsAreaItem extends App.Controller
# defaults # defaults
directValue = 0 directValue = 0
directData = undefined
for item in @setting.options['form'] for item in @setting.options['form']
directValue = +1 directValue += 1
directData = @setting.state.value[item.name]
if directValue > 1 if directValue > 1
item['default'] = directData for item in @setting.options['form']
item['default'] = @setting.state.value[item.name]
else else
item['default'] = @setting.state.value item['default'] = @setting.state.value
@ -62,7 +60,7 @@ class App.SettingsAreaItem extends App.Controller
directValue = 0 directValue = 0
directData = undefined directData = undefined
for item in @setting.options['form'] for item in @setting.options['form']
directValue = +1 directValue += 1
directData = params[item.name] directData = params[item.name]
if directValue > 1 if directValue > 1

View file

@ -15,14 +15,14 @@
<div class="span6 master_user"> <div class="span6 master_user">
<h2><%- @T( 'Master Agent' ) %></h2> <h2><%- @T( 'Master Agent' ) %></h2>
<form class="form-stacked" id="form-master"> <form class="form-stacked" id="form-master">
<button class="btn btn-primary submit"><%- @T( 'Next...' ) %></button> <button type="submit" class="btn btn-primary submit"><%- @T( 'Next...' ) %></button>
</form> </form>
</div> </div>
<% end %> <% end %>
<div class="span6 agent_user hide"> <div class="span6 agent_user hide">
<h2><%- @T( 'Invite Agents' ) %></h2> <h2><%- @T( 'Invite Agents' ) %></h2>
<form class="form-stacked" id="form-agent"> <form class="form-stacked" id="form-agent">
<button class="btn btn-primary submit"><%- @T( 'Send invitation' ) %></button> <button type="submit" class="btn btn-primary submit"><%- @T( 'Send invitation' ) %></button>
</form> </form>
</div> </div>
<div class="span6"> <div class="span6">

View file

@ -1,4 +1,4 @@
<form class=""> <form class="" id="<%= @setting.name %>">
<h2><%- @T( @setting.title ) %></h2> <h2><%- @T( @setting.title ) %></h2>
<p><%- @T( @setting.description ) %></p> <p><%- @T( @setting.description ) %></p>
<div id="form-item"></div> <div id="form-item"></div>

View file

@ -0,0 +1,83 @@
# encoding: utf-8
require 'browser_test_helper'
class AaaGettingStarted < ActiveSupport::TestCase
test 'getting started' do
tests = [
{
:name => 'start',
:instance => Watir::Browser.new,
:url => 'http://localhost:3000/#getting_started',
:action => [
{
:execute => 'wait',
:value => 6,
},
{
:execute => 'check',
:css => '#form-master',
:result => true,
},
],
},
{
:name => 'getting started',
:action => [
{
:execute => 'set',
:css => 'input[name="firstname"]',
:value => 'Test Master',
},
{
:execute => 'set',
:css => 'input[name="lastname"]',
:value => 'Agent',
},
{
:execute => 'set',
:css => 'input[name="email"]',
:value => 'master@example.com',
},
{
:execute => 'set',
:element => :text_field,
:css => 'input[name="password"]',
:value => 'test1234äöüß',
},
{
:execute => 'set',
:css => 'input[name="password_confirm"]',
:value => 'test1234äöüß',
},
{
:execute => 'click',
:css => '#form-master button[type="submit"]',
},
{
:execute => 'wait',
:value => 5,
},
{
:execute => 'check',
:css => '#login',
:result => false,
},
{
:execute => 'check',
:element => :url,
:result => '#getting_started',
},
# check action
{
:execute => 'match',
:css => 'body',
:value => 'Invite Agents',
:match_result => true,
},
],
},
]
browser_single_test(tests)
end
end

View file

@ -11,20 +11,17 @@ class Auth < ActiveSupport::TestCase
:action => [ :action => [
{ {
:execute => 'check', :execute => 'check',
:element => :form, :css => '#login',
:id => 'login',
:result => true, :result => true,
}, },
{ {
:execute => 'check', :execute => 'check',
:element => :button, :css => '#login button',
:type => 'submit',
:result => true, :result => true,
}, },
{ {
:execute => 'click', :execute => 'click',
:element => :button, :css => '#login button',
:type => 'submit',
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -32,8 +29,7 @@ class Auth < ActiveSupport::TestCase
}, },
{ {
:execute => 'check', :execute => 'check',
:element => :form, :css => '#login',
:id => 'login',
:result => true, :result => true,
}, },
], ],
@ -47,37 +43,40 @@ class Auth < ActiveSupport::TestCase
}, },
{ {
:execute => 'check', :execute => 'check',
:element => :form, :css => '#login',
:id => 'login',
:result => true, :result => true,
}, },
{ {
:execute => 'set', :execute => 'set',
:element => :text_field, :css => 'input[name="username"]',
:name => 'username',
:value => 'nicole.braun@zammad.org', :value => 'nicole.braun@zammad.org',
}, },
{ {
:execute => 'set', :execute => 'set',
:element => :text_field, :css => 'input[name="password"]',
:name => 'password',
:value => 'test' :value => 'test'
}, },
{ {
:execute => 'click', :execute => 'click',
:element => :button, :css => '#login button',
:type => 'submit',
}, },
{ {
:execute => 'wait', :execute => 'wait',
:value => 3, :value => 3,
}, },
# check action
{ {
:execute => 'check', :execute => 'check',
:element => :form, :css => '#login',
:id => 'login',
:result => false, :result => false,
}, },
{
:execute => 'match',
:css => 'body',
:value => 'nicole.braun@zammad.org',
:match_result => true,
},
], ],
}, },
] ]

View file

@ -0,0 +1,85 @@
# encoding: utf-8
require 'browser_test_helper'
class AuthMaster < ActiveSupport::TestCase
test 'authentication' do
tests = [
{
:name => 'start',
:instance => Watir::Browser.new,
:url => 'http://localhost:3000',
:action => [
{
:execute => 'check',
:css => '#login',
:result => true,
},
{
:execute => 'check',
:css => '#login button',
:result => true,
},
{
:execute => 'click',
:css => '#login button',
},
{
:execute => 'wait',
:value => 3,
},
{
:execute => 'check',
:css => '#login',
:result => true,
},
],
},
{
:name => 'login',
:action => [
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'check',
:css => '#login',
:result => true,
},
{
:execute => 'set',
:css => 'input[name="username"]',
:value => 'master@example.com',
},
{
:execute => 'set',
:css => 'input[name="password"]',
:value => 'test1234äöüß'
},
{
:execute => 'click',
:css => '#login button',
},
{
:execute => 'wait',
:value => 3,
},
# check action
{
:execute => 'check',
:css => '#login',
:result => false,
},
{
:execute => 'match',
:css => 'body',
:value => 'master@example',
:match_result => true,
},
],
},
]
browser_single_test(tests)
end
end

View file

@ -9,45 +9,40 @@ class Chat < ActiveSupport::TestCase
:name => 'start', :name => 'start',
:instance1 => Watir::Browser.new, :instance1 => Watir::Browser.new,
:instance2 => Watir::Browser.new, :instance2 => Watir::Browser.new,
:instance1_username => 'm@edenhofer.de', :instance1_username => 'master@example.com',
:instance1_password => 'test', :instance1_password => 'test',
:instance2_username => 'm@edenhofer.de', :instance2_username => 'master@example.com',
:instance2_password => 'test', :instance2_password => 'test',
:url => 'http://localhost:3000', :url => 'http://localhost:3000',
:action => [ :action => [
{ {
:where => :instance1, :where => :instance1,
:execute => 'check', :execute => 'check',
:element => :form, :css => '#login',
:id => 'login',
:result => false, :result => false,
}, },
{ {
:where => :instance2, :where => :instance2,
:execute => 'check', :execute => 'check',
:element => :form, :css => '#login',
:id => 'login',
:result => false, :result => false,
}, },
{ {
:where => :instance1, :where => :instance1,
:execute => 'click', :execute => 'click',
:element => :a, :css => '#chat_toogle',
:id => 'chat_toogle',
}, },
{ {
:where => :instance1, :where => :instance1,
:execute => 'set', :execute => 'set',
:element => :text_field, :css => 'input[name="chat_message"]',
:name => 'chat_message',
:value => message, :value => message,
}, },
{ {
:where => :instance1, :where => :instance1,
:execute => 'send_key', :execute => 'send_key',
:element => :text_field, :css => 'input[name="chat_message"]',
:name => 'chat_message',
:value => :enter, :value => :enter,
}, },
{ {
@ -57,16 +52,14 @@ class Chat < ActiveSupport::TestCase
{ {
:where => :instance1, :where => :instance1,
:execute => 'match', :execute => 'match',
:element => :div, :css => '#chat_log_container',
:id => 'chat_log_container',
:value => message, :value => message,
:match_result => true, :match_result => true,
}, },
{ {
:where => :instance2, :where => :instance2,
:execute => 'match', :execute => 'match',
:element => :div, :css => '#chat_log_container',
:id => 'chat_log_container',
:value => message, :value => message,
:match_result => true, :match_result => true,
}, },

View file

@ -9,8 +9,7 @@ class CustomerTicketCreate < ActiveSupport::TestCase
:action => [ :action => [
{ {
:execute => 'click', :execute => 'click',
:element => :link, :css => 'a[href="#customer_ticket_new"]',
:href => '#customer_ticket_new',
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -18,8 +17,7 @@ class CustomerTicketCreate < ActiveSupport::TestCase
}, },
{ {
:execute => 'check', :execute => 'check',
:element => :div, :css => '#form_create',
:id => 'form_create',
:result => true, :result => true,
}, },
{ {
@ -28,26 +26,22 @@ class CustomerTicketCreate < ActiveSupport::TestCase
}, },
{ {
:execute => 'select', :execute => 'select',
:element => :select_list, :css => '#form_create select[name="group_id"]',
:name => 'group_id',
:value => 'Users', :value => 'Users',
}, },
{ {
:execute => 'set', :execute => 'set',
:element => :text_field, :css => '#form_create input[name="subject"]',
:name => 'subject',
:value => 'some subject 123äöü', :value => 'some subject 123äöü',
}, },
{ {
:execute => 'set', :execute => 'set',
:element => :text_field, :css => '#form_create textarea[name="body"]',
:name => 'body',
:value => 'some body 123äöü', :value => 'some body 123äöü',
}, },
{ {
:execute => 'click', :execute => 'click',
:element => :button, :css => 'button[type="submit"]',
:type => 'submit',
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -55,8 +49,7 @@ class CustomerTicketCreate < ActiveSupport::TestCase
}, },
{ {
:execute => 'check', :execute => 'check',
:element => :form, :css => '#login',
:id => 'login',
:result => false, :result => false,
}, },
{ {
@ -68,8 +61,7 @@ class CustomerTicketCreate < ActiveSupport::TestCase
# check ticket # check ticket
{ {
:execute => 'match', :execute => 'match',
:element => :div, :css => 'div.article',
:class => 'article',
:value => 'some body 123äöü', :value => 'some body 123äöü',
:match_result => true, :match_result => true,
}, },
@ -77,19 +69,17 @@ class CustomerTicketCreate < ActiveSupport::TestCase
# update ticket # update ticket
{ {
:execute => 'check', :execute => 'check',
:element => :text_field, :css => 'textarea[name="body"]',
:name => 'body',
:result => true, :result => true,
}, },
{ {
:execute => 'set', :execute => 'set',
:element => :text_field, :css => 'textarea[name="body"]',
:name => 'body',
:value => 'some body 1234 äöüß', :value => 'some body 1234 äöüß',
}, },
{ {
:execute => 'click', :execute => 'click',
:element => :button, :css => 'button',
:type => 'submit', :type => 'submit',
}, },
{ {
@ -98,7 +88,7 @@ class CustomerTicketCreate < ActiveSupport::TestCase
}, },
{ {
:execute => 'match', :execute => 'match',
:element => :body, :css => 'body',
:value => 'some body 1234 äöüß', :value => 'some body 1234 äöüß',
:match_result => true, :match_result => true,
}, },

View file

@ -9,13 +9,11 @@ class Preferences < ActiveSupport::TestCase
:action => [ :action => [
{ {
:execute => 'click', :execute => 'click',
:element => :link, :css => 'a[href="#current_user"]',
:href => '#current_user',
}, },
{ {
:execute => 'click', :execute => 'click',
:element => :link, :css => 'a[href="#profile"]',
:href => '#profile',
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -23,8 +21,7 @@ class Preferences < ActiveSupport::TestCase
}, },
{ {
:execute => 'click', :execute => 'click',
:element => :link, :css => 'a[href="#profile/language"]',
:href => '#profile/language',
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -32,8 +29,7 @@ class Preferences < ActiveSupport::TestCase
}, },
{ {
:execute => 'check', :execute => 'check',
:element => :div, :css => '#language',
:id => 'language',
:result => true, :result => true,
}, },
{ {
@ -42,14 +38,12 @@ class Preferences < ActiveSupport::TestCase
}, },
{ {
:execute => 'select', :execute => 'select',
:element => :select_list, :css => '#language select[name="locale"]',
:name => 'locale',
:value => 'Deutsch', :value => 'Deutsch',
}, },
{ {
:execute => 'click', :execute => 'click',
:element => :button, :css => '#language button',
:type => 'submit',
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -57,26 +51,23 @@ class Preferences < ActiveSupport::TestCase
}, },
{ {
:execute => 'check', :execute => 'check',
:element => :form, :css => '#login',
:id => 'login',
:result => false, :result => false,
}, },
{ {
:execute => 'match', :execute => 'match',
:element => :body, :css => 'body',
:value => 'Sprache', :value => 'Sprache',
:match_result => true, :match_result => true,
}, },
{ {
:execute => 'select', :execute => 'select',
:element => :select_list, :css => '#language select[name="locale"]',
:name => 'locale',
:value => 'English (United States)', :value => 'English (United States)',
}, },
{ {
:execute => 'click', :execute => 'click',
:element => :button, :css => '#language button',
:type => 'submit',
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -84,7 +75,7 @@ class Preferences < ActiveSupport::TestCase
}, },
{ {
:execute => 'match', :execute => 'match',
:element => :body, :css => 'body',
:value => 'Language', :value => 'Language',
:match_result => true, :match_result => true,
}, },

159
test/browser/setting.rb Normal file
View file

@ -0,0 +1,159 @@
# encoding: utf-8
require 'browser_test_helper'
class TestSetting < ActiveSupport::TestCase
test 'setting' do
tests = [
{
:name => 'setting',
:action => [
{
:execute => 'click',
:css => 'a[href="#settings"]',
},
{
:execute => 'click',
:css => 'a[href="#settings/security"]',
},
{
:execute => 'click',
:css => 'a[href="#settings/security/third_party_auth"]',
},
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'check',
:css => '#auth_facebook select[name="auth_facebook"]',
:result => true,
},
# set yes
{
:execute => 'select',
:css => '#auth_facebook select[name="auth_facebook"]',
:value => 'yes',
},
{
:execute => 'click',
:css => '#auth_facebook button[type=submit]',
},
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'match',
:css => '#auth_facebook select[name="auth_facebook"]',
:value => 'yes',
:match_result => true,
},
{
:execute => 'match',
:css => '#auth_facebook select[name="auth_facebook"]',
:value => 'no',
:match_result => false,
},
{
:execute => 'wait',
:value => 2,
},
# set no
{
:execute => 'select',
:css => '#auth_facebook select[name="auth_facebook"]',
:value => 'no',
},
{
:execute => 'click',
:css => '#auth_facebook button[type=submit]',
},
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'match',
:css => '#auth_facebook select[name="auth_facebook"]',
:value => 'yes',
:match_result => false,
},
{
:execute => 'match',
:css => '#auth_facebook select[name="auth_facebook"]',
:value => 'no',
:match_result => true,
},
# set key and secret
{
:execute => 'set',
:css => '#auth_facebook_credentials input[name=app_id]',
:value => 'id_test1234äöüß',
},
{
:execute => 'set',
:css => '#auth_facebook_credentials input[name=app_secret]',
:value => 'secret_test1234äöüß',
},
{
:execute => 'click',
:css => '#auth_facebook_credentials button[type=submit]',
},
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'match',
:css => '#auth_facebook_credentials input[name=app_id]',
:value => 'id_test1234äöüß',
:match_result => true,
},
{
:execute => 'match',
:css => '#auth_facebook_credentials input[name=app_secret]',
:value => 'secret_test1234äöüß',
:match_result => true,
},
# set key and secret again
{
:execute => 'set',
:css => '#auth_facebook_credentials input[name=app_id]',
:value => '---',
},
{
:execute => 'set',
:css => '#auth_facebook_credentials input[name=app_secret]',
:value => '---',
},
{
:execute => 'click',
:css => '#auth_facebook_credentials button[type=submit]',
},
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'match',
:css => '#auth_facebook_credentials input[name=app_id]',
:value => '---',
:match_result => true,
},
{
:execute => 'match',
:css => '#auth_facebook_credentials input[name=app_secret]',
:value => '---',
:match_result => true,
},
],
},
]
browser_signle_test_with_login(tests, { :username => 'master@example.com' })
end
end

View file

@ -19,26 +19,22 @@ class ActiveSupport::TestCase
}, },
{ {
:execute => 'check', :execute => 'check',
:element => :form, :css => '#login',
:id => 'login',
:result => true, :result => true,
}, },
{ {
:execute => 'set', :execute => 'set',
:element => :text_field, :css => 'input[name="username"]',
:name => 'username',
:value => data[:username] || 'nicole.braun@zammad.org', :value => data[:username] || 'nicole.braun@zammad.org',
}, },
{ {
:execute => 'set', :execute => 'set',
:element => :text_field, :css => 'input[name="password"]',
:name => 'password',
:value => data[:password] || 'test' :value => data[:password] || 'test'
}, },
{ {
:execute => 'click', :execute => 'click',
:element => :button, :css => '#login button',
:type => 'submit',
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -46,8 +42,7 @@ class ActiveSupport::TestCase
}, },
{ {
:execute => 'check', :execute => 'check',
:element => :form, :css => '#login',
:id => 'login',
:result => false, :result => false,
}, },
], ],
@ -56,8 +51,8 @@ class ActiveSupport::TestCase
return all_tests return all_tests
end end
def browser_signle_test_with_login(tests) def browser_signle_test_with_login(tests, login = {})
all_tests = browser_login( {} ) all_tests = browser_login( login )
all_tests = all_tests.concat( tests ) all_tests = all_tests.concat( tests )
browser_single_test(all_tests) browser_single_test(all_tests)
end end
@ -123,44 +118,12 @@ class ActiveSupport::TestCase
end end
def browser_element_action(test, action, instance) def browser_element_action(test, action, instance)
if action[:id] if action[:css]
element = instance.send( action[:element], { :id => action[:id] } ) element = instance.element( { :css => action[:css] } )
if action[:result] == false if action[:result] == false
assert( !element.exists?, "(#{test[:name]}) Element #{action[:element]} with id #{action[:id]} exists" ) assert( !element.exists?, "(#{test[:name]}) Element with css '#{action[:css]}' exists" )
else else
assert( element.exists?, "(#{test[:name]}) Element #{action[:element]} with id #{action[:id]} doesn't exist" ) assert( element.exists?, "(#{test[:name]}) Element with css '#{action[:css]}' doesn't exist" )
end
elsif action[:type]
if action[:result] == false
element = instance.send( action[:element], { :type => action[:type] } )
assert( !element.exists?, "(#{test[:name]}) Element #{action[:element]} with type #{action[:type]} exists" )
else
element = instance.send( action[:element], { :type => action[:type] } )
assert( element.exists?, "(#{test[:name]}) Element #{action[:element]} with type #{action[:type]} doesn't exist" )
end
elsif action[:class]
if action[:result] == false
element = instance.send( action[:element], { :class => action[:class] } )
assert( !element.exists?, "(#{test[:name]}) Element #{action[:element]} with class #{action[:class]} exists" )
else
element = instance.send( action[:element], { :class => action[:class] } )
assert( element.exists?, "(#{test[:name]}) Element #{action[:element]} with class #{action[:class]} doesn't exist" )
end
elsif action[:name]
if action[:result] == false
element = instance.send( action[:element], { :name => action[:name] } )
assert( !element.exists?, "(#{test[:name]}) Element #{action[:element]} with name #{action[:name]} exists" )
else
element = instance.send( action[:element], { :name => action[:name] } )
assert( element.exists?, "(#{test[:name]}) Element #{action[:element]} with name #{action[:name]} doesn't exist" )
end
elsif action[:href]
if action[:result] == false
element = instance.send( action[:element], { :href => action[:href] } )
assert( !element.exists?, "(#{test[:name]}) Element #{action[:element]} with href #{action[:href]} exists" )
else
element = instance.send( action[:element], { :href => action[:href] } )
assert( element.exists?, "(#{test[:name]}) Element #{action[:element]} with href #{action[:href]} doesn't exist" )
end end
elsif action[:element] == :url elsif action[:element] == :url
if instance.url =~ /#{Regexp.quote(action[:result])}/ if instance.url =~ /#{Regexp.quote(action[:result])}/
@ -168,31 +131,51 @@ class ActiveSupport::TestCase
else else
assert( false, "(#{test[:name]}) url #{instance.url} is not matching #{action[:result]}" ) assert( false, "(#{test[:name]}) url #{instance.url} is not matching #{action[:result]}" )
end end
elsif action[:element] == :body
element = instance.send( action[:element] )
else else
assert( false, "(#{test[:name]}) unknow selector for '#{action[:element]}'" ) assert( false, "(#{test[:name]}) unknow selector for '#{action[:element]}'" )
end end
if action[:execute] == 'set' if action[:execute] == 'set'
element.set( action[:value] ) element.to_subtype.set( action[:value] )
elsif action[:execute] == 'select' elsif action[:execute] == 'select'
element.select( action[:value] ) element.to_subtype.select( action[:value] )
elsif action[:execute] == 'click' elsif action[:execute] == 'click'
element.click element.click
elsif action[:execute] == 'send_key' elsif action[:execute] == 'send_key'
element.send_keys action[:value] element.send_keys action[:value]
elsif action[:execute] == 'match' elsif action[:execute] == 'match'
if element.text =~ /#{Regexp.quote(action[:value])}/ if action[:css] =~ /select/
success = element.to_subtype.selected?(action[:value])
if action[:match_result] if action[:match_result]
assert( true, "(#{test[:name]}) matching '#{action[:value]}' in content '#{element.text}'" ) if success
assert( true, "(#{test[:name]}) matching '#{action[:value]}' in select list" )
else
assert( false, "(#{test[:name]}) not matching '#{action[:value]}' in select list" )
end
else else
assert( false, "(#{test[:name]}) matching '#{action[:value]}' in content '#{element.text}' but should not!" ) if success
assert( false, "(#{test[:name]}) not matching '#{action[:value]}' in select list" )
else
assert( true, "(#{test[:name]}) matching '#{action[:value]}' in select list" )
end
end end
else else
if !action[:match_result] if action[:css] =~ /input|textarea/i
assert( true, "(#{test[:name]}) not matching '#{action[:value]}' in content '#{element.text}'" ) text = element.to_subtype.value
else else
assert( false, "(#{test[:name]}) not matching '#{action[:value]}' in content '#{element.text}' but should not!" ) text = element.text
end
if text =~ /#{Regexp.quote(action[:value])}/
if action[:match_result]
assert( true, "(#{test[:name]}) matching '#{action[:value]}' in content '#{text}'" )
else
assert( false, "(#{test[:name]}) matching '#{action[:value]}' in content '#{text}' but should not!" )
end
else
if !action[:match_result]
assert( true, "(#{test[:name]}) not matching '#{action[:value]}' in content '#{text}'" )
else
assert( false, "(#{test[:name]}) not matching '#{action[:value]}' in content '#{text}' but should not!" )
end
end end
end end
elsif action[:execute] == 'check' elsif action[:execute] == 'check'