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