1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-12 01:44:21 +00:00

add QA:Testcase_desktop_browser test

Summary:
pretty simple stuff here. The distinction between 'firefox' and
'browser' is that the 'browser' needles I expect would also be
correct for other default browsers, while the 'firefox' needles
are specific to Firefox. We need '-kde' variants of some Firefox
needles where interface text is included, because the font is
Cantarell in GNOME but whatever the default 'sans' font is in
KDE - I suppose we should really use -thatfontsname rather than
-kde, but I can't think what it's called...

I couldn't do the 'log in to FAS' bit of the test since we don't
really have a sane way to provide a password while not exposing
it to the public.

Test Plan:
Run the test, check it works - for both KDE and
Workstation.

Reviewers: jskladan, garretraziel

Reviewed By: garretraziel

Subscribers: tflink

Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D938
This commit is contained in:
Adam Williamson 2016-08-03 13:22:29 -07:00
parent a901fce4ab
commit a8ddc002f8
25 changed files with 282 additions and 2 deletions

View File

@ -0,0 +1,15 @@
{
"tags": [
"browser_fas_home"
],
"area": [
{
"xpos": 207,
"ypos": 299,
"width": 295,
"height": 13,
"type": "match"
}
],
"properties": []
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"area": [
{
"xpos": 506,
"ypos": 527,
"width": 55,
"height": 18,
"type": "match"
}
],
"tags": [
"browser_kernelorg_patch"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"area": [
{
"xpos": 141,
"ypos": 468,
"width": 19,
"height": 18,
"type": "match"
}
],
"tags": [
"firefox_addon_add"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

View File

@ -0,0 +1,22 @@
{
"tags": [
"firefox_addon_install"
],
"properties": [],
"area": [
{
"xpos": 46,
"ypos": 103,
"width": 60,
"height": 62,
"type": "match"
},
{
"xpos": 425,
"ypos": 221,
"width": 38,
"height": 11,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

View File

@ -0,0 +1,22 @@
{
"tags": [
"firefox_addon_install"
],
"properties": [],
"area": [
{
"xpos": 43,
"ypos": 143,
"width": 64,
"height": 63,
"type": "match"
},
{
"xpos": 456,
"ypos": 280,
"width": 43,
"height": 14,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

View File

@ -0,0 +1,22 @@
{
"tags": [
"firefox_addon_success"
],
"area": [
{
"xpos": 45,
"ypos": 143,
"width": 63,
"height": 63,
"type": "match"
},
{
"xpos": 949,
"ypos": 105,
"width": 20,
"height": 19,
"type": "match"
}
],
"properties": []
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

View File

@ -0,0 +1,16 @@
{
"tags": [
"browser_download_complete",
"firefox_download_complete"
],
"properties": [],
"area": [
{
"xpos": 829,
"ypos": 102,
"width": 34,
"height": 26,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 351,
"ypos": 385,
"width": 60,
"height": 13,
"type": "match"
}
],
"properties": [],
"tags": [
"browser_download_save"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

View File

@ -0,0 +1,16 @@
{
"area": [
{
"xpos": 324,
"ypos": 427,
"width": 59,
"height": 14,
"type": "match"
}
],
"properties": [],
"tags": [
"browser_download_save",
"firefox_download_save"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

View File

@ -17,6 +17,7 @@
}
],
"tags": [
"firefox"
"firefox",
"browser"
]
}

View File

@ -0,0 +1,17 @@
{
"tags": [
"DESKTOP-gnome",
"browser_launcher",
"firefox_launcher"
],
"properties": [],
"area": [
{
"xpos": 18,
"ypos": 136,
"width": 59,
"height": 57,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 KiB

View File

@ -0,0 +1,16 @@
{
"tags": [
"browser_launcher",
"firefox_launcher"
],
"properties": [],
"area": [
{
"xpos": 39,
"ypos": 271,
"width": 31,
"height": 31,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 KiB

View File

@ -292,6 +292,28 @@
},
test_suite => { name => "desktop_terminal" },
},
{
machine => { name => "64bit" },
prio => 30,
product => {
arch => "x86_64",
distri => "fedora",
flavor => "Workstation-live-iso",
version => "*",
},
test_suite => { name => "desktop_browser" },
},
{
machine => { name => "64bit" },
prio => 32,
product => {
arch => "x86_64",
distri => "fedora",
flavor => "KDE-live-iso",
version => "*",
},
test_suite => { name => "desktop_browser" },
},
{
machine => { name => "64bit" },
prio => 30,
@ -1934,6 +1956,15 @@
{ key => "HDD_1", value => "disk_%FLAVOR%_%MACHINE%.qcow2" },
],
},
{
name => "desktop_browser",
settings => [
{ key => "POSTINSTALL", value => "desktop_browser" },
{ key => "START_AFTER_TEST", value => "install_default_upload" },
{ key => "BOOTFROM", value => "c" },
{ key => "HDD_1", value => "disk_%FLAVOR%_%MACHINE%.qcow2" },
],
},
{
name => "install_kickstart_nfs",
settings => [

View File

@ -0,0 +1,57 @@
use base "installedtest";
use strict;
use testapi;
sub run {
my $self = shift;
assert_screen 'graphical_desktop_clean';
send_key 'alt-f1';
# wait out animations
wait_still_screen 2;
assert_and_click 'browser_launcher';
assert_screen 'browser';
# open a new tab so we don't race with the default page load
# (also focuses the location bar for us)
send_key 'ctrl-t';
wait_still_screen 2;
# check FAS
type_string "https://admin.fedoraproject.org/accounts/\n";
assert_screen "browser_fas_home";
send_key 'ctrl-t';
wait_still_screen 2;
type_string "https://kernel.org\n";
assert_and_click "browser_kernelorg_patch";
assert_and_click "browser_download_save";
send_key 'ret';
# browsers do...something...when the download completes, and we
# expect there's a single click to make it go away and return
# browser to a state where ctrl-t will work
assert_and_click "browser_download_complete";
# we'll check it actually downloaded later
# add-on test: at present all desktops we test (KDE, GNOME) are
# using Firefox by default so we do this unconditionally, but we
# may need to conditionalize it if we ever test desktops whose
# default browser doesn't support add-ons or uses different ones
send_key 'ctrl-t';
wait_still_screen 2;
type_string "https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/\n";
assert_and_click "firefox_addon_add";
assert_and_click "firefox_addon_install";
assert_and_click "firefox_addon_success";
# go to a console and check download worked
$self->root_console(tty=>3);
my $user = get_var("USER_LOGIN", "test");
assert_script_run "test -e /home/$user/Downloads/patch-*.xz";
}
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 { fatal => 1 };
}
1;
# vim: set sw=4 et: