]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Set standard window size
authoreso <eugeny.savchenko@opencascade.com>
Tue, 11 Aug 2015 09:10:15 +0000 (12:10 +0300)
committereso <eugeny.savchenko@opencascade.com>
Tue, 11 Aug 2015 09:13:35 +0000 (12:13 +0300)
test.squish/suite_ISSUES/shared/scripts/common.py
test.squish/suite_ISSUES/tst_818/test.py
test.squish/suite_ISSUES/tst_BASE/test.py
test.squish/suite_ISSUES/tst_DISTANCE/test.py
test.squish/suite_ISSUES/tst_RADIUS/test.py

index 05d6f93b8534553bb08b237d6afa08d3c235379b..f6627f5fdb22fba66e1d128836b0d2030ac6f870 100644 (file)
@@ -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)
index 0807c4ff1be4ff2bcd95c648d814194cea27a78c..70466f5f934bfbfcdca3a9ba7798af2a96086f28 100644 (file)
@@ -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)
index cd646fb9d9a96761ee5868cab5e99181136556f0..53141a5fd3799e177243c4532c9f55fe1d8c131d 100644 (file)
@@ -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")
index 413377a5fb0338447cc901b4f0dc79bf75e19453..f6bc565cdb2bba25c4645c7c9eea58e5f5d3bdd1 100644 (file)
@@ -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())
index 01c702ccb42125093a28ec42ace89b52301fdf13..3daf151511a7e76aa2415546dda03da7adb02b93 100644 (file)
@@ -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"))