Commit ec31a411 authored by Harald Sitter's avatar Harald Sitter 🚔

add test dir

parent dfefd963
This diff is collapsed.
package distribution_neon;
use base 'distribution';
use strict;
use testapi qw(send_key %cmd assert_screen check_screen check_var get_var match_has_tag set_var type_password type_string wait_idle wait_serial mouse_hide send_key_until_needlematch record_soft_failure wait_still_screen wait_screen_change);
sub init() {
my ($self) = @_;
$self->SUPER::init();
}
sub x11_start_program($$$) {
my ($self, $program, $timeout, $options) = @_;
# enable valid option as default
$options->{valid} //= 1;
send_key "alt-f2";
mouse_hide(1);
check_screen("desktop-runner", $timeout);
type_string $program;
wait_idle 5;
send_key "ret";
wait_still_screen;
}
1;
# vim: set sw=4 et:
# Copyright (C) 2016-2017 Harald Sitter <sitter@kde.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License or (at your option) version 3 or any later version
# accepted by the membership of KDE e.V. (or its successor approved
# by the membership of KDE e.V.), which shall act as a proxy
# defined in Section 14 of version 3 of the license.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# use testapi qw/check_var get_var set_var/;
# use lockapi;
# use needle;
use strict;
use warnings;
use testapi;
use autotest;
use File::Basename;
BEGIN {
unshift @INC, dirname(__FILE__) . '/../../lib';
}
# init_main();
my $distri = testapi::get_var("CASEDIR") . '/lib/distribution_neon.pm';
require $distri;
testapi::set_distribution(distribution_neon->new());
autotest::loadtest "tests/boot.pm";
1;
# vim: set sw=4 et:
{
"area": [
{
"xpos": 0,
"type": "match",
"width": 548,
"height": 264,
"ypos": 0
}
],
"properties": [],
"tags": [
"bootloader",
"ENV-DISTRI-opensuse"
]
}
{
"tags": [
"desktop-runner",
"ENV-DESKTOP-kde"
],
"area": [
{
"xpos": 254,
"type": "match",
"width": 513,
"ypos": 2,
"height": 32
}
],
"properties": []
}
\ No newline at end of file
{
"area": [
{
"xpos": 0,
"type": "match",
"width": 1024,
"height": 768,
"ypos": 0
}
],
"properties": [],
"tags": [
"desktop",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"xpos": 0,
"type": "match",
"width": 128,
"height": 128,
"ypos": 0,
"match": 90
}
],
"properties": [],
"tags": [
"installer-icon",
"ENV-DISTRI-neon"
]
}
{
"area": [
{
"xpos": 0,
"type": "match",
"width": 914,
"height": 561,
"ypos": 0,
"match": 99
}
],
"properties": [],
"tags": [
"installer-welcome",
"ENV-DISTRI-neon"
]
}
# Copyright (C) 2016-2017 Harald Sitter <sitter@kde.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License or (at your option) version 3 or any later version
# accepted by the membership of KDE e.V. (or its successor approved
# by the membership of KDE e.V.), which shall act as a proxy
# defined in Section 14 of version 3 of the license.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
use base "basetest";
use strict;
use testapi;
sub run {
# wait for bootloader to appear
assert_screen 'bootloader', 10;
# # press enter to boot right away
# send_key "ret";
# wait for the desktop to appear
assert_screen 'desktop', 60;
x11_start_program 'kwrite';
assert_and_click "installer-icon";
# assert_screen "installer-welcome", 10;
}
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 { important => 1 };
}
1;
# vim: set sw=4 et:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment