Salome HOME
Fix suite_ISSUES/tst_PARALLEL_2 for CentOS
[modules/shaper.git] / test.squish / suite_ISSUES_SALOME / tst_sketch_002 / test.py
1 def sketch():
2     #[step] Click 'Create sketch' toolbar button
3     #[step] Select XY plane for sketching
4     #[step] Create random closed contour
5     line_create_in_view((101, 183),(265, 107))
6     line_create_in_view((265, 107), (520, 192))
7     line_create_in_view((520, 192), (443, 411))
8     closing_line_create_in_view((443, 411), (101, 183))
9     
10     #[step] Create one more closed contour inside previous, not parallel to it
11     line_create_in_view((219, 198),(269, 166))
12     line_create_in_view((269, 166), (451, 230))
13     line_create_in_view((451, 230), (410, 334))
14     closing_line_create_in_view((410, 334), (219, 199))
15     
16     #[check] Check that lines are not parallel and there are no icons near lines
17     test.vp("VP1")
18     #[step] Make according lines parallel
19     parallel((394, 151), (361, 199))
20     parallel((201, 137), (244, 182))
21     parallel((245, 278), (292, 249))
22     parallel((430, 286), (482, 299))
23     # [check] Check that lines are parallel and there are icons near lines
24     test.vp("VP2")
25
26 def main():
27     # [project] NewGEOM
28     #[Scenario] Sketch_002
29     #[Topic] Parallel objects
30     #[Tested functionality]Parallelism between main lines
31     
32     source(findFile("scripts", "common.py"))
33
34     #[section] Application start
35     #[step] Launch SALOME
36     startApplication("salome_run.sh")
37
38     set_defaults()
39     
40     #[step] Activate NewGeom
41     #[step]Click 'New' button
42     activate_newgeom()
43     #[section] Creation of main lines and make them parallel
44     
45     sketch_create(help_points("XY_plane"), lambda: sketch())
46     #[step] Save study
47     save("RESULTS_PATH + sketch_002")
48     if object.exists(":Warning.Yes_QPushButton"):
49         clickButton(waitForObject(":Warning.Yes_QPushButton"))
50     ##[step] Close application
51     close_application()