Salome HOME
Sort SQUISH cases to suites
[modules/shaper.git] / test.squish / suite_FEATURE_SKETCH / tst_sketch_009 / test.py
1
2 def main():
3     #[project] NewGEOM
4     #[Scenario] Sketch_009
5     #[Topic] 'Equal' functionality 
6     #[Tested functionality] 
7     #[Summary description]
8     #[Expected results]
9     #[General comments]
10     
11     source(findFile("scripts", "common.py"))
12     
13     #[section] Application start
14     #[step] Launch SALOME
15     startApplication("salome_run.sh")
16
17     set_defaults()
18     
19     #[step] Open 'for_sketch_006.hdf'
20     open(DATA_PATH + "/for_sketch_009.hdf")
21     
22     #[step] Activate NewGeom
23     clickButton(waitForObject(":SALOME*.NewGeom_QToolButton"))
24     
25     #[step] Edit 'Sketch_1'
26     waitForObjectItem(":Object browser_XGUI_DataTree", "Sketch\\_1")
27     clickItem(":Object browser_XGUI_DataTree", "Sketch\\_1", 43, 12, 0, Qt.LeftButton)
28     openItemContextMenu(waitForObject(":Object browser_XGUI_DataTree"), "Sketch\\_1", 43, 12, 0)
29     activateItem(waitForObjectItem(":_QMenu", "Edit..."))
30     
31     #[step] Click '+OZ' button
32     clickButton(waitForObject(":SALOME*.+OZ_QToolButton"))
33
34     # [check] Make lines equal
35     equal((287, 392), (439, 322))
36     
37     # [step] Fit all
38     clickButton(waitForObject(":SALOME*.Fit All_QToolButton"))
39     
40     #[check] Check that lines are equal
41     test.vp("VP1")
42     
43     # [step] Select 'Equal' icon in viewer near any objects
44     mouseClick(waitForObject(":SALOME*.3D View Operations_OCCViewer_ViewPort3d"), 451, 186, 0, Qt.LeftButton)
45     
46     #[check] Check that input panel 'Equal' appears
47     waitFor("object.exists(':Equal.First object_QLineEdit')", 20000)
48     test.compare(str(findObject(":Equal.First object_QLineEdit").text), "SketchLine_1")
49     waitFor("object.exists(':Equal.Second object_QLineEdit')", 20000)
50     test.compare(str(findObject(":Equal.Second object_QLineEdit").text), "SketchLine_2")
51     
52     #[step] Close application without saving
53     close_application()