#77 Add test for Arabic installation, fixes #76.
Merged 5 years ago by adamwill. Opened 5 years ago by lruzicka.
fedora-qa/ lruzicka/os-autoinst-distri-fedora arabic_install  into  master

@@ -0,0 +1,16 @@ 

+ {

+   "tags": [

+     "anaconda_install_destination_encrypt_data",

+     "LANGUAGE-arabic"

+   ],

+   "area": [

+     {

+       "xpos": 878,

+       "ypos": 558,

+       "width": 127,

+       "height": 23,

+       "type": "match"

+     }

+   ],

+   "properties": []

+ } 

\ No newline at end of file

@@ -0,0 +1,16 @@ 

+ {

+   "tags": [

+     "anaconda_install_destination_save_passphrase",

+     "LANGUAGE-arabic"

+   ],

+   "area": [

+     {

+       "xpos": 240,

+       "ypos": 489,

+       "width": 104,

+       "height": 18,

+       "type": "match"

+     }

+   ],

+   "properties": []

+ } 

\ No newline at end of file

@@ -0,0 +1,16 @@ 

+ {

+   "properties": [],

+   "tags": [

+     "anaconda_install_done",

+     "LANGUAGE-arabic"

+   ],

+   "area": [

+     {

+       "xpos": 21,

+       "ypos": 686,

+       "width": 51,

+       "height": 18,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,16 @@ 

+ {

+   "tags": [

+     "LANGUAGE-arabic",

+     "anaconda_layout_native"

+   ],

+   "properties": [],

+   "area": [

+     {

+       "xpos": 654,

+       "ypos": 373,

+       "width": 42,

+       "height": 14,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,17 @@ 

+ {

+   "properties": [],

+   "area": [

+     {

+       "xpos": 661,

+       "ypos": 380,

+       "width": 37,

+       "height": 17,

+       "type": "match"

+     }

+   ],

+   "tags": [

+     "anaconda_layout_ascii",

+     "anaconda_layout_us",

+     "LANGUAGE-arabic"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,16 @@ 

+ {

+   "properties": [],

+   "area": [

+     {

+       "xpos": 620,

+       "ypos": 122,

+       "width": 101,

+       "height": 18,

+       "type": "match"

+     }

+   ],

+   "tags": [

+     "anaconda_install_root_password_screen",

+     "LANGUAGE-arabic"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,16 @@ 

+ {

+   "area": [

+     {

+       "xpos": 123,

+       "ypos": 184,

+       "width": 55,

+       "height": 21,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "LANGUAGE-arabic",

+     "anaconda_install_user_created"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,17 @@ 

+ {

+   "properties": [],

+   "area": [

+     {

+       "width": 47,

+       "ypos": 153,

+       "xpos": 350,

+       "height": 61,

+       "type": "match"

+     }

+   ],

+   "tags": [

+     "ENV-DISTRI-fedora",

+     "anaconda_install_user_creation",

+     "LANGUAGE-arabic"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,16 @@ 

+ {

+   "area": [

+     {

+       "xpos": 566,

+       "ypos": 214,

+       "width": 106,

+       "height": 21,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "LANGUAGE-arabic",

+     "anaconda_install_user_creation_make_admin"

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,16 @@ 

+ {

+   "tags": [

+     "LANGUAGE-arabic",

+     "anaconda_install_user_creation_screen"

+   ],

+   "properties": [],

+   "area": [

+     {

+       "xpos": 686,

+       "ypos": 109,

+       "width": 93,

+       "height": 22,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

@@ -11,6 +11,7 @@ 

    "properties": [],

    "tags": [

      "LANGUAGE-russian",

+     "LANGUAGE-arabic",

      "LANGUAGE-japanese",

      "anaconda_install_user_created"

    ]

@@ -0,0 +1,16 @@ 

+ {

+   "area": [

+     {

+       "xpos": 222,

+       "ypos": 180,

+       "width": 49,

+       "height": 31,

+       "type": "match"

+     }

+ 	  ],

+   "properties": [],

+   "tags": [

+     "LANGUAGE-arabic",

+     "anaconda_select_install_lang_filtered"

+   ]

+ }

@@ -0,0 +1,16 @@ 

+ {

+   "tags": [

+     "anaconda_select_install_lang_selected",

+     "LANGUAGE-arabic"

+   ],

+   "area": [

+     {

+       "xpos": 322,

+       "ypos": 186,

+       "width": 99,

+       "height": 22,

+       "type": "match"

+     }

+   ],

+   "properties": []

+ } 

\ No newline at end of file

@@ -0,0 +1,1 @@ 

+ {"area": [{"xpos": 24, "ypos": 737, "width": 61, "height": 19, "type": "match"}], "properties": [], "tags": ["anaconda_select_install_lang_continue", "LANGUAGE-arabic"]} 

\ No newline at end of file

@@ -0,0 +1,1 @@ 

+ {"properties": [], "tags": ["LANGUAGE-arabic", "anaconda_select_install_lang_selected"], "area": [{"xpos": 327, "ypos": 197, "width": 94, "height": 22, "type": "match"}]} 

\ No newline at end of file

@@ -0,0 +1,16 @@ 

+ {

+   "tags": [

+     "LANGUAGE-arabic",

+     "anaconda_main_hub_begin_installation"

+   ],

+   "properties": [],

+   "area": [

+     {

+       "xpos": 26,

+       "ypos": 709,

+       "width": 112,

+       "height": 20,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,16 @@ 

+ {

+   "properties": [],

+   "tags": [

+     "LANGUAGE-arabic",

+     "anaconda_workstation_highlighted"

+   ],

+   "area": [

+     {

+       "xpos": 530,

+       "ypos": 254,

+       "width": 126,

+       "height": 15,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,16 @@ 

+ {

+   "properties": [],

+   "tags": [

+     "LANGUAGE-arabic",

+     "anaconda_workstation_selected"

+   ],

+   "area": [

+     {

+       "xpos": 530,

+       "ypos": 254,

+       "width": 465,

+       "height": 15,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,16 @@ 

+ {

+   "tags": [

+     "anaconda_rawhide_accept_fate",

+     "LANGUAGE-arabic"

+   ],

+   "properties": [],

+   "area": [

+     {

+       "xpos": 255,

+       "ypos": 435,

+       "width": 162,

+       "height": 20,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

@@ -0,0 +1,16 @@ 

+ {

+   "properties": [],

+   "tags": [

+     "LANGUAGE-arabic",

+     "anaconda_spoke_done"

+   ],

+   "area": [

+     {

+       "xpos": 953,

+       "ypos": 53,

+       "width": 42,

+       "height": 21,

+       "type": "match"

+     }

+   ]

+ }

empty or binary file added
@@ -0,0 +1,18 @@ 

+ {

+   "properties": [],

+   "tags": [

+     "DESKTOP-gnome",

+     "ENV-DISTRI-fedora",

+     "LANGUAGE-arabic",

+     "graphical_desktop_clean"

+   ],

+   "area": [

+     {

+       "xpos": 951,

+       "ypos": 3,

+       "width": 65,

+       "height": 20,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,16 @@ 

+ {

+   "properties": [],

+   "tags": [

+     "LANGUAGE-arabic",

+     "getting_started"

+   ],

+   "area": [

+     {

+       "xpos": 458,

+       "ypos": 32,

+       "width": 111,

+       "height": 22,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,16 @@ 

+ {

+   "properties": [],

+   "tags": [

+     "gnome_layout_native",

+     "LANGUAGE-arabic"

+   ],

+   "area": [

+     {

+       "xpos": 138,

+       "ypos": 8,

+       "width": 36,

+       "height": 16,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,16 @@ 

+ {

+   "properties": [],

+   "tags": [

+     "gnome_layout_native",

+     "LANGUAGE-arabic"

+   ],

+   "area": [

+     {

+       "xpos": 138,

+       "ypos": 9,

+       "width": 35,

+       "height": 14,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,17 @@ 

+ {

+   "properties": [],

+   "tags": [

+     "gnome_layout_ascii",

+     "gnome_layout_us",

+     "LANGUAGE-arabic"

+   ],

+   "area": [

+     {

+       "xpos": 138,

+       "ypos": 9,

+       "width": 36,

+       "height": 14,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,17 @@ 

+ {

+   "properties": [],

+   "tags": [

+     "gnome_layout_ascii",

+     "gnome_layout_us",

+     "LANGUAGE-arabic"

+   ],

+   "area": [

+     {

+       "xpos": 138,

+       "ypos": 9,

+       "width": 36,

+       "height": 15,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,17 @@ 

+ {

+   "properties": [],

+   "tags": [

+     "DESKTOP-gnome",

+     "LANGUAGE-arabic",

+     "graphical_login_input"

+   ],

+   "area": [

+     {

+       "xpos": 340,

+       "ypos": 375,

+       "width": 345,

+       "height": 61,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,16 @@ 

+ {

+   "area": [

+     {

+       "xpos": 17,

+       "ypos": 41,

+       "width": 43,

+       "height": 21,

+       "type": "match"

+     }

+   ],

+   "tags": [

+     "LANGUAGE-arabic",

+     "next_button"

+   ],

+   "properties": []

+ } 

\ No newline at end of file

empty or binary file added
@@ -0,0 +1,16 @@ 

+ {

+   "properties": [],

+   "tags": [

+     "LANGUAGE-arabic",

+     "skip_button"

+   ],

+   "area": [

+     {

+       "xpos": 19,

+       "ypos": 42,

+       "width": 40,

+       "height": 19,

+       "type": "match"

+     }

+   ]

+ } 

\ No newline at end of file

empty or binary file added
@@ -1,16 +1,17 @@ 

- {

-   "area": [

-     {

-       "height": 17,

-       "type": "match",

-       "ypos": 34,

-       "width": 115,

-       "xpos": 454

-     }

-   ],

-   "properties": [],

-   "tags": [

-     "getting_started",

-     "LANGUAGE-english"

-   ]

- }

+ {

+   "area": [

+     {

+       "xpos": 454,

+       "ypos": 34,

+       "width": 115,

+       "height": 17,

+       "type": "match"

+     }

+   ],

+   "properties": [],

+   "tags": [

+     "getting_started",

+     "LANGUAGE-english",

+     "LANGUAGE-arabic"

+   ]

+ } 

\ No newline at end of file

@@ -10,7 +10,8 @@ 

    ],

    "tags": [

      "getting_started",

-     "LANGUAGE-english"

+     "LANGUAGE-english",

+     "LANGUAGE-arabic"

    ],

    "properties": []

- } 

\ No newline at end of file

+ }

file modified
+62
@@ -1500,6 +1500,17 @@ 

                                        flavor  => "universal",

                                        version => "*",

                                      },

+                       test_suite => { name => "install_arabic_language" },

+                     },

+                     {

+                       machine    => { name => "64bit" },

+                       prio       => 40,

+                       product    => {

+                                       arch    => "x86_64",

+                                       distri  => "fedora",

+                                       flavor  => "universal",

+                                       version => "*",

+                                     },

                        test_suite => { name => "install_asian_language" },

                      },

                      {
@@ -2539,6 +2550,18 @@ 

                                        flavor  => "universal",

                                        version => "*",

                                      },

+                       test_suite => { name => "install_arabic_language" },

+                     },

+                     {

+                       group_name => "Fedora PowerPC",

+                       machine    => { name => "ppc64le" },

+                       prio       => 40,

+                       product    => {

+                                       arch    => "ppc64le",

+                                       distri  => "fedora",

+                                       flavor  => "universal",

+                                       version => "*",

+                                     },

                        test_suite => { name => "install_asian_language" },

                      },

                      {
@@ -3271,6 +3294,18 @@ 

                                        flavor  => "universal",

                                        version => "*",

                                      },

+                       test_suite => { name => "install_arabic_language" },

+                     },

+                     {

+                       group_name => "Fedora PowerPC",

+                       machine    => { name => "ppc64" },

+                       prio       => 40,

+                       product    => {

+                                       arch    => "ppc64",

+                                       distri  => "fedora",

+                                       flavor  => "universal",

+                                       version => "*",

+                                     },

                        test_suite => { name => "install_asian_language" },

                      },

                      {
@@ -4039,6 +4074,18 @@ 

                                        flavor  => "universal",

                                        version => "*",

                                      },

+                       test_suite => { name => "install_arabic_language" },

+                     },

+                     {

+                       group_name => "Fedora AArch64",

+                       machine    => { name => "aarch64" },

+                       prio       => 40,

+                       product    => {

+                                       arch    => "aarch64",

+                                       distri  => "fedora",

+                                       flavor  => "universal",

+                                       version => "*",

+                                     },

                        test_suite => { name => "install_asian_language" },

                      },

                      {
@@ -5060,6 +5107,21 @@ 

                        ],

                      },

                      {

+                       name => "install_arabic_language",

+                       settings => [

+                         { key => "LANGUAGE", value => "arabic" },

+                         { key => "DESKTOP", value => "gnome" },

+                         { key => "PACKAGE_SET", value => "workstation" },

+                         { key => "SWITCHED_LAYOUT", value => "1" },

+                         { key => "USER_LOGIN", value => "qwerty" },

+                         { key => "ROOT_PASSWORD", value => "weakpassword" },

+                         { key => "ENCRYPT_PASSWORD", value => "weakpassword" },

+                         { key => "POSTINSTALL", value => "_console_login" },

+                         { key => "REPOSITORY_VARIATION", value => "%LOCATION%" },

+                         { key => "HDDSIZEGB", value => "12" },

+                       ],

+                     },

+                     {

                        name => "install_asian_language",

                        settings => [

                          { key => "LANGUAGE", value => "japanese" },

file modified
+8 -9
@@ -6,20 +6,19 @@ 

  sub run {

      my $self = shift;

      send_key "ctrl-alt-f3";

- 

      # do user login unless USER_LOGIN is set to string 'false'

-     unless (get_var("USER_LOGIN") eq "false") {

-         console_login(user=>get_var("USER_LOGIN", "test"), password=>get_var("USER_PASSWORD", "weakpassword"));

-     }

+     # Since there is no console support for arabic, so we cannot let the user log in 

+     # with a password that requires Arabic support. 

+     # Such attempt to log in would always fail.

+     if (get_var("LANGUAGE") ne "arabic" && get_var("USER_LOGIN") ne "false") {

+             console_login(user=>get_var("USER_LOGIN", "test"), password=>get_var("USER_PASSWORD", "weakpassword"));

+     };

      if (get_var("ROOT_PASSWORD")) {

          console_login(user=>"root", password=>get_var("ROOT_PASSWORD"));

-     }

- }

- 

+         }

+ }          

  sub test_flags {

      return { fatal => 1, milestone => 1 };

  }

- 

  1;

- 

  # vim: set sw=4 et:

This adds the test for Arabic installation and fixes the #76 issue. The test is based on the Russian installation.
There is one flaw - it skips user console login, because I could not find how to switch keymap for Arabic on the login prompt.

"because I could not find how to switch keymap for Arabic on the login prompt."

This is because there is no console layout for Arabic. At least, not in Fedora. Debian ships one (in its console-data package where its console keymaps live).

I ran into this a few years ago when trying to fix all this switched keyboard layout nonsense (man, that was a fun time).

So, on an Arabic install, in X/Wayland you get switched Arabic/US layouts, but at the console you only get US. You cannot type Arabic at the console.

So, a few notes:

  • We use spaces not tabs here!
  • You don't really need to specify a 'default' value for get_var usually. So you can simplify if (get_var("LANGUAGE","") ne "arabic") to if (get_var("LANGUAGE") ne "arabic"). It's arguably very slightly sloppy with types, but it's what we do all over the place already anyway (and what SUSE do in their tests).
  • I'd prefer the USER_LOGIN and LANGUAGE conditions to be combined rather than nested, I think for two conditions it's cleaner just to combine them than nest them. So something like if (get_var("USER_LOGIN") ne "false" && get_var("LANGUAGE") ne "arabic").
  • You should also include a comment explaining why we're not doing this if the language is Arabic. As you may have noticed I like comments everywhere explaining everything. Someone looking at this code who hadn't seen this ticket would have no idea at all why we're mysteriously skipping the user login just in Arabic. That kind of thing should always be explained in a comment.

I haven't looked through the needles yet, I'll try and take a look at those on Monday.

Thanks for the PR!

BTW, I filed an issue on kbd not including an Arabic layout...

Thank you for the peer review.

  • I was working in VIM and thought that VIM replaces the tab with spaces. I will have to look onto my settings.
  • I used the default value, because Petr told me to do it. I will not use it, if it is not necessary.
  • I will fix the ifs and the comments.

Have a nice day.

3 new commits added

  • Make the code better by using feedback from comment by Adam Williamson
  • Merge branch 'arabic_install' of ssh://pagure.io/forks/lruzicka/fedora-qa/os-autoinst-distri-fedora into arabic_install
  • Add test for Arabic installation.
5 years ago

Using a default value isn't wrong at all, it's just that we don't do it anywhere else and I kinda like to be consistent (otherwise someone looking at the code might think there's a specific need to make the default value "" just here). Now if one of you wanted to submit a PR which changed all the similar code in the project to use default values, we could argue about whether that's technically an improvement! :D

Hum, there's something odd going on now - on the 'Files Changed' tab this PR is shown as including some changes that are from commits I've made to master recently, like the changes on the lib/utils.pm file...but the 'patch' version of the PR doesn't show those changes. Also the 'Commits' tab shows two apparently identical commits by root with the summary "Add test for Arabic installation." Not entirely sure what's happening there...

Also this is not going to work:

get_var("USER_LOGIN") eq "true"

you really need to do what I suggested:

get_var("USER_LOGIN") ne "false"

the two are not equivalent, though at first glance you might think so. USER_LOGIN isn't a true logical boolean, it's just a text string. We don't ever set its value to 'true', in fact. In many tests it's not set at all, which means that the test will create a user called 'test' during install and test user login after install. If it's set to any string other than 'false', then that string is used as the username for the account instead of 'test' - i.e. the normal purpose of the variable is to change the name of the test account. The string 'false' is a magic value meaning "don't create a user during install or try to log in as a user after install at all".

So you really have to check for the magic value 'false' here :)

rebased onto ee68c4c46017160d3f8439b888a8b90acb1174a8

5 years ago

So I just started looking through the needles on this. One problem immediately hits me: the needle for the tag anaconda_workstation_selected has the filenames package_selection_arabic.{json,png}. This is confusing. Needle filenames should just about always be obviously related to the primary needle tag (so the needle files for a needle intended to be matched on the taganaconda_workstation_selected should probably highly resemble that name). Look at other needles as a reference. In this case, other needles with that tag have filenames like workstation_selected.json, workstation_selected-bgo771127.json...so I'd go with workstation_selected_arabic.json in this case.

The install_lang_continue needle match area is too large. Again, follow the other similar needles as a guide: they match a rectangle entirely inside the 'continue' button. The match in the needle proposed here encompasses the entire Continue button, the space between it and the Quit button, and half of the Quit button. This means the needle might stop matching due to a trivial change in button spacing or button border rendering, neither of which is something we want to break tests. In fact, as the text isn't translated, I'd guess you might as well just add the LANGUAGE-arabic tag to the English button's JSON here, I guess. Saves a needle. Or does that needle not match for some reason? Same thing applies to several other needles for untranslated text.

The install_lang_selected, install_lang_continue and install_lang_filtered needles are all in the wrong directory - they're in needles/anaconda/universal/arabic, but should be in needles/anaconda/lang_select/arabic. That directory appears to contain copies of all the needles from needles/anaconda/lang_select/russian instead, which obviously it shouldn't. They're also not named like the equivalent needles in other languages - we call those install_lang_<langname>_selected(-foo).json rather than install_lang_selected-<langname>(-foo).json. That itself is not consistent with other needles, but, uh...may as well stay...consistently inconsistent...I guess? :P That's not a vital point though. Also, the selected needle should also have the filtered tag; this is useful if the language gets pre-selected for some reason.

The new user_created_arabic needle is wrong. It's meant to match on the username, not the spoke icon (a black spoke icon doesn't tell that a user has been created), and because the username is 'qwerty', a new needle shouldn't be needed at all: one of the existing user_created_qwerty needles should actually match. I see you've added the LANGUAGE-arabic tag to user_created_qwerty-20160825.json, which seems correct; if that does not match it may be because the needles include a bit too much blue space to the right of the 'qwerty' text. I'd advise dropping the new needle and ensuring user_created_qwerty-20160825 matches.

The match area of the root_password_screen_arabic needle is too big, it only needs to match the 'Root password:' text.

The user_creation_screen needle match area is a bad idea. It's not good to match in any of the 'themed' areas in anaconda because they have a tendency to change between releases and images. That's why the other needles for this tag match on text elsewhere in the screen. I'd suggest the translated 'first and last name' text entry box title - the bold text above the bold "User name" text.

The anaconda_error_arabic needle seems entirely bogus. That needle is meant to match the "An error has occurred" dialog that pops up when anaconda crashes, not the orange warning bar. I can't figure out why you included this needle, but it's certainly wrong. The needle is only used in the post-fail hook for anaconda tests, where if that screen is showing, we try to upload an anaconda traceback.

The user_creation_arabic needle seems entirely unnecessary, the existing user_creation needle should match fine. Does it not?

layout_ascii_arabic should be called layout_us_arabic (or, possibly, layout_us_rtl, in fact, as this isn't really arabic-specific, it's right-to-left language specific). Same applies to all the other needles for "US / en layout with right-to-left rendering" needles - call them us_arabic or us_rtl not ascii_arabic. Also, rather than gnome for the GDM layout needles and gnome_de for the GNOME overview layout needles, call them gdm and overview, that's what we do in other languages (see e.g. layout_us-gdm and layout_us-overview).

graphical_login_input_arabic should be called login_gdm_input_arabic, and should match on the text input box title and the box itself like the equivalent needles for other languages.

That's all the notes I have from my first look through the needles - thanks!

Hello Adam,
I get your point. As I am in the state of "tabula rasa" for any OpenQA
work, needles included, I guess I will probably have to hit my nose
somewhere to see what the needles should look like ideally. I will try to
revise them according to your suggestions though.
As for the unnecessary needles, the test was stopping at certain locations,
so I added a needle to cover that blind spot. I thought that this approach
could not create unnecessary needles, because if the needles were there,
the test would not have stopped. Am I mistaken?

On Fri, May 18, 2018 at 2:34 AM, Adam Williamson pagure@pagure.io wrote:

adamwill commented on the pull-request: Add test for Arabic installation= , fixes #76. that you are following:
` So I just started looking through the needles on this. One problem immediately hits me: the needle for the taganaconda_workstation_selecte=
dhas the filenamespackage_selection_arabic.{json,png}. This is confusing. Needle filenames should just about always be obviously related to the primary needle tag (so the needle files for a needle intended to b= e matched on the taganaconda_workstation_selectedshould probably highly resemble that name). Look at other needles as a reference. In this case, other needles with that tag have filenames likeworkstation_selected.json,workstation_selected-bgo771127.json...so I'd go withworkstation_selected_arabic.json` in this case.

The install_lang_continue needle match area is too large. Again, follow
the other similar needles as a guide: they match a rectangle entirely
inside
the 'continue' button. The match in the needle proposed here
encompasses the entire Continue button, the space between it and the Quit
button, and half of the Quit button. This means the needle might stop
matching due to a trivial change in button spacing or button border
rendering, neither of which is something we want to break tests. In fact,
as the text isn't translated, I'd guess you might as well just add the
LANGUAGE-arabic tag to the English button's JSON here, I guess. Saves=
a
needle. Or does that needle not match for some reason? Same thing applies
to several other needles for untranslated text.

The install_lang_selected, install_lang_continue and
install_lang_filtered needles are all in the wrong directory - they're =
in
needles/anaconda/universal/arabic, but should be in
needles/anaconda/lang_select/arabic. That directory appears to contain
copies of all the needles from needles/anaconda/lang_select/russian
instead, which obviously it shouldn't. They're also not named like the
equivalent needles in other languages - we call those
install_lang_<langname>_selected(-foo).json rather than
install_lang_selected-<langname>(-foo).json. That itself is not
consistent with other needles, but, uh...may as well stay...consistently
inconsistent...I guess? :P That's not a vital point though. Also, the
selected needle should also have the filtered tag; this is useful if
the language gets pre-selected for some reason.

The new user_created_arabic needle is wrong. It's meant to match on the
username, not the spoke icon (a black spoke icon doesn't tell that a user
has been created), and because the username is 'qwerty', a new needle
shouldn't be needed at all: one of the existing user_created_qwerty needl=
es
should actually match. I see you've added the LANGUAGE-arabic tag to user_created_qwerty-20160825.json, which seems correct; if that does not
match it may be because the needles include a bit too much blue space to
the right of the 'qwerty' text. I'd advise dropping the new needle and
ensuring user_created_qwerty-20160825 matches.

The match area of the root_password_screen_arabic needle is too big, it
only needs to match the 'Root password:' text.

The user_creation_screen needle match area is a bad idea. It's not good
to match in any of the 'themed' areas in anaconda because they have a
tendency to change between releases and images. That's why the other
needles for this tag match on text elsewhere in the screen. I'd suggest t=
he
translated 'first and last name' text entry box title - the bold text abo=
ve
the bold "User name" text.

The anaconda_error_arabic needle seems entirely bogus. That needle is
meant to match the "An error has occurred" dialog that pops up when
anaconda crashes, not the orange warning bar. I can't figure out why you
included this needle, but it's certainly wrong. The needle is only used
in the post-fail hook for anaconda tests, where if that screen is showing=
,
we try to upload an anaconda traceback.

The user_creation_arabic needle seems entirely unnecessary, the existin=
g
user_creation needle should match fine. Does it not?

layout_ascii_arabic should be called layout_us_arabic (or, possibly,
layout_us_rtl, in fact, as this isn't really arabic-specific, it's
right-to-left language specific). Same applies to all the other needles
for "US / en layout with right-to-left rendering" needles - call them
us_arabic or us_rtl not ascii_arabic. Also, rather than gnome for
the GDM layout needles and gnome_de for the GNOME overview layout
needles, call them gdm and overview, that's what we do in other
languages (see e.g. layout_us-gdm and layout_us-overview).

graphical_login_input_arabic should be called login_gdm_input_arabic,
and should match on the text input box title and the box itself like the
equivalent needles for other languages.

That's all the notes I have from my first look through the needles -
thanks!
``

To reply, visit the link below or just reply to this email
https://pagure.io/fedora-qa/os-autoinst-distri-fedora/pull-request/77

--=20

Luk=C3=A1=C5=A1 R=C5=AF=C5=BEi=C4=8Dka

FEDORA QE, RHCE

Red Hat

https://www.redhat.com

Purky=C5=88ova 115

612 45 Brno - Kr=C3=A1lovo Pole

lruzicka@redhat.com
TRIED AND PERSONALLY TESTED, ERGO TRUSTED. https://redhat.com/trusted

"As for the unnecessary needles, the test was stopping at certain locations,
so I added a needle to cover that blind spot. I thought that this approach
could not create unnecessary needles, because if the needles were there,
the test would not have stopped. Am I mistaken?"

No, you're not mistaken, but if an existing needle clearly should have matched, it'd be good to investigate and try if possible to figure out why it didn't, and maybe adjust it to match if that's possible. So, view this as a request to check each case where you had to add a new needle that matched untranslated text, and figure out why the existing needles didn't match at that point :)

1 new commit added

  • Rename the needles to match the tag names for better orientation.
5 years ago

Hum - it seems pagure doesn't send notifications for 'new commit added to existing pull request', at least not by default, so I only just noticed this. Will review ASAP. @pingou is that possibly a Pagure issue?

Sorry, didn't get to this today, will try and do it tomorrow. @tibbs nerd-sniped me into spending all day fixing rpmgrill instead...

OK, so looked over the new commit quickly. So, here's the thing: my big thing is consistency. Whatever you're doing, do it the same way it was done before. If you think the way it was done before is wrong, don't just do this one thing a different way: either get all the other things changed first then do the new thing the same way, or do the new thing the old way then change everything over to a new way later.

What I'm talking about specifically is the needle names/paths like this:

needles/anaconda/install_process/arabic/anaconda_install_root_password_screen_arabic.json

it's not an objectively bad or wrong name, not like before where you had a couple of needles with names that just had nothing to do with the tag at all - but it's not the same as the other languages. There's a model to follow here, and for a first pull request, it'd really be good to just follow the model. The equivalent needles for French are needles/anaconda/install_process/french/root_password_screen_french-20160825.json and needles/anaconda/install_process/french/root_password_screen_french-cantarell101.json , the equivalents for Russian are needles/anaconda/install_process/russian/root_password_screen_russian-20160825.json and needles/anaconda/install_process/russian/root_password_screen_russian-cantarell101.json, the equivalents for Japanese are needles/anaconda/install_process/japanese/root_password_screen_japanese-20161217.json and needles/anaconda/install_process/japanese/root_password_screen_japanese-cantarell101.json.

The existing naming scheme is clear: this needle should be called needles/anaconda/install_process/arabic/root_password_screen_arabic.json. Just as it was before the rename commit, in fact. We can discuss whether the current directory layout and naming scheme is the best choice, and we can change it. Maybe there is a better way to do it - but having just this one set of needles doing it a different way from all the other obviously similar needles isn't the way to go about that. In this PR I'm just trying to get you to add this new test in a way as close as possible to the existing conventions. I didn't suggesting renaming all the needles to include the full tag name in the initial review, so I'm not sure why you did that.

The commit does make some of the changes I suggested, so that part's great. But please revert the changes I didn't ask for :) thanks!

also, of course, there's some stuff I mentioned which wasn't covered in that commit, so we still need that.

Yeah, I will try to get it correct. I do not know, what is a better way. I
only need to get used to some kind of system, because I cannot rely on my
memory. That means that I will forget the contexts quickly when it is not
self explanatory. The names, I used, where suggested by the OpenQA system
and had the tag name involved which I found clever.
Luk.

On Fri, May 25, 2018 at 11:06 PM, Adam Williamson pagure@pagure.io wrote:

adamwill commented on the pull-request: Add test for Arabic installation= , fixes #76. that you are following:
``
OK, so looked over the new commit quickly. So, here's the thing: my big
thing is consistency. Whatever you're doing, do it the same way it was
done before. If you think the way it was done before is wrong, don't just
do this one thing a different way: either get all the other things change=
d
first then do the new thing the same way, or do the new thing the old way
then change everything over to a new way later.

What I'm talking about specifically is the needle names/paths like this:

needles/anaconda/install_process/arabic/anaconda_ install_root_password_screen_arabic.json

it's not an objectively bad or wrong name, not like before where you had =
a
couple of needles with names that just had nothing to do with the tag at
all - but it's not the same as the other languages. There's a model to
follow here, and for a first pull request, it'd really be good to just
follow the model. The equivalent needles for French are
needles/anaconda/install_process/french/root_password_screen_french-2016= 0825.json
and needles/anaconda/install_process/french/root_password_ screen_french-cantarell101.json , the equivalents for Russian are
needles/anaconda/install_process/russian/root_password_screen_russian-20= 160825.json
and needles/anaconda/install_process/russian/root_password_ screen_russian-cantarell101.json, the equivalents for Japanese are
needles/anaconda/install_process/japanese/root_password_screen_japanese-= 20161217.json
and needles/anaconda/install_process/japanese/root_ password_screen_japanese-cantarell101.json.

The existing naming scheme is clear: this needle should be called
needles/anaconda/install_process/arabic/root_password_screen_arabic.json=.
Just as it was before the rename commit, in fact. We can discuss whethe=
r
the current directory layout and naming scheme is the best choice, and we
can change it. Maybe there is a better way to do it - but having just
this one set of needles doing it a different way from all the other
obviously similar needles isn't the way to go about that. In this PR I'm
just trying to get you to add this new test in a way as close as possible
to the existing conventions. I didn't suggesting renaming all the needles
to include the full tag name in the initial review, so I'm not sure why
you did that.

The commit does make some of the changes I suggested, so that part's
great. But please revert the changes I didn't ask for :) thanks!

also, of course, there's some stuff I mentioned which wasn't covered in
that commit, so we still need that.
``

To reply, visit the link below or just reply to this email
https://pagure.io/fedora-qa/os-autoinst-distri-fedora/pull-request/77

--=20

Luk=C3=A1=C5=A1 R=C5=AF=C5=BEi=C4=8Dka

FEDORA QE, RHCE

Red Hat

https://www.redhat.com

Purky=C5=88ova 115

612 45 Brno - Kr=C3=A1lovo Pole

lruzicka@redhat.com
TRIED AND PERSONALLY TESTED, ERGO TRUSTED. https://redhat.com/trusted

rebased onto 1c7941166237f4f2eafe4a21d2f3a3e57f92a484

5 years ago

@lruzicka the way openQA names the needles for you is sort of based on all the needles being in a single big directory, which is how SUSE does it and how we used to do it. When @jskladan came up with the plan to split our needle repo into subdirectories he basically created the subdirectory names from common needle tag prefixes, so if you include the full tag in the needle filename too it's essentially redundant - you have anaconda/install_process in the path name, and anaconda_install in the filename.

Personally I would actually probably favour ditching the subdirectory splits and going back to all needles in a single directory; I don't think the subdirectory split really gains us anything much and it causes various annoyances like this "what directory should this needle go in" dance. But that's outside the scope of this PR - if we're going to do that, we should make it a separate PR.

Why do the last three commits in the series make the JSON files into one-liners? I mean, it's not necessarily a problem, just seems slightly odd. Is that what this new tool you wrote does?

OK, so, this is looking better now. One requested rename is still missing - the layout needles, you used a different naming scheme from all the other languages. For other languages we used layout_(langname)-gdm as the base of the name for the GDM needles, and layout_(langname-overview as the base of the name for the needles that match on the overview screen once logged into GNOME. You used gnome_de and gnome in your filenames. Also, that ascii_arabic name is just wrong; those match on 'us'. As mentioned we should call them something like us_ltr or so (so layout_us_ltr-gdm for instance).

I think I figured out why we have this issue of existing needles not matching when they should: it's to do with the language filtering trick in main.pm. Look at unregister_prefix_tags and cleanup_needles in that file: I came up with this mechanism where, when doing a language-specific test, needles for other languages are un-registered. This is intended to make sure the installer is translated (so e.g. the French install test doesn't pass by matching English needles the whole way, if the installer isn't translated).

This mechanism kinda assumes languages have complete translations, though. So I'd suggest what we should do is throw away all the duplicate needles and add LANGUAGE-arabic tags to all the English needles we actually want to match for the Arabic test (all the cases where we know the text is untranslated, there are no LTR issues, and so the English needle should match). So I'd throw away spoke_done_arabic and add LANGUAGE-arabic tags to all the English spoke_done needles, for e.g. Same for begin_installation, install_lang_continue, user_created (add the tag to the user_created_qwerty needles), install_done-reboot, and getting_started. Does that make sense? Thanks!

Sorry for the long review on this one :)

Hum, additionally, it seems openQA doesn't actually like some of the needles now. Last night I checked out the current version of this pull request onto my pet openQA deployment and tried to run the test, it fails with this error in autoinst-log.txt:

[2018-05-30T21:58:57.0497 PDT] [debug] scheduling _boot_to_anaconda tests/_boot_to_anaconda.pm
[2018-05-30T21:58:57.0498 PDT] [debug] scheduling _check_install_source tests/_check_install_source.pm
[2018-05-30T21:58:57.0498 PDT] [debug] scheduling _software_selection tests/_software_selection.pm
[2018-05-30T21:58:57.0498 PDT] [debug] scheduling disk_guided_empty tests/disk_guided_empty.pm
[2018-05-30T21:58:57.0499 PDT] [debug] scheduling disk_guided_encrypted tests/disk_guided_encrypted.pm
[2018-05-30T21:58:57.0499 PDT] [debug] scheduling _do_install_and_reboot tests/_do_install_and_reboot.pm
[2018-05-30T21:58:57.0500 PDT] [debug] scheduling disk_guided_encrypted_postinstall tests/disk_guided_encrypted_postinstall.pm
[2018-05-30T21:58:57.0501 PDT] [debug] scheduling _graphical_wait_login tests/_graphical_wait_login.pm
[2018-05-30T21:58:57.0501 PDT] [debug] scheduling _graphical_input tests/_graphical_input.pm
[2018-05-30T21:58:57.0501 PDT] [debug] scheduling _console_login tests/_console_login.pm
[2018-05-30T21:58:57.0503 PDT] [debug] init needles from /var/lib/openqa/share/tests/fedora/needles
, or ] expected while parsing array, at character offset 234 (before ""LANGUAGE-arabic"\r\n...") at /usr/libexec/os-autoinst/needle.pm line 62, <$_[...]> chunk 1.

That doesn't tell us which needle file it isn't happy with, which is not much bloody help, but I'm gonna suspect it's these new one-liner ones.

Hello,
well, the tool probably does that. I have corrected the tool to write out exactly the same JSONs as they were before. I also had the one-liners rewritten and sort of hope that this might fix the problem. However, I realized there was some JSON files (one or two) where a comma was missing. I corrected them also.

As far as the Arabic needles that match an untranslated English item are
concerned, why not leave the extra Arabic needles there? It is not that many needles that we could not handle it and it will make the work easier for us, once the screenshots get translated, and I think they eventually will.

I am going to rename the needles that still are not named correctly.

Tomorrow, I will test it in my OpenQA instance.

Thanks for remarks.

rebased onto c57597baf5cc193ade211cde677372156189c2fd

5 years ago

1 new commit added

  • Rename files.
5 years ago

9 new commits added

  • Update area and screenshot.
  • Change tags.
  • Add missing needle and update areas and tags.
  • Update area and tags.
  • Recreate json.
  • Update needles and screenshots for software selection.
  • Rename needles to arabic.
  • Update needles.
  • Update needle.
5 years ago

11 new commits added

  • Update areas.
  • Add screenshots and needles.
  • Update screenshots and areas.
  • Add_needle
  • Update screenshots and areas.
  • Update screenshot and area.
  • Update areas.
  • Update screenshot and area.
  • Update screenshot and area.
  • Update screenshot and area.
  • Update screenshot and area.
5 years ago

"As far as the Arabic needles that match an untranslated English item are
concerned, why not leave the extra Arabic needles there? It is not that many needles that we could not handle it and it will make the work easier for us, once the screenshots get translated, and I think they eventually will."

That's a fair point, I can't really see a basis to say one approach is better than the other. So I guess I'm fine leaving it with your approach now we understand what's going on.

Will review the updated request tomorrow, thanks!

You can review it next week, because I am having an issue with some of the
needles, because originally I created them for Fedora 28ish and they are
failing for Rawhide, so I have been checking on them to make them work
again. Now, I see what you meant when you mentioned that they tend to break
pretty easily. Well, more easily than I would have expected.

That's due to a font change - F28 had cantarell 0.0.25, Rawhide has 0.0.101. 100 was a complete overhaul of the font. That's why there's a ton of 'cantarell100' / 'cantarell101' variant needles in the repo.

I think this test won't ever run on stable releases, so indeed we should just include needles taken from Rawhide, yep.

5 new commits added

  • Fix tag error.
  • Delete old needles.
  • Create new screenshots and needles for Gnome and GDM
  • Update tags in needles.
  • Delete wrong needle.
5 years ago

I have recreated the needles to follow the Rawhide screenshots and the Arabic test is now working.

@adamwill Aren't we running some tests on those respins with updates
(stable Fedora) ?

Dne =C4=8Dt 7. 6. 2018 17:48 u=C5=BEivatel Adam Williamson pagure@pagure.i= o napsal:

adamwill commented on the pull-request: Add test for Arabic installation= , fixes #76. that you are following:
``
That's due to a font change - F28 had cantarell 0.0.25, Rawhide has
0.0.101. 100 was a complete overhaul of the font. That's why there's a to=
n
of 'cantarell100' / 'cantarell101' variant needles in the repo.

I think this test won't ever run on stable releases, so indeed we should
just include needles taken from Rawhide, yep.
``

To reply, visit the link below or just reply to this email
https://pagure.io/fedora-qa/os-autoinst-distri-fedora/pull-request/77

@frantisekz I suppose, that when the test works in the latest Rawhide, it will also work in branched versions that will originate from today's Rawhide. There is no need focusing on old spins with new tests, as they were tested already.

@lruzicka, no, I am talking about the semi-official updates respins which
we are also testing in OpenQA (this for example:
https://openqa.fedoraproject.org/tests/overview?distri=3Dfedora&version=3D2=
8&build=3DFedoraRespin-28-updates-20180603.0&groupid=3D1
)

Those tests are always running on latest stable (F28 atm), not on branched.

Dne p=C3=A1 8. 6. 2018 16:44 u=C5=BEivatel Luk=C3=A1=C5=A1 R=C5=AF=C5=BEi=
=C4=8Dka pagure@pagure.io napsal:

lruzicka commented on the pull-request: Add test for Arabic installation= , fixes #76. that you are following:
@frantisekz I suppose, that when the test works in the latest Rawhide, it will also work in branched versions that will originate from today's Rawhide. There is no need focusing on old spins with new tests, as they were tested already.

To reply, visit the link below or just reply to this email
https://pagure.io/fedora-qa/os-autoinst-distri-fedora/pull-request/77

@frantisekz you're right, but if you look, you'll see no translation tests are included in the set we run on those respins.

There's a duplicate needle: anaconda/install_process/arabic/install_done_arabic-reboot and anaconda/install_process/arabic/install_done_reboot_arabic both exist, there's no need for that.

Aside from that, I think this is looking OK now...I'll check it actually works on staging soon (I'm busy upgrading it ATM).

It would also be good to squash all this down to one commit - do you know how to do that?

Ok, I will remove the unnecessary needle and try to squash the commits. I have done that once, so I will google how to do it to refresh my memory.

rebased onto 07889afb6fd29e50302546f21491a18e25c4a5da

5 years ago

Needle removed, commits squashed into one megacommit.

Small thing: looking at the diff in a console the changes to tests/_console_login.pm have some unnecessary whitespace, like spaces at the ends of lines and several unnecessary spaces on a line after the close of a block. Can you please clean that up, and also rebase on current master? Thanks.

Well, it works - with a rebase and the whitespace cleaned up this is probably ready for merging. Thanks!

rebased onto c1667e01c50767f005c1513fe063711d1eafbfc8

5 years ago

rebased onto 8897fe4

5 years ago

Rebased and whitespaces removed

Pull-Request has been merged by adamwill

5 years ago
Metadata
Changes Summary 61
+16
file added
needles/anaconda/install_destination/arabic/encrypt_data_arabic.json
+0
file added
needles/anaconda/install_destination/arabic/encrypt_data_arabic.png
+16
file added
needles/anaconda/install_destination/arabic/save_passphrase_arabic.json
+0
file added
needles/anaconda/install_destination/arabic/save_passphrase_arabic.png
+16
file added
needles/anaconda/install_process/arabic/install_done_reboot_arabic.json
+0
file added
needles/anaconda/install_process/arabic/install_done_reboot_arabic.png
+16
file added
needles/anaconda/install_process/arabic/layout_native_arabic.json
+0
file added
needles/anaconda/install_process/arabic/layout_native_arabic.png
+17
file added
needles/anaconda/install_process/arabic/layout_us_rtl.json
+0
file added
needles/anaconda/install_process/arabic/layout_us_rtl.png
+16
file added
needles/anaconda/install_process/arabic/root_password_screen_arabic.json
+0
file added
needles/anaconda/install_process/arabic/root_password_screen_arabic.png
+16
file added
needles/anaconda/install_process/arabic/user_created_arabic.json
+0
file added
needles/anaconda/install_process/arabic/user_created_arabic.png
+17
file added
needles/anaconda/install_process/arabic/user_creation_arabic.json
+0
file added
needles/anaconda/install_process/arabic/user_creation_arabic.png
+16
file added
needles/anaconda/install_process/arabic/user_creation_make_admin_arabic.json
+0
file added
needles/anaconda/install_process/arabic/user_creation_make_admin_arabic.png
+16
file added
needles/anaconda/install_process/arabic/user_creation_screen_arabic.json
+0
file added
needles/anaconda/install_process/arabic/user_creation_screen_arabic.png
+1 -0
file changed
needles/anaconda/install_process/user_created_qwerty-20160825.json
+16
file added
needles/anaconda/lang_select/arabic/install_lang_arabic_filtered.json
+0
file added
needles/anaconda/lang_select/arabic/install_lang_arabic_filtered.png
+16
file added
needles/anaconda/lang_select/arabic/install_lang_arabic_selected.json
+0
file added
needles/anaconda/lang_select/arabic/install_lang_arabic_selected.png
+1
file added
needles/anaconda/lang_select/arabic/install_lang_continue_arabic.json
+0
file added
needles/anaconda/lang_select/arabic/install_lang_continue_arabic.png
+1
file added
needles/anaconda/lang_select/arabic/install_lang_selected_arabic.json
+0
file added
needles/anaconda/lang_select/arabic/install_lang_selected_arabic.png
+16
file added
needles/anaconda/main_hub/arabic/begin_installation_arabic.json
+0
file added
needles/anaconda/main_hub/arabic/begin_installation_arabic.png
+16
file added
needles/anaconda/package_selection/arabic/workstation_highlighted_arabic.json
+0
file added
needles/anaconda/package_selection/arabic/workstation_highlighted_arabic.png
+16
file added
needles/anaconda/package_selection/arabic/workstation_selected_arabic.json
+0
file added
needles/anaconda/package_selection/arabic/workstation_selected_arabic.png
+16
file added
needles/anaconda/universal/arabic/rawhide_accept_fate_arabic.json
+0
file added
needles/anaconda/universal/arabic/rawhide_accept_fate_arabic.png
+16
file added
needles/anaconda/universal/arabic/spoke_done_arabic.json
+0
file added
needles/anaconda/universal/arabic/spoke_done_arabic.png
+18
file added
needles/gnome/arabic/desktop_clean_arabic.json
+0
file added
needles/gnome/arabic/desktop_clean_arabic.png
+16
file added
needles/gnome/arabic/getting_started_arabic.json
+0
file added
needles/gnome/arabic/getting_started_arabic.png
+16
file added
needles/gnome/arabic/layout_native_arabic-gdm.json
+0
file added
needles/gnome/arabic/layout_native_arabic-gdm.png
+16
file added
needles/gnome/arabic/layout_native_arabic-overview.json
+0
file added
needles/gnome/arabic/layout_native_arabic-overview.png
+17
file added
needles/gnome/arabic/layout_us_ltr-gdm.json
+0
file added
needles/gnome/arabic/layout_us_ltr-gdm.png
+17
file added
needles/gnome/arabic/layout_us_ltr_overview.json
+0
file added
needles/gnome/arabic/layout_us_ltr_overview.png
+17
file added
needles/gnome/arabic/login_gdm_input_arabic.json
+0
file added
needles/gnome/arabic/login_gdm_input_arabic.png
+16
file added
needles/gnome/arabic/next_button_arabic.json
+0
file added
needles/gnome/arabic/next_button_arabic.png
+16
file added
needles/gnome/arabic/skip_button_arabic.json
+0
file added
needles/gnome/arabic/skip_button_arabic.png
+17 -16
file changed
needles/gnome/getting_started-20160901.json
+3 -2
file changed
needles/gnome/getting_started-cantarell101.json
+62 -0
file changed
templates
+8 -9
file changed
tests/_console_login.pm