From a7313ee6361c7d9413c7da58fb7ef7b2f9f9ca18 Mon Sep 17 00:00:00 2001 From: eso Date: Tue, 11 Aug 2015 12:10:15 +0300 Subject: [PATCH] Set standard window size --- test.squish/suite_ISSUES/shared/scripts/common.py | 7 +++++++ test.squish/suite_ISSUES/tst_818/test.py | 5 +++-- test.squish/suite_ISSUES/tst_BASE/test.py | 8 +++++--- test.squish/suite_ISSUES/tst_DISTANCE/test.py | 4 ++-- test.squish/suite_ISSUES/tst_RADIUS/test.py | 6 +++--- 5 files changed, 20 insertions(+), 10 deletions(-) diff --git a/test.squish/suite_ISSUES/shared/scripts/common.py b/test.squish/suite_ISSUES/shared/scripts/common.py index 05d6f93b8..f6627f5fd 100644 --- a/test.squish/suite_ISSUES/shared/scripts/common.py +++ b/test.squish/suite_ISSUES/shared/scripts/common.py @@ -1,6 +1,13 @@ testSettings.logScreenshotOnError = True testSettings.logScreenshotOnFail = True +g_points = {"XY_plane": (320, 320)} # one of the construction planes +def help_points(name): + return g_points[name] + +def set_defaults(): + waitForObject(":OpenParts*_AppElements_MainWindow").resize(1024, 768) + def parameter_create(name, expression): clickButton(waitForObject(":Parameters.Parameter_AppElements_Button")) type(waitForObject(":Parameter_QLineEdit"), name) diff --git a/test.squish/suite_ISSUES/tst_818/test.py b/test.squish/suite_ISSUES/tst_818/test.py index 0807c4ff1..70466f5f9 100644 --- a/test.squish/suite_ISSUES/tst_818/test.py +++ b/test.squish/suite_ISSUES/tst_818/test.py @@ -2,10 +2,11 @@ def main(): source(findFile("scripts", "common.py")) startApplication("GeomApp") + set_defaults() + parameter_create("a", "100") - point = (446, 297) # one of the construction planes - sketch_create(point, lambda: line_create((0, 0), ("a", 0))) + sketch_create(points["XY_plane"], lambda: line_create((0, 0), ("a", 0))) waitForObjectItem(":Object browser_XGUI_DataTree", "Parameters (1)") clickItem(":Object browser_XGUI_DataTree", "Parameters (1)", -10, 10, 0, Qt.LeftButton) diff --git a/test.squish/suite_ISSUES/tst_BASE/test.py b/test.squish/suite_ISSUES/tst_BASE/test.py index cd646fb9d..53141a5fd 100644 --- a/test.squish/suite_ISSUES/tst_BASE/test.py +++ b/test.squish/suite_ISSUES/tst_BASE/test.py @@ -2,9 +2,11 @@ def main(): source(findFile("scripts", "common.py")) startApplication("GeomApp") + set_defaults() + parameter_create("a", "100") part_create() - point = (446, 297) # one of the construction planes - sketch_create(point, lambda: circle_create(0, 0, "a")) - points = [(489, 319)] # circle + sketch_create(help_points("XY_plane"), lambda: circle_create(0, 0, "a")) + + points = [(313, 336)] # circle extrusion_feature(points, "a") diff --git a/test.squish/suite_ISSUES/tst_DISTANCE/test.py b/test.squish/suite_ISSUES/tst_DISTANCE/test.py index 413377a5f..f6bc565cd 100644 --- a/test.squish/suite_ISSUES/tst_DISTANCE/test.py +++ b/test.squish/suite_ISSUES/tst_DISTANCE/test.py @@ -19,6 +19,6 @@ def main(): source(findFile("scripts", "common.py")) startApplication("GeomApp") + set_defaults() - point = (446, 297) # one of the construction planes - sketch_create(point, lambda: sketch()) + sketch_create(points["XY_plane"], lambda: sketch()) diff --git a/test.squish/suite_ISSUES/tst_RADIUS/test.py b/test.squish/suite_ISSUES/tst_RADIUS/test.py index 01c702ccb..3daf15151 100644 --- a/test.squish/suite_ISSUES/tst_RADIUS/test.py +++ b/test.squish/suite_ISSUES/tst_RADIUS/test.py @@ -4,7 +4,7 @@ def sketch(): radius_create(circle_border, (148, 97), 150) # check - circle_border = (392, 179) + circle_border = (335, 141) mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), circle_border[0], circle_border[1], 0, Qt.LeftButton) waitFor("object.exists(':Circle.CircleRadius_ModuleBase_ParamSpinBox')", 20000) test.compare(str(findObject(":Circle.CircleRadius_ModuleBase_ParamSpinBox").text), "150") @@ -13,9 +13,9 @@ def main(): source(findFile("scripts", "common.py")) startApplication("GeomApp") + set_defaults() - point = (446, 297) # one of the construction planes - sketch_create(point, lambda: sketch()) + sketch_create(points("XY_plane"), lambda: sketch()) sendEvent("QCloseEvent", waitForObject(":OpenParts*_AppElements_MainWindow")) clickButton(waitForObject(":Save current file.Discard_QPushButton")) -- 2.39.2