diff --git a/check-needles.py b/check-needles.py index 9e0d748e..f94142cb 100755 --- a/check-needles.py +++ b/check-needles.py @@ -176,6 +176,9 @@ for button in ("div", "divider", "zero", "one", "two", "three", "four", "five", "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}") + testtags.append(f"calc_result_{function}") for result in ("BokZw", "Czo4s", "O9qsL", "WIxiR", "b5y2B", "h7MfO", "qxuBK", "tWshx", "uC8Ul", "3LAG3"): testtags.append(f"calc_result_{result}") diff --git a/needles/gnome/apps/calculator/calc_button_bclose-20250319.png b/needles/gnome/apps/calculator/calc_button_bclose-20250319.png deleted file mode 100644 index abea1710..00000000 Binary files a/needles/gnome/apps/calculator/calc_button_bclose-20250319.png and /dev/null differ diff --git a/needles/gnome/apps/calculator/calc_button_bclose.json b/needles/gnome/apps/calculator/calc_button_bclose.json deleted file mode 100644 index 776eb953..00000000 --- a/needles/gnome/apps/calculator/calc_button_bclose.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "area": [ - { - "xpos": 313, - "ypos": 371, - "width": 32, - "height": 31, - "type": "match" - } - ], - "properties": [], - "tags": [ - "calc_button_bclose" - ] -} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_button_bclose.png b/needles/gnome/apps/calculator/calc_button_bclose.png deleted file mode 100644 index e16d0605..00000000 Binary files a/needles/gnome/apps/calculator/calc_button_bclose.png and /dev/null differ diff --git a/needles/gnome/apps/calculator/calc_button_bopen-20220818.png b/needles/gnome/apps/calculator/calc_button_bopen-20220818.png deleted file mode 100644 index 7c994b9d..00000000 Binary files a/needles/gnome/apps/calculator/calc_button_bopen-20220818.png and /dev/null differ diff --git a/needles/gnome/apps/calculator/calc_button_bopen-20250319.png b/needles/gnome/apps/calculator/calc_button_bopen-20250319.png deleted file mode 100644 index 70503953..00000000 Binary files a/needles/gnome/apps/calculator/calc_button_bopen-20250319.png and /dev/null differ diff --git a/needles/gnome/apps/calculator/calc_button_clear-20250717.json b/needles/gnome/apps/calculator/calc_button_clear-20250717.json new file mode 100644 index 00000000..d78c718d --- /dev/null +++ b/needles/gnome/apps/calculator/calc_button_clear-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 362, + "ypos": 467, + "width": 27, + "height": 28, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_button_clear" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_button_clear-20250717.png b/needles/gnome/apps/calculator/calc_button_clear-20250717.png new file mode 100644 index 00000000..6dbd06a9 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_button_clear-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_button_fxunified-20250717.json b/needles/gnome/apps/calculator/calc_button_fxunified-20250717.json new file mode 100644 index 00000000..9a5eb0a2 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_button_fxunified-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 555, + "ypos": 663, + "width": 52, + "height": 21, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_button_fxunified" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_button_fxunified-20250717.png b/needles/gnome/apps/calculator/calc_button_fxunified-20250717.png new file mode 100644 index 00000000..345734e1 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_button_fxunified-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_button_bclose-20250319.json b/needles/gnome/apps/calculator/calc_button_lower-20250717.json similarity index 52% rename from needles/gnome/apps/calculator/calc_button_bclose-20250319.json rename to needles/gnome/apps/calculator/calc_button_lower-20250717.json index a932bb03..28bfcb6b 100644 --- a/needles/gnome/apps/calculator/calc_button_bclose-20250319.json +++ b/needles/gnome/apps/calculator/calc_button_lower-20250717.json @@ -1,15 +1,15 @@ { "area": [ { - "width": 32, - "height": 31, - "ypos": 471, "xpos": 494, + "ypos": 468, + "width": 34, + "height": 28, "type": "match" } ], "properties": [], "tags": [ - "calc_button_bclose" + "calc_button_lower" ] } \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_button_lower-20250717.png b/needles/gnome/apps/calculator/calc_button_lower-20250717.png new file mode 100644 index 00000000..c67c5e6d Binary files /dev/null and b/needles/gnome/apps/calculator/calc_button_lower-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_button_upper-20250717.json b/needles/gnome/apps/calculator/calc_button_upper-20250717.json new file mode 100644 index 00000000..d86b1902 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_button_upper-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 428, + "ypos": 471, + "width": 35, + "height": 23, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_button_upper" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_button_upper-20250717.png b/needles/gnome/apps/calculator/calc_button_upper-20250717.png new file mode 100644 index 00000000..3c7ad6c2 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_button_upper-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_button_upper-20250718.json b/needles/gnome/apps/calculator/calc_button_upper-20250718.json new file mode 100644 index 00000000..658bc421 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_button_upper-20250718.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 430, + "ypos": 468, + "width": 31, + "height": 28, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_button_upper" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_button_upper-20250718.png b/needles/gnome/apps/calculator/calc_button_upper-20250718.png new file mode 100644 index 00000000..aa1c91a4 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_button_upper-20250718.png differ diff --git a/needles/gnome/apps/calculator/calc_button_xunified-20250717.json b/needles/gnome/apps/calculator/calc_button_xunified-20250717.json new file mode 100644 index 00000000..2fb7425c --- /dev/null +++ b/needles/gnome/apps/calculator/calc_button_xunified-20250717.json @@ -0,0 +1,19 @@ +{ + "area": [ + { + "xpos": 494, + "ypos": 662, + "width": 43, + "height": 26, + "type": "match", + "click_point": { + "xpos": 15.5, + "ypos": 14 + } + } + ], + "properties": [], + "tags": [ + "calc_button_xunified" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_button_xunified-20250717.png b/needles/gnome/apps/calculator/calc_button_xunified-20250717.png new file mode 100644 index 00000000..d1a83a8b Binary files /dev/null and b/needles/gnome/apps/calculator/calc_button_xunified-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_function_arg-20250718.json b/needles/gnome/apps/calculator/calc_function_arg-20250718.json new file mode 100644 index 00000000..767511fa --- /dev/null +++ b/needles/gnome/apps/calculator/calc_function_arg-20250718.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "xpos": 458, + "ypos": 398, + "width": 65, + "height": 44, + "type": "match", + "match": 90 + } + ], + "properties": [], + "tags": [ + "calc_function_arg" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_function_arg-20250718.png b/needles/gnome/apps/calculator/calc_function_arg-20250718.png new file mode 100644 index 00000000..b20d1d0c Binary files /dev/null and b/needles/gnome/apps/calculator/calc_function_arg-20250718.png differ diff --git a/needles/gnome/apps/calculator/calc_function_cos-20250718.json b/needles/gnome/apps/calculator/calc_function_cos-20250718.json new file mode 100644 index 00000000..ea87a054 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_function_cos-20250718.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "xpos": 458, + "ypos": 498, + "width": 60, + "height": 40, + "type": "match", + "match": 90 + } + ], + "properties": [], + "tags": [ + "calc_function_cos" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_function_cos-20250718.png b/needles/gnome/apps/calculator/calc_function_cos-20250718.png new file mode 100644 index 00000000..b2f9262f Binary files /dev/null and b/needles/gnome/apps/calculator/calc_function_cos-20250718.png differ diff --git a/needles/gnome/apps/calculator/calc_button_bopen-20250319.json b/needles/gnome/apps/calculator/calc_function_sqrt-20250718.json similarity index 53% rename from needles/gnome/apps/calculator/calc_button_bopen-20250319.json rename to needles/gnome/apps/calculator/calc_function_sqrt-20250718.json index 280c3148..1d3a3ea3 100644 --- a/needles/gnome/apps/calculator/calc_button_bopen-20250319.json +++ b/needles/gnome/apps/calculator/calc_function_sqrt-20250718.json @@ -1,15 +1,15 @@ { "area": [ { - "width": 22, + "xpos": 465, + "ypos": 471, + "width": 58, "height": 25, - "xpos": 434, - "ypos": 474, "type": "match" } ], "properties": [], "tags": [ - "calc_button_bopen" + "calc_function_sqrt" ] } \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_function_sqrt-20250718.png b/needles/gnome/apps/calculator/calc_function_sqrt-20250718.png new file mode 100644 index 00000000..db10e4bf Binary files /dev/null and b/needles/gnome/apps/calculator/calc_function_sqrt-20250718.png differ diff --git a/needles/gnome/apps/calculator/calc_result_2997-20250717.json b/needles/gnome/apps/calculator/calc_result_2997-20250717.json new file mode 100644 index 00000000..a73116bb --- /dev/null +++ b/needles/gnome/apps/calculator/calc_result_2997-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 344, + "ypos": 390, + "width": 118, + "height": 23, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_result_2997" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_result_2997-20250717.png b/needles/gnome/apps/calculator/calc_result_2997-20250717.png new file mode 100644 index 00000000..20bffdb5 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_result_2997-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_result_314-20250717.json b/needles/gnome/apps/calculator/calc_result_314-20250717.json new file mode 100644 index 00000000..b0742cab --- /dev/null +++ b/needles/gnome/apps/calculator/calc_result_314-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 344, + "ypos": 389, + "width": 141, + "height": 24, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_result_314" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_result_314-20250717.png b/needles/gnome/apps/calculator/calc_result_314-20250717.png new file mode 100644 index 00000000..d9d48cf2 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_result_314-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_result_6022-20250717.json b/needles/gnome/apps/calculator/calc_result_6022-20250717.json new file mode 100644 index 00000000..2935f7ac --- /dev/null +++ b/needles/gnome/apps/calculator/calc_result_6022-20250717.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "xpos": 347, + "ypos": 390, + "width": 182, + "height": 25, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_result_6022", + "calc_result_6224" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_result_6022-20250717.png b/needles/gnome/apps/calculator/calc_result_6022-20250717.png new file mode 100644 index 00000000..b847ccfa Binary files /dev/null and b/needles/gnome/apps/calculator/calc_result_6022-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_result_9109-20250717.json b/needles/gnome/apps/calculator/calc_result_9109-20250717.json new file mode 100644 index 00000000..c7803a09 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_result_9109-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 344, + "ypos": 389, + "width": 204, + "height": 19, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_result_9109" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_result_9109-20250717.png b/needles/gnome/apps/calculator/calc_result_9109-20250717.png new file mode 100644 index 00000000..583c3e09 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_result_9109-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_result_9806-20250718.json b/needles/gnome/apps/calculator/calc_result_9806-20250718.json new file mode 100644 index 00000000..1c004006 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_result_9806-20250718.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 344, + "ypos": 388, + "width": 90, + "height": 22, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_result_9806" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_result_9806-20250718.png b/needles/gnome/apps/calculator/calc_result_9806-20250718.png new file mode 100644 index 00000000..81feb8e8 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_result_9806-20250718.png differ diff --git a/needles/gnome/apps/calculator/calc_result_arg-20250718.json b/needles/gnome/apps/calculator/calc_result_arg-20250718.json new file mode 100644 index 00000000..ae58f0be --- /dev/null +++ b/needles/gnome/apps/calculator/calc_result_arg-20250718.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 347, + "ypos": 385, + "width": 10, + "height": 32, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_result_arg" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_result_arg-20250718.png b/needles/gnome/apps/calculator/calc_result_arg-20250718.png new file mode 100644 index 00000000..3482972f Binary files /dev/null and b/needles/gnome/apps/calculator/calc_result_arg-20250718.png differ diff --git a/needles/gnome/apps/calculator/calc_result_cos-20250718.json b/needles/gnome/apps/calculator/calc_result_cos-20250718.json new file mode 100644 index 00000000..a0f41795 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_result_cos-20250718.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 343, + "ypos": 386, + "width": 140, + "height": 27, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_result_cos" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_result_cos-20250718.png b/needles/gnome/apps/calculator/calc_result_cos-20250718.png new file mode 100644 index 00000000..04bf656a Binary files /dev/null and b/needles/gnome/apps/calculator/calc_result_cos-20250718.png differ diff --git a/needles/gnome/apps/calculator/calc_result_foursub-20250717.json b/needles/gnome/apps/calculator/calc_result_foursub-20250717.json new file mode 100644 index 00000000..3d80df69 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_result_foursub-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 344, + "ypos": 387, + "width": 23, + "height": 27, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_result_foursub" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_result_foursub-20250717.png b/needles/gnome/apps/calculator/calc_result_foursub-20250717.png new file mode 100644 index 00000000..55a7aa35 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_result_foursub-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_result_sixteen-20250717.json b/needles/gnome/apps/calculator/calc_result_sixteen-20250717.json new file mode 100644 index 00000000..9ad7fd57 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_result_sixteen-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 346, + "ypos": 385, + "width": 25, + "height": 32, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_result_sixteen" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_result_sixteen-20250717.png b/needles/gnome/apps/calculator/calc_result_sixteen-20250717.png new file mode 100644 index 00000000..5cc87621 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_result_sixteen-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_button_bopen-20220818.json b/needles/gnome/apps/calculator/calc_result_sqrt-20250718.json similarity index 53% rename from needles/gnome/apps/calculator/calc_button_bopen-20220818.json rename to needles/gnome/apps/calculator/calc_result_sqrt-20250718.json index 7c7638f9..c1f36b32 100644 --- a/needles/gnome/apps/calculator/calc_button_bopen-20220818.json +++ b/needles/gnome/apps/calculator/calc_result_sqrt-20250718.json @@ -1,15 +1,15 @@ { "area": [ { - "xpos": 252, - "ypos": 375, - "width": 22, + "xpos": 347, + "ypos": 387, + "width": 135, "height": 25, "type": "match" } ], "properties": [], "tags": [ - "calc_button_bopen" + "calc_result_sqrt" ] } \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_result_sqrt-20250718.png b/needles/gnome/apps/calculator/calc_result_sqrt-20250718.png new file mode 100644 index 00000000..223d554f Binary files /dev/null and b/needles/gnome/apps/calculator/calc_result_sqrt-20250718.png differ diff --git a/needles/gnome/apps/calculator/calc_umenu_acceleration-20250718.json b/needles/gnome/apps/calculator/calc_umenu_acceleration-20250718.json new file mode 100644 index 00000000..62f49aa0 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_umenu_acceleration-20250718.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 405, + "ypos": 609, + "width": 132, + "height": 19, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_umenu_acceleration" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_umenu_acceleration-20250718.png b/needles/gnome/apps/calculator/calc_umenu_acceleration-20250718.png new file mode 100644 index 00000000..c2593b64 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_umenu_acceleration-20250718.png differ diff --git a/needles/gnome/apps/calculator/calc_umenu_atomic-20250717.json b/needles/gnome/apps/calculator/calc_umenu_atomic-20250717.json new file mode 100644 index 00000000..ce456908 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_umenu_atomic-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 405, + "ypos": 497, + "width": 121, + "height": 22, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_umenu_atomic" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_umenu_atomic-20250717.png b/needles/gnome/apps/calculator/calc_umenu_atomic-20250717.png new file mode 100644 index 00000000..0d93ee6a Binary files /dev/null and b/needles/gnome/apps/calculator/calc_umenu_atomic-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_umenu_avogadro-20250717.json b/needles/gnome/apps/calculator/calc_umenu_avogadro-20250717.json new file mode 100644 index 00000000..1e8fccab --- /dev/null +++ b/needles/gnome/apps/calculator/calc_umenu_avogadro-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 403, + "ypos": 605, + "width": 141, + "height": 22, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_umenu_avogadro" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_umenu_avogadro-20250717.png b/needles/gnome/apps/calculator/calc_umenu_avogadro-20250717.png new file mode 100644 index 00000000..6fa71c2f Binary files /dev/null and b/needles/gnome/apps/calculator/calc_umenu_avogadro-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_umenu_electromagnetic-20250717.json b/needles/gnome/apps/calculator/calc_umenu_electromagnetic-20250717.json new file mode 100644 index 00000000..9cdee157 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_umenu_electromagnetic-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 403, + "ypos": 466, + "width": 131, + "height": 21, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_umenu_electromagnetic" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_umenu_electromagnetic-20250717.png b/needles/gnome/apps/calculator/calc_umenu_electromagnetic-20250717.png new file mode 100644 index 00000000..8595fa1d Binary files /dev/null and b/needles/gnome/apps/calculator/calc_umenu_electromagnetic-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_umenu_electronmass-20250717.json b/needles/gnome/apps/calculator/calc_umenu_electronmass-20250717.json new file mode 100644 index 00000000..ebd3c65f --- /dev/null +++ b/needles/gnome/apps/calculator/calc_umenu_electronmass-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 403, + "ypos": 573, + "width": 100, + "height": 20, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_umenu_electronmass" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_umenu_electronmass-20250717.png b/needles/gnome/apps/calculator/calc_umenu_electronmass-20250717.png new file mode 100644 index 00000000..3b518a72 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_umenu_electronmass-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_umenu_gravitation-20250717.json b/needles/gnome/apps/calculator/calc_umenu_gravitation-20250717.json new file mode 100644 index 00000000..02c7bc71 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_umenu_gravitation-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 404, + "ypos": 561, + "width": 77, + "height": 21, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_umenu_gravitation" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_umenu_gravitation-20250717.png b/needles/gnome/apps/calculator/calc_umenu_gravitation-20250717.png new file mode 100644 index 00000000..b5c39ed2 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_umenu_gravitation-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_umenu_lightspeed-20250717.json b/needles/gnome/apps/calculator/calc_umenu_lightspeed-20250717.json new file mode 100644 index 00000000..dac8f27c --- /dev/null +++ b/needles/gnome/apps/calculator/calc_umenu_lightspeed-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 402, + "ypos": 479, + "width": 88, + "height": 19, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_umenu_lightspeed" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_umenu_lightspeed-20250717.png b/needles/gnome/apps/calculator/calc_umenu_lightspeed-20250717.png new file mode 100644 index 00000000..777fa060 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_umenu_lightspeed-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_umenu_mathematical-20250717.json b/needles/gnome/apps/calculator/calc_umenu_mathematical-20250717.json new file mode 100644 index 00000000..4323e040 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_umenu_mathematical-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 406, + "ypos": 432, + "width": 91, + "height": 23, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_umenu_mathematical" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_umenu_mathematical-20250717.png b/needles/gnome/apps/calculator/calc_umenu_mathematical-20250717.png new file mode 100644 index 00000000..aa67bd98 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_umenu_mathematical-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_umenu_pi-20250717.json b/needles/gnome/apps/calculator/calc_umenu_pi-20250717.json new file mode 100644 index 00000000..63f5abc7 --- /dev/null +++ b/needles/gnome/apps/calculator/calc_umenu_pi-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 401, + "ypos": 542, + "width": 34, + "height": 20, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_umenu_pi" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_umenu_pi-20250717.png b/needles/gnome/apps/calculator/calc_umenu_pi-20250717.png new file mode 100644 index 00000000..7d7a179f Binary files /dev/null and b/needles/gnome/apps/calculator/calc_umenu_pi-20250717.png differ diff --git a/needles/gnome/apps/calculator/calc_umenu_thermo-20250717.json b/needles/gnome/apps/calculator/calc_umenu_thermo-20250717.json new file mode 100644 index 00000000..ff43478b --- /dev/null +++ b/needles/gnome/apps/calculator/calc_umenu_thermo-20250717.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 407, + "ypos": 531, + "width": 120, + "height": 18, + "type": "match" + } + ], + "properties": [], + "tags": [ + "calc_umenu_thermo" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/calculator/calc_umenu_thermo-20250717.png b/needles/gnome/apps/calculator/calc_umenu_thermo-20250717.png new file mode 100644 index 00000000..194f0413 Binary files /dev/null and b/needles/gnome/apps/calculator/calc_umenu_thermo-20250717.png differ diff --git a/tests/applications/calculator/calculator.pm b/tests/applications/calculator/basic_operations.pm similarity index 98% rename from tests/applications/calculator/calculator.pm rename to tests/applications/calculator/basic_operations.pm index 483a0c7a..0c0f1fdf 100644 --- a/tests/applications/calculator/calculator.pm +++ b/tests/applications/calculator/basic_operations.pm @@ -90,7 +90,7 @@ sub run { } sub test_flags { - return {fatal => 1}; + return {always_rollback => 1}; } 1; diff --git a/tests/applications/calculator/constants.pm b/tests/applications/calculator/constants.pm new file mode 100644 index 00000000..607440c0 --- /dev/null +++ b/tests/applications/calculator/constants.pm @@ -0,0 +1,90 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This script checks that Gnome Calculator +# can use pre-selected constants. + + +sub run { + my $self = shift; + # Wait until everything settles. + sleep 5; + + # Check that upper index can be used + assert_and_click("calc_button_four"); + assert_and_click("calc_button_upper"); + assert_and_click("calc_button_two"); + assert_and_click("calc_button_equals"); + assert_screen("calc_result_sixteen"); + assert_and_click("calc_button_clear"); + + # Check that lower index works + # I cannot think of a math expression that would use + # subscripts, so let's just check the button works. + assert_and_click("calc_button_four"); + assert_and_click("calc_button_lower"); + assert_and_click("calc_button_four"); + assert_screen("calc_result_foursub"); + assert_and_click("calc_button_clear"); + + # This will check the unified buttons that + # represents various mathematical expressions. + # We will only check a couple of them. + # + # Pi: + assert_and_click("calc_button_one"); + assert_and_click("calc_button_xunified"); + assert_and_click("calc_umenu_mathematical"); + assert_and_click("calc_umenu_pi"); + send_key("ret"); + assert_screen("calc_result_314"); + assert_and_click("calc_button_clear"); + + # Lightspeed + assert_and_click("calc_button_one"); + assert_and_click("calc_button_multi"); + assert_and_click("calc_button_xunified"); + assert_and_click("calc_umenu_electromagnetic"); + assert_and_click("calc_umenu_lightspeed"); + send_key("ret"); + assert_screen("calc_result_2997"); + assert_and_click("calc_button_clear"); + + # Electron mass + assert_and_click("calc_button_one"); + assert_and_click("calc_button_xunified"); + assert_and_click("calc_umenu_atomic"); + assert_and_click("calc_umenu_electronmass"); + send_key("ret"); + assert_screen("calc_result_9109"); + assert_and_click("calc_button_clear"); + + # Avogadro + assert_and_click("calc_button_one"); + assert_and_click("calc_button_xunified"); + assert_and_click("calc_umenu_thermo"); + assert_and_click("calc_umenu_avogadro"); + send_key("ret"); + assert_screen("calc_result_6022"); + assert_and_click("calc_button_clear"); + + # Earth acceleration + assert_and_click("calc_button_one"); + assert_and_click("calc_button_xunified"); + assert_and_click("calc_umenu_gravitation"); + assert_and_click("calc_umenu_acceleration"); + send_key("ret"); + assert_screen("calc_result_9806"); + assert_and_click("calc_button_clear"); +} + +sub test_flags { + return {always_rollback => 1}; +} + +1; + +# vim: set sw=4 et: + diff --git a/tests/applications/calculator/functions.pm b/tests/applications/calculator/functions.pm new file mode 100644 index 00000000..4c92e4d0 --- /dev/null +++ b/tests/applications/calculator/functions.pm @@ -0,0 +1,37 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +# This script checks that Gnome Calculator +# can use pre-selected functions. + +sub use_function { + my $function = shift; + assert_and_click("calc_button_fxunified"); + send_key_until_needlematch("calc_function_$function", "down", 50); + click_lastmatch(); + assert_and_click("calc_button_five"); + send_key("ret"); + assert_screen("calc_result_$function"); + assert_and_click("calc_button_clear"); +} + +sub run { + my $self = shift; + # Wait until everything settles. + sleep 5; + + use_function("sqrt"); + use_function("arg"); + use_function("cos"); +} + +sub test_flags { + return {always_rollback => 1}; +} + +1; + +# vim: set sw=4 et: + diff --git a/tests/applications/calculator/unified_buttons.pm b/tests/applications/calculator/unified_buttons.pm deleted file mode 100644 index 63a0dc70..00000000 --- a/tests/applications/calculator/unified_buttons.pm +++ /dev/null @@ -1,102 +0,0 @@ -use base "installedtest"; -use strict; -use testapi; -use utils; - -# This script checks that Gnome Calculator works in Basic mode. - -# This subroutine rewrites the number into a word. -sub rewrite { - my $number = shift; - my %numbers = ( - 0 => 'zero', - 1 => 'one', - 2 => 'two', - 3 => 'three', - 4 => 'four', - 5 => 'five', - 6 => 'six', - 7 => 'seven', - 8 => 'eight', - 9 => 'nine', - "." => 'divider', - "%" => 'percent', - "p" => 'pi', - "r" => 'root', - "s" => 'square' - ); - my $rewritten = $numbers{$number}; - return $rewritten; -} - -# This subroutine performs the clicking of simple operations -# in the Calculator. -sub calculate { - my ($a, $b, $operation) = @_; - # Create lists of the numbers. - my @first = split('', $a); - my @second = split('', $b); - - # For each digit of the first number, click on - # the corresponding button. - foreach (@first) { - my $word = rewrite($_); - assert_and_click("calc_button_$word"); - } - # Click the operation button. - assert_and_click("calc_button_$operation"); - # For each digit of the second number, click on - # the corresponding button. - foreach (@second) { - my $word = rewrite($_); - assert_and_click("calc_button_$word"); - } - # Click on the Equals button - assert_and_click("calc_button_equals"); - # Assert the result has appeared on the screen. - my $identifier = hashed_string("$a-$operation-$b"); - assert_screen("calc_result_$identifier"); - # Clear the display. - send_key("esc"); -} - -sub run { - my $self = shift; - # Wait until everything settles. - sleep 5; - # Check that two numbers can be added. - calculate("10", "23", "add"); - # Check that two numbers can be subtracted. - calculate("67", "45", "sub"); - # Check that two numbers can be multiplied. - calculate("9", "0.8", "multi"); - # Check that two numbers can be divided. - calculate("77", "7", "div"); - # Check that two numbers can be divided using modulo. - calculate("28", "5", "mod"); - # Check that you can use percents - calculate("33%", "90", "multi"); - - # Check that you can use brackets - assert_and_click("calc_button_three"); - assert_and_click("calc_button_multi"); - assert_and_click("calc_button_bopen"); - assert_and_click("calc_button_two"); - assert_and_click("calc_button_add"); - assert_and_click("calc_button_three"); - assert_and_click("calc_button_bclose"); - assert_and_click("calc_button_equals"); - my $identifier = hashed_string("3*(3+2)"); - assert_screen("calc_result_$identifier"); - send_key("esc"); - -} - -sub test_flags { - return {fatal => 1}; -} - -1; - -# vim: set sw=4 et: -