Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keyboard layout test to Installer #4308

Merged

Conversation

jknphy
Copy link
Contributor

@jknphy jknphy commented Jan 30, 2018

Add keyboard layout test to Installer. This functionality could be tested just by switching to only one language, but I wanted to create a function to iterate languages to have more test cover and reuse code. It was not strictly necessary but it helped me to found and issue in some languages, for example in Czech that is using a qwertz keyboard. qemu is mapping keys with /usr/share/qemu/keymaps/cz and /usr/share/qemu/keymaps/en-us and I was able to reproduce why this code cannot achive alt-y once you switch to check in the Installer. Just need to use -k option in qemu to setup properly, meaning even if we test several switch to languages in future if we want to move forward with installer with a different keyboard we need to go in en-us or have available another parameter to use this -k option of qemu, which is not implemented atm in the backend.

@jknphy jknphy force-pushed the keyboard_layout_switching_installer branch 3 times, most recently from 514e840 to 2349ec6 Compare February 1, 2018 14:29
@jknphy
Copy link
Contributor Author

jknphy commented Feb 1, 2018

Non-over engineered version (1 language switch) for graphical and text UI:

@jknphy jknphy force-pushed the keyboard_layout_switching_installer branch 2 times, most recently from 2920493 to 7729fc3 Compare February 2, 2018 09:08
@jknphy jknphy changed the title [WIP] Add keyboard layout test to Installer Add keyboard layout test to Installer Feb 2, 2018
@@ -19,6 +19,28 @@ use utils 'ensure_fullscreen';
use version_utils qw(is_sle sle_version_at_least);
use main_common 'is_staging';

sub check_keyboard_layout {
if (get_var('INSTALL_KEYBOARD_LAYOUT')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of wrapping the whole block in an if how about returning early with unless?:

return unless get_var('INSTALL_KEYBOARD_LAYOUT');
…

@@ -113,6 +135,7 @@ sub run {
}

assert_screen 'languagepicked';
check_keyboard_layout;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible for you to make that an explicit test module rather than "hide" it in "welcome"?

@jknphy jknphy force-pushed the keyboard_layout_switching_installer branch from 24a291c to c3e74e0 Compare February 5, 2018 07:59
@okurz okurz merged commit fd2be73 into os-autoinst:master Feb 7, 2018
@jknphy jknphy deleted the keyboard_layout_switching_installer branch March 7, 2018 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants