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 => 'click',
|
2013-02-22 10:36:00 +00:00
|
|
|
:css => 'a[href="#profile/language"]',
|
2013-02-21 21:56:32 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'select',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => '.language_item select[name="locale"]',
|
2013-02-21 21:56:32 +00:00
|
|
|
:value => 'Deutsch',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => '.content button[type="submit"]',
|
2013-02-21 21:56:32 +00:00
|
|
|
},
|
|
|
|
{
|
2013-08-27 21:05:33 +00:00
|
|
|
:execute => 'watch_for',
|
|
|
|
:area => 'body',
|
|
|
|
:value => 'Sprache',
|
2013-02-21 21:56:32 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'select',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => '.language_item select[name="locale"]',
|
2013-02-21 21:56:32 +00:00
|
|
|
:value => 'English (United States)',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
2013-08-06 20:08:32 +00:00
|
|
|
:css => '.content button[type="submit"]',
|
2013-02-21 21:56:32 +00:00
|
|
|
},
|
|
|
|
{
|
2013-08-27 21:05:33 +00:00
|
|
|
:execute => 'watch_for',
|
|
|
|
:area => 'body',
|
|
|
|
:value => 'Language',
|
2013-02-21 21:56:32 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]
|
|
|
|
browser_signle_test_with_login(tests)
|
|
|
|
end
|
|
|
|
end
|