1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-06-23 15:01:33 +00:00
os-autoinst-distri-fedora/tests/applications/kwrite/delete_line.pm
Lukáš Růžička d240c08a70 Create a test suite for KWrite
This PR creates a basic test suite for KWrite, the KDE text editor.
Its steps follow the Gnome text editor test case to provide the same
level of checking.

Fixes: https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issue/363
2025-03-06 06:59:57 +00:00

42 lines
869 B
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
# This part tests that a line of text can be deleted
# and the deletion reverted.
sub run {
my $self = shift;
# Click on a word on the line.
assert_and_click("kwrite_line_word", clicktime => 0.3);
wait_still_screen(2);
# Delete the line
send_key("home");
sleep 1;
send_key("shift-end");
sleep 1;
send_key("delete");
sleep 1;
# Move cursor out of the way.
send_key("ctrl-end");
# Check that the line was deleted.
assert_screen "kwrite_line_deleted";
# Use combo to revert the action.
send_key "ctrl-z";
sleep 1;
# Move cursor out of the way.
send_key "ctrl-end";
# Check that the line was re-added.
assert_screen "kwrite_text_added";
}
sub test_flags {
return {always_rollback => 1};
}
1;
# vim: set sw=4 et: