b862803
ae9e757
@@ -176,9 +176,11 @@
"six","seven", "eight", "nine", "mod", "percent", "sub"):
testtags.append(f"calc_button_{button}")
testtags.append(f"kcalc_button_{button}")
- for function in ("sqrt", "arg", "cos"):
- testtags.append(f"calc_function_{function}")
+ for function in ("sqrt", "median", "cos", "ones", "re", "round"):
+ testtags.append(f"calc_select_function_{function}")
testtags.append(f"calc_result_{function}")
+ for category in ("complex", "programming", "rounding", "statistics", "trigonometry", "sundry"):
+ testtags.append(f"calc_functions_{category}")
for result in ("BokZw", "Czo4s", "O9qsL", "WIxiR", "b5y2B", "h7MfO", "qxuBK",
"tWshx", "uC8Ul", "3LAG3"):
testtags.append(f"calc_result_{result}")
@@ -1,16 +1,15 @@
{
"area": [
- "xpos": 458,
- "ypos": 398,
+ "xpos": 472,
+ "ypos": 394,
"width": 65,
- "height": 44,
- "type": "match",
- "match": 90
+ "height": 19,
+ "type": "match"
}
],
"properties": [],
"tags": [
- "calc_function_arg"
+ "calc_functions_complex"
]
\ No newline at end of file
@@ -0,0 +1,15 @@
+ {
+ "area": [
+ "xpos": 470,
+ "ypos": 425,
+ "width": 98,
+ "height": 21,
+ }
+ ],
+ "properties": [],
+ "tags": [
+ "calc_functions_programming"
+ ]
+ "ypos": 455,
+ "width": 73,
+ "height": 24,
+ "calc_functions_rounding"
- "ypos": 498,
- "width": 60,
- "height": 40,
+ "xpos": 467,
+ "ypos": 488,
+ "width": 72,
- "calc_function_cos"
+ "calc_functions_statistics"
+ "xpos": 471,
+ "ypos": 519,
+ "width": 55,
+ "height": 23,
+ "calc_functions_sundry"
+ "ypos": 360,
+ "calc_functions_trigonometry"
+ "xpos": 341,
+ "ypos": 389,
+ "width": 141,
+ "calc_result_cos"
+ "xpos": 339,
+ "ypos": 388,
+ "width": 19,
+ "calc_result_median"
+ "xpos": 343,
+ "ypos": 383,
+ "width": 198,
+ "height": 36,
+ "calc_result_ones"
@@ -1,15 +1,15 @@
- "xpos": 347,
+ "xpos": 345,
"ypos": 385,
- "width": 10,
- "height": 32,
+ "width": 25,
+ "height": 26,
"type": "match"
- "calc_result_arg"
+ "calc_result_re"
+ "xpos": 340,
+ "ypos": 387,
+ "width": 20,
+ "height": 28,
+ "calc_result_round"
+ "xpos": 468,
+ "ypos": 380,
+ "width": 54,
+ "height": 22,
+ "calc_select_function_cos"
+ "ypos": 442,
+ "width": 59,
+ "calc_select_function_median"
+ "xpos": 469,
+ "ypos": 475,
+ "width": 61,
+ "height": 27,
+ "calc_select_function_ones"
+ "ypos": 575,
+ "width": 41,
+ "calc_select_function_re"
- "xpos": 465,
- "ypos": 471,
- "width": 58,
+ "ypos": 476,
+ "width": 70,
"height": 25,
- "calc_function_sqrt"
+ "calc_select_function_round"
+ "ypos": 408,
+ "height": 25,
+ "calc_select_function_sqrt"
@@ -7,24 +7,29 @@
# can use pre-selected functions.
sub use_function {
- my $function = shift;
+ my ($function, $where, $expression) = @_;
assert_and_click("calc_button_fxunified");
- send_key_until_needlematch("calc_function_$function", "down", 50);
- click_lastmatch();
- assert_and_click("calc_button_five");
+ assert_and_click("calc_functions_$where");
+ assert_and_click("calc_select_function_$function");
+ type_safely($expression);
send_key("ret");
assert_screen("calc_result_$function");
assert_and_click("calc_button_clear");
+ # Stop for a moment to let the Calculator clean entry field
+ sleep(1);
sub run {
my $self = shift;
# Wait until everything settles.
- sleep 5;
-
- use_function("sqrt");
- use_function("arg");
- use_function("cos");
+ sleep(5);
+
+ use_function("cos", "trigonometry", "45");
+ use_function("re", "complex", "20");
+ use_function("ones", "programming", "5");
+ use_function("round", "rounding", "5.55");
+ use_function("median", "statistics", "1;2;4;5");
+ use_function("sqrt", "sundry", "5");
sub test_flags {
Calculator changed the way functions are organized within the application which broke the current Calculator test.
This fixes the subroutine to test for Functions and makes the test reliable again.
Fixes: https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issue/428
Build succeeded. https://fedora.softwarefactory-project.io/zuul/buildset/fb10aa85eb834327b744f6fe9a2c3fc7
Gemini review: https://github.com/AdamWill/os-autoinst-distri-fedora-ai-test/pull/22
rebased onto fa8e16a
Build succeeded. https://fedora.softwarefactory-project.io/zuul/buildset/7b7571c4c3664095804377a644962713
1 new commit added
Comment on sleeps to make AI happy
Build succeeded. https://fedora.softwarefactory-project.io/zuul/buildset/c4b8ee98c26143ed9e6818a339d06b70
Thanks. I had this deployed to lab overnight and it looks like the tests passed, so let's call it good.
Pull-Request has been merged by adamwill
Calculator changed the way functions are organized within the
application which broke the current Calculator test.
This fixes the subroutine to test for Functions and makes the
test reliable again.
Fixes: https://pagure.io/fedora-qa/os-autoinst-distri-fedora/issue/428