mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2025-02-22 15:14:32 +00:00
48 lines
1.1 KiB
Perl
48 lines
1.1 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
|
|
sub delete_result {
|
|
send_key("esc");
|
|
}
|
|
|
|
|
|
sub run {
|
|
# Starting the application
|
|
send_key("super");
|
|
type_string("Calculator", max_interval => 10);
|
|
send_key("ret");
|
|
assert_screen("calculator_runs");
|
|
|
|
# Add two numbers using buttons
|
|
assert_and_click("calculator_button_five");
|
|
assert_and_click("calculator_button_add");
|
|
assert_and_click("calculator_button_seven");
|
|
assert_and_click("calculator_button_equals");
|
|
assert_and_click("calculator_result_addition");
|
|
|
|
delete_result();
|
|
|
|
# Multiply two numbers using keyboard
|
|
#assert_and_click("calculator_entry_field");
|
|
type_string("12*15", max_interval => 10);
|
|
send_key("ret");
|
|
assert_screen("calculator_result_multiplication");
|
|
|
|
delete_result();
|
|
|
|
# Complex calculations using keyboard
|
|
send_key("ctrl-alt-k");
|
|
send_key("esc");
|
|
type_string('((2+3)*10)/(4-2)', max_interval => 10);
|
|
send_key("ret");
|
|
assert_screen("calculator_result_complex");
|
|
}
|
|
|
|
sub test_flags {
|
|
return {fatal => 1};
|
|
}
|
|
|
|
1;
|