Create a Calculator test for the Flock talk.
15
needles/flock/calculator_button_add-20230728.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 390,
|
||||
"ypos": 562,
|
||||
"width": 18,
|
||||
"height": 21,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"calculator_button_add"
|
||||
]
|
||||
}
|
BIN
needles/flock/calculator_button_add-20230728.png
Normal file
After Width: | Height: | Size: 758 KiB |
15
needles/flock/calculator_button_equals-20230728.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 455,
|
||||
"ypos": 539,
|
||||
"width": 25,
|
||||
"height": 21,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"calculator_button_equals"
|
||||
]
|
||||
}
|
BIN
needles/flock/calculator_button_equals-20230728.png
Normal file
After Width: | Height: | Size: 759 KiB |
15
needles/flock/calculator_button_five-20230727.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 254,
|
||||
"ypos": 466,
|
||||
"width": 18,
|
||||
"height": 19,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"calculator_button_five"
|
||||
]
|
||||
}
|
BIN
needles/flock/calculator_button_five-20230727.png
Normal file
After Width: | Height: | Size: 719 KiB |
15
needles/flock/calculator_button_seven-20230728.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 181,
|
||||
"ypos": 416,
|
||||
"width": 26,
|
||||
"height": 24,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"calculator_button_seven"
|
||||
]
|
||||
}
|
BIN
needles/flock/calculator_button_seven-20230728.png
Normal file
After Width: | Height: | Size: 720 KiB |
15
needles/flock/calculator_result_addition-20230728.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 162,
|
||||
"ypos": 285,
|
||||
"width": 29,
|
||||
"height": 33,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"calculator_result_addition"
|
||||
]
|
||||
}
|
BIN
needles/flock/calculator_result_addition-20230728.png
Normal file
After Width: | Height: | Size: 761 KiB |
15
needles/flock/calculator_result_complex-20230728.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 182,
|
||||
"ypos": 532,
|
||||
"width": 31,
|
||||
"height": 34,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"calculator_result_complex"
|
||||
]
|
||||
}
|
BIN
needles/flock/calculator_result_complex-20230728.png
Normal file
After Width: | Height: | Size: 572 KiB |
15
needles/flock/calculator_result_multiplication-20230728.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 163,
|
||||
"ypos": 283,
|
||||
"width": 40,
|
||||
"height": 32,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"calculator_result_multiplication"
|
||||
]
|
||||
}
|
BIN
needles/flock/calculator_result_multiplication-20230728.png
Normal file
After Width: | Height: | Size: 725 KiB |
15
needles/flock/calculator_runs-20230727.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 115,
|
||||
"ypos": 4,
|
||||
"width": 93,
|
||||
"height": 22,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"calculator_runs"
|
||||
]
|
||||
}
|
BIN
needles/flock/calculator_runs-20230727.png
Normal file
After Width: | Height: | Size: 719 KiB |
@ -338,6 +338,17 @@
|
||||
},
|
||||
"version": "*"
|
||||
},
|
||||
"fedora-Flock-x86_64-*": {
|
||||
"arch": "x86_64",
|
||||
"distri": "fedora",
|
||||
"flavor": "Flock",
|
||||
"settings": {
|
||||
"DESKTOP": "gnome",
|
||||
"LIVE": "1",
|
||||
"TEST_TARGET": "ISO"
|
||||
},
|
||||
"version": "*"
|
||||
},
|
||||
"fedora-Workstation-upgrade-x86_64-*": {
|
||||
"arch": "x86_64",
|
||||
"distri": "fedora",
|
||||
@ -545,6 +556,10 @@
|
||||
"machine": "64bit",
|
||||
"product": "fedora-Workstation-live-iso-x86_64-*"
|
||||
},
|
||||
"fedora-Flock-x86_64-*-64bit": {
|
||||
"machine": "64bit",
|
||||
"product": "fedora-Flock-x86_64-*"
|
||||
},
|
||||
"fedora-Workstation-upgrade-x86_64-*-64bit": {
|
||||
"machine": "64bit",
|
||||
"product": "fedora-Workstation-upgrade-x86_64-*"
|
||||
@ -1037,19 +1052,12 @@
|
||||
},
|
||||
"calculator": {
|
||||
"profiles": {
|
||||
"fedora-Silverblue-dvd_ostree-iso-ppc64le-*-ppc64le": 50,
|
||||
"fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50,
|
||||
"fedora-Workstation-live-iso-ppc64le-*-ppc64le": 20,
|
||||
"fedora-Workstation-live-iso-x86_64-*-64bit": 20,
|
||||
"fedora-Workstation-upgrade-x86_64-*-64bit": 40,
|
||||
"fedora-Workstation-upgrade-aarch64-*-aarch64": 40,
|
||||
"fedora-Workstation-raw_xz-raw.xz-aarch64-*-aarch64": 22
|
||||
"fedora-Flock-x86_64-*-64bit": 20
|
||||
},
|
||||
"settings": {
|
||||
"BOOTFROM": "c",
|
||||
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
|
||||
"POSTINSTALL_PATH": "tests/applications/calculator",
|
||||
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%"
|
||||
"HDD_1": "workstation.qcow2",
|
||||
"ENTRYPOINT":"_graphical_wait_login calculator"
|
||||
}
|
||||
},
|
||||
"clocks": {
|
||||
|
47
tests/calculator.pm
Normal file
@ -0,0 +1,47 @@
|
||||
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;
|