diff --git a/lib/utils.pm b/lib/utils.pm index c63b9e2c..7c52ddf6 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -1509,17 +1509,31 @@ sub check_and_install_git { } # This routine is used in Desktop test suites. It downloads the test data from -# the repository and puts the file into correct locations. +# the repository and populates the directory structure. +# The data repository is located at https://pagure.io/fedora-qa/openqa_testdata. + sub download_testdata { - my ($repodir, $location) = @_; - # Navigate to the test's home directory - assert_script_run("cd /home/test/"); - # Clone the test repository; - assert_script_run("git clone https://pagure.io/fedora-qa/openqa_testdata.git"); - # Copy the test data into $repodir to $location. - assert_script_run("cp openqa_testdata/$repodir/* $location"); + # Navigate to the user's home directory + my $user = get_var("USER_LOGIN") // "test"; + assert_script_run("cd /home/$user/"); + # Create a temporary directory to unpack the zipped file. + assert_script_run("mkdir temp"); + assert_script_run("cd temp"); + # Download the compressed file with the repository content. + assert_script_run("wget https://pagure.io/fedora-qa/openqa_testdata/blob/thetree/f/repository.tar.gz", timeout => 120); + # Untar it. + assert_script_run("tar -zxvf repository.tar.gz"); + # Copy out the files into the VMs directory structure. + assert_script_run("cp music/* /home/$user/Music"); + assert_script_run("cp documents/* /home/$user/Documents"); + assert_script_run("cp pictures/* /home/$user/Pictures"); + assert_script_run("cp video/* /home/$user/Videos"); + assert_script_run("cp reference/* /home/$user/"); + # Delete the temporary directory and the downloaded file. + assert_script_run("cd"); + assert_script_run("rm -rf /home/$user/temp"); # Change ownership - assert_script_run("chown -R test:test $location"); + assert_script_run("chown -R test:test /home/$user/"); } # On Fedora, the serial console is not writable for regular users which lames diff --git a/needles/gnome/apps/eog/eog_file_select_jpg.json b/needles/gnome/apps/eog/eog_file_select_jpg.json index a8d17f39..5308396f 100644 --- a/needles/gnome/apps/eog/eog_file_select_jpg.json +++ b/needles/gnome/apps/eog/eog_file_select_jpg.json @@ -1,15 +1,15 @@ -{ - "area": [ - { - "height": 15, - "type": "match", - "width": 71, - "xpos": 330, - "ypos": 157 - } - ], - "properties": [], - "tags": [ - "eog_file_select_jpg" - ] +{ + "area": [ + { + "type": "match", + "height": 15, + "width": 71, + "xpos": 188, + "ypos": 182 + } + ], + "properties": [], + "tags": [ + "eog_file_select_jpg" + ] } \ No newline at end of file diff --git a/needles/gnome/apps/eog/eog_file_select_jpg.png b/needles/gnome/apps/eog/eog_file_select_jpg.png index 9904185f..d22687f9 100644 Binary files a/needles/gnome/apps/eog/eog_file_select_jpg.png and b/needles/gnome/apps/eog/eog_file_select_jpg.png differ diff --git a/needles/gnome/apps/eog/eog_image_background.json b/needles/gnome/apps/eog/eog_image_background.json index a2b0ffee..d700f349 100644 --- a/needles/gnome/apps/eog/eog_image_background.json +++ b/needles/gnome/apps/eog/eog_image_background.json @@ -1,11 +1,11 @@ { "area": [ { - "width": 71, + "xpos": 14, + "ypos": 6, "type": "match", - "ypos": 7, - "height": 91, - "xpos": 14 + "width": 71, + "height": 91 } ], "properties": [], diff --git a/needles/gnome/apps/eog/eog_image_background.png b/needles/gnome/apps/eog/eog_image_background.png index f2b85ee8..a3f43135 100644 Binary files a/needles/gnome/apps/eog/eog_image_background.png and b/needles/gnome/apps/eog/eog_image_background.png differ diff --git a/needles/gnome/apps/eog/eog_image_default.json b/needles/gnome/apps/eog/eog_image_default.json index b298679a..24f6eb05 100644 --- a/needles/gnome/apps/eog/eog_image_default.json +++ b/needles/gnome/apps/eog/eog_image_default.json @@ -1,8 +1,8 @@ { "area": [ { - "xpos": 515, - "ypos": 469, + "ypos": 470, + "xpos": 521, "width": 183, "height": 117, "type": "match" diff --git a/needles/gnome/apps/eog/eog_image_default.png b/needles/gnome/apps/eog/eog_image_default.png index 602a16bc..2a8956fd 100644 Binary files a/needles/gnome/apps/eog/eog_image_default.png and b/needles/gnome/apps/eog/eog_image_default.png differ diff --git a/needles/gnome/apps/eog/eog_image_next.json b/needles/gnome/apps/eog/eog_image_next.json index f56433fe..e4be5b0d 100644 --- a/needles/gnome/apps/eog/eog_image_next.json +++ b/needles/gnome/apps/eog/eog_image_next.json @@ -1,11 +1,11 @@ { "area": [ { - "xpos": 403, - "ypos": 355, - "width": 155, + "type": "match", "height": 95, - "type": "match" + "width": 155, + "xpos": 408, + "ypos": 355 } ], "properties": [], diff --git a/needles/gnome/apps/eog/eog_image_next.png b/needles/gnome/apps/eog/eog_image_next.png index 3469ce09..08fb49f6 100644 Binary files a/needles/gnome/apps/eog/eog_image_next.png and b/needles/gnome/apps/eog/eog_image_next.png differ diff --git a/needles/gnome/apps/eog/eog_img_info.json b/needles/gnome/apps/eog/eog_img_info.json index 3bb2e826..b7a3ca23 100644 --- a/needles/gnome/apps/eog/eog_img_info.json +++ b/needles/gnome/apps/eog/eog_img_info.json @@ -1,11 +1,11 @@ { "area": [ { - "xpos": 816, - "ypos": 91, + "type": "match", "width": 205, "height": 285, - "type": "match" + "xpos": 819, + "ypos": 91 } ], "properties": [], diff --git a/needles/gnome/apps/eog/eog_img_info.png b/needles/gnome/apps/eog/eog_img_info.png index 70feacba..53eb07ed 100644 Binary files a/needles/gnome/apps/eog/eog_img_info.png and b/needles/gnome/apps/eog/eog_img_info.png differ diff --git a/needles/gnome/apps/eog/eog_picture_name.json b/needles/gnome/apps/eog/eog_picture_name.json index 92c410aa..4857c370 100644 --- a/needles/gnome/apps/eog/eog_picture_name.json +++ b/needles/gnome/apps/eog/eog_picture_name.json @@ -1,11 +1,11 @@ { "area": [ { - "xpos": 475, - "ypos": 47, "width": 75, "height": 21, - "type": "match" + "type": "match", + "ypos": 47, + "xpos": 475 } ], "properties": [], diff --git a/needles/gnome/apps/eog/eog_picture_name.png b/needles/gnome/apps/eog/eog_picture_name.png index 0e8c1bb9..53b80dc2 100644 Binary files a/needles/gnome/apps/eog/eog_picture_name.png and b/needles/gnome/apps/eog/eog_picture_name.png differ diff --git a/needles/gnome/apps/eog/eog_side_panel.json b/needles/gnome/apps/eog/eog_side_panel.json index 57b367f8..f4d3cec2 100644 --- a/needles/gnome/apps/eog/eog_side_panel.json +++ b/needles/gnome/apps/eog/eog_side_panel.json @@ -1,11 +1,11 @@ { "area": [ { - "xpos": 793, - "ypos": 93, "width": 162, "height": 22, - "type": "match" + "type": "match", + "ypos": 93, + "xpos": 797 } ], "properties": [], diff --git a/needles/gnome/apps/eog/eog_side_panel.png b/needles/gnome/apps/eog/eog_side_panel.png index cb7968c3..43799ffa 100644 Binary files a/needles/gnome/apps/eog/eog_side_panel.png and b/needles/gnome/apps/eog/eog_side_panel.png differ diff --git a/needles/gnome/apps/gnome-text-editor/gte_txt_file.json b/needles/gnome/apps/gnome-text-editor/gte_txt_file.json new file mode 100644 index 00000000..49e84bb0 --- /dev/null +++ b/needles/gnome/apps/gnome-text-editor/gte_txt_file.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 200, + "ypos": 180, + "type": "match", + "width": 66, + "height": 20 + } + ], + "properties": [], + "tags": [ + "gte_txt_file" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/gnome-text-editor/gte_txt_file.png b/needles/gnome/apps/gnome-text-editor/gte_txt_file.png new file mode 100644 index 00000000..70951a80 Binary files /dev/null and b/needles/gnome/apps/gnome-text-editor/gte_txt_file.png differ diff --git a/tests/applications/eog/aaa_setup.pm b/tests/applications/eog/aaa_setup.pm index dd9c11b5..4f1bab69 100644 --- a/tests/applications/eog/aaa_setup.pm +++ b/tests/applications/eog/aaa_setup.pm @@ -13,7 +13,7 @@ sub run { # Perform git test check_and_install_git(); # Download the test data - download_testdata("eog", "Pictures"); + download_testdata(); # Exit the terminal desktop_vt; diff --git a/tests/applications/eog/save_as.pm b/tests/applications/eog/save_as.pm index 3564d883..8fe15901 100644 --- a/tests/applications/eog/save_as.pm +++ b/tests/applications/eog/save_as.pm @@ -27,7 +27,7 @@ sub run { assert_script_run("ls /home/test/Pictures/"); # Compare the files - assert_script_run("diff /home/test/Pictures/image.jpg /home/test/Pictures/new_image.jpg"); + assert_script_run("diff /home/test/Pictures/leaves.jpg /home/test/Pictures/new_image.jpg"); } sub test_flags { diff --git a/tests/applications/evince/aaa_setup.pm b/tests/applications/evince/aaa_setup.pm index da65a8cb..bbe3529f 100644 --- a/tests/applications/evince/aaa_setup.pm +++ b/tests/applications/evince/aaa_setup.pm @@ -14,7 +14,7 @@ sub run { # Perform git test check_and_install_git(); # Download the test data - download_testdata("evince", "Documents"); + download_testdata(); # Exit the terminal desktop_vt; diff --git a/tests/applications/gnome-text-editor/aaa_setup.pm b/tests/applications/gnome-text-editor/aaa_setup.pm index f1c78d50..c8faa7c4 100644 --- a/tests/applications/gnome-text-editor/aaa_setup.pm +++ b/tests/applications/gnome-text-editor/aaa_setup.pm @@ -13,7 +13,7 @@ sub run { # Get the test data from the test data repository. check_and_install_git(); - download_testdata("gnome-text-editor", "Documents"); + download_testdata(); # Remove gedit on upgraded systems so we don't launch it by accident script_run("dnf -y remove gedit") if (get_var("IMAGETYPE") eq "upgrade"); # Return to Desktop