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