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(Encode::decode("UTF-8","Langは「(値なし)」から「'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 $m->text_contains("Lang changed from 'ja' to 'en_us'");
23 $m->text_contains("Real Name", "Page content is english");
25 # Check for a lack of spurious updates
26 $m->content_lacks("That is already the current value");
28 # Ensure that we can change the language back to the default.
29 $m->submit_form_ok({ with_fields => { Lang => 'ja'} },
30 "Back briefly to Japanese");
31 $m->text_contains(Encode::decode("UTF-8","Langは「'en_us'」から「'ja'」に変更されました"));
32 $m->text_contains(Encode::decode("UTF-8","実名"), "Page content is japanese");
33 $m->submit_form_ok({ with_fields => { Lang => ''} },
34 "And set to the default");
35 $m->text_contains("Lang changed from 'ja' to (no value)");
36 $m->text_contains("Real Name", "Page content is english");