-
Notifications
You must be signed in to change notification settings - Fork 270
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
Add keyboard layout test to Installer #4308
Conversation
514e840
to
2349ec6
Compare
Non-over engineered version (1 language switch) for graphical and text UI: |
2920493
to
7729fc3
Compare
tests/installation/welcome.pm
Outdated
@@ -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')) { |
There was a problem hiding this comment.
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');
…
tests/installation/welcome.pm
Outdated
@@ -113,6 +135,7 @@ sub run { | |||
} | |||
|
|||
assert_screen 'languagepicked'; | |||
check_keyboard_layout; |
There was a problem hiding this comment.
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"?
7729fc3
to
24a291c
Compare
Needles TW:Verification runs: |
24a291c
to
c3e74e0
Compare
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.