trabajo-afectivo/test/browser/prefereces_test.rb

88 lines
2.1 KiB
Ruby
Raw Normal View History

2013-02-21 21:56:32 +00:00
# encoding: utf-8
require 'browser_test_helper'
class PreferencesTest < TestCase
def test_preferences
2013-02-21 21:56:32 +00:00
tests = [
{
:name => 'preferences',
:action => [
{
:execute => 'click',
:css => 'a[href="#current_user"]',
2013-02-21 21:56:32 +00:00
},
{
:execute => 'click',
:css => 'a[href="#profile"]',
2013-02-21 21:56:32 +00:00
},
{
:execute => 'wait',
:value => 1,
},
{
:execute => 'click',
:css => 'a[href="#profile/language"]',
2013-02-21 21:56:32 +00:00
},
{
:execute => 'wait',
:value => 1,
},
{
:execute => 'check',
:css => '#language',
2013-02-21 21:56:32 +00:00
:result => true,
},
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'select',
:css => '#language select[name="locale"]',
2013-02-21 21:56:32 +00:00
:value => 'Deutsch',
},
{
:execute => 'click',
:css => '#language button',
2013-02-21 21:56:32 +00:00
},
{
:execute => 'wait',
:value => 5,
},
{
:execute => 'check',
:css => '#login',
2013-02-21 21:56:32 +00:00
:result => false,
},
{
:execute => 'match',
:css => 'body',
2013-02-21 21:56:32 +00:00
:value => 'Sprache',
:match_result => true,
},
{
:execute => 'select',
:css => '#language select[name="locale"]',
2013-02-21 21:56:32 +00:00
:value => 'English (United States)',
},
{
:execute => 'click',
:css => '#language button',
2013-02-21 21:56:32 +00:00
},
{
:execute => 'wait',
:value => 5,
},
{
:execute => 'match',
:css => 'body',
2013-02-21 21:56:32 +00:00
:value => 'Language',
:match_result => true,
},
],
},
]
browser_signle_test_with_login(tests)
end
end