3 use RT::Test tests => undef;
5 my ( $url, $m ) = RT::Test->started_ok;
6 ok( $m->login(), 'logged in' );
8 $m->follow_link_ok({text => 'About me'});
9 $m->submit_form_ok({ with_fields => { Lang => 'ja'} },
10 "Change to Japanese");
11 $m->text_contains("Lang changed from (no value) to 'ja'");
12 $m->text_contains(Encode::decode("UTF-8","実名"), "Page content is japanese");
14 # we only changed one field, and it wasn't the default, so this feedback is
15 # spurious and annoying
16 $m->content_lacks("That is already the current value");
18 # change back to English
19 $m->submit_form_ok({ with_fields => { Lang => 'en_us'} },
20 "Change back to english");
22 # This message shows up in Japanese
23 # $m->text_contains("Lang changed from 'ja' to 'en_us'");
24 $m->text_contains(Encode::decode("UTF-8","Langは「'ja'」から「'en_us'」に変更されました"));
25 $m->text_contains("Real Name", "Page content is english");
27 # Check for a lack of spurious updates
28 $m->content_lacks("That is already the current value");
30 # Ensure that we can change the language back to the default.
31 $m->submit_form_ok({ with_fields => { Lang => 'ja'} },
32 "Back briefly to Japanese");
33 $m->text_contains("Lang changed from 'en_us' to 'ja'");
34 $m->text_contains(Encode::decode("UTF-8","実名"), "Page content is japanese");
35 $m->submit_form_ok({ with_fields => { Lang => ''} },
36 "And set to the default");
37 $m->text_contains(Encode::decode("UTF-8","Langは「'ja'」から「(値なし)」に変更されました"));
38 $m->text_contains("Real Name", "Page content is english");