03af57e0da
when we run firefox in a bare X session, by default we get an 800x600 firefox in a 1024x768 X server with some dead black space to the right and bottom of the screen. Now it turns out that if the mouse is in the dead space, Firefox will not get any keystrokes we send. This didn't used to be a problem, but I made it into one with this os-autoinst change: https://github.com/os-autoinst/os-autoinst/pull/559 that makes os-autoinst move the cursor to 1023,767 after each `assert_and_click`, instead of 0x0 as it did before, unless the cursor has previously been explicitly place somewhere. So in this case it gets moved to the dead space, and Firefox stops responding to keypresses after the first `assert_and_click`. We could equally well fix this by setting the cursor to 0,0 after running Firefox, but I like this more as it makes sure we won't run into the same problem some other way, and makes the videos and screenshots look nicer. This fixes the realmd_join_cockpit test that's been failing ever since I installed an os-autoinst with that fix. Committing without review as it's a straightforward fix and I want the test working again...
60 lines
2.1 KiB
Perl
60 lines
2.1 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use freeipa;
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
$self->console_login(user=>'root');
|
|
# clear browser data so we don't go back to the 'admin' login
|
|
assert_script_run 'rm -rf /root/.mozilla';
|
|
type_string "startx /usr/bin/firefox -width 1024 -height 768\n";
|
|
assert_screen "firefox";
|
|
start_webui("test1", "batterystaple");
|
|
assert_and_click "freeipa_webui_actions";
|
|
assert_and_click "freeipa_webui_reset_password_link";
|
|
wait_still_screen 3;
|
|
type_string "batterystaple";
|
|
wait_still_screen 1;
|
|
send_key "tab";
|
|
send_key "tab";
|
|
wait_still_screen 1;
|
|
type_string "loremipsum";
|
|
wait_still_screen 1;
|
|
send_key "tab";
|
|
wait_still_screen 1;
|
|
type_string "loremipsum";
|
|
wait_still_screen 1;
|
|
assert_and_click "freeipa_webui_reset_password_button";
|
|
wait_still_screen 2;
|
|
# log out
|
|
assert_and_click "freeipa_webui_user_menu";
|
|
assert_and_click "freeipa_webui_logout";
|
|
wait_still_screen 3;
|
|
# close browser, back to console
|
|
send_key "ctrl-q";
|
|
# we don't get back to a prompt instantly and keystrokes while X
|
|
# is still shutting down are swallowed, so wait_still_screen before
|
|
# finishing (and handing off to freeipa_client_postinstall)
|
|
wait_still_screen 5;
|
|
# check we can kinit with changed password
|
|
assert_script_run 'printf "loremipsum" | kinit test1';
|
|
# change password via CLI (back to batterystaple, as that's what
|
|
# freeipa_client test expects)
|
|
assert_script_run 'dnf -y install freeipa-admintools';
|
|
assert_script_run 'printf "batterystaple\nbatterystaple" | ipa user-mod test1 --password';
|
|
# check we can kinit again
|
|
assert_script_run 'printf "batterystaple" | kinit test1';
|
|
# we just stay here - freeipa_client will pick right up
|
|
}
|
|
|
|
sub test_flags {
|
|
# without anything - rollback to 'lastgood' snapshot if failed
|
|
# 'fatal' - whole test suite is in danger if this fails
|
|
# 'milestone' - after this test succeeds, update 'lastgood'
|
|
# 'important' - if this fails, set the overall state to 'fail'
|
|
return {};
|
|
}
|
|
|
|
1;
|