2022-01-25 13:45:38 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
use utils;
|
|
|
|
|
2022-07-28 20:32:57 +00:00
|
|
|
# This part tests that a line of text can be deleted
|
2022-01-25 13:45:38 +00:00
|
|
|
# and the deletion reverted.
|
|
|
|
|
|
|
|
sub run {
|
|
|
|
my $self = shift;
|
|
|
|
# Click on a word on the line.
|
2022-07-28 20:32:57 +00:00
|
|
|
assert_and_click("gte_line_word", clicktime => 0.3);
|
2022-01-25 13:45:38 +00:00
|
|
|
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 "gte_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 "gte_text_added";
|
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
2022-07-28 20:32:57 +00:00
|
|
|
return {always_rollback => 1};
|
2022-01-25 13:45:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|