]> SALOME platform Git repositories - modules/shaper.git/blob - test.squish/suite_ISSUES/tst_DISTANCE/test.py
Salome HOME
Add tests for the issue 818 and for the distance constraint.
[modules/shaper.git] / test.squish / suite_ISSUES / tst_DISTANCE / test.py
1 def sketch():
2     line_create((0, 0), (100, 0))
3     point_create((50, 50))
4
5     point_1 = (536, 273) # point
6     point_2 = (543, 299) # line 
7     annotaion_point = (392, 291)
8     distance_create(point_1,point_2, annotaion_point, 100)
9     
10     mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), annotaion_point[0], annotaion_point[1], 0, Qt.LeftButton)
11     waitFor("object.exists(':Distance.First object_QLineEdit')", 20000)
12     test.compare(str(findObject(":Distance.First object_QLineEdit").text), "SketchPoint_1/PointCoordindates")
13     waitFor("object.exists(':Distance.Second object_QLineEdit')", 20000)
14     test.compare(str(findObject(":Distance.Second object_QLineEdit").text), "SketchLine_1")
15     waitFor("object.exists(':Distance.ConstraintValue_ModuleBase_ParamSpinBox')", 20000)
16     test.compare(str(findObject(":Distance.ConstraintValue_ModuleBase_ParamSpinBox").text), "100")
17
18 def main():
19     source(findFile("scripts", "common.py"))
20     
21     startApplication("GeomApp")
22     
23     point = (446, 297) # one of the construction planes
24     sketch_create(point, lambda: sketch())