2 source(findFile("scripts", "common.py"))
4 startApplication("salome_run.sh")
8 #[step] Click menu Part->Parameter
9 activateItem(waitForObjectItem(":SALOME*_QMenuBar", "Part"))
10 activateItem(waitForObjectItem(":Part_QMenu", "Parameter"))
11 mouseClick(waitForObject(":Parameter_QLineEdit"), 79, 8, 0, Qt.LeftButton)
12 #[step] Check that feature ToolTip is: Model_FeatureValidator: Attribute "expression" is not initialized.
13 waitFor("object.exists(':Parameter_QFrame')", 20000)
14 test.compare(str(findObject(":Parameter_QFrame").toolTip), "Model_FeatureValidator: Attribute \"expression\" is not initialized.")
15 #[step] Check that name tooltip is: Errors:\nvariable - Parameters_VariableValidator: Incorrect variable name.
16 waitFor("object.exists(':Parameter_QLineEdit')", 20000)
17 test.compare(str(findObject(":Parameter_QLineEdit").toolTip), "Errors:\nvariable - Parameters_VariableValidator: Incorrect variable name.")
18 #[step] Check that expression tooltip is: Errors:\nexpression - Parameters_ExpressionValidator: Expression is empty.
19 waitFor("object.exists(':Parameter_ExpressionEditor')", 20000)
20 test.compare(str(findObject(":Parameter_ExpressionEditor").toolTip), "Errors:\nexpression - Parameters_ExpressionValidator: Expression is empty.")
22 #[step] Enter variable name 'a'
23 type(waitForObject(":Parameter_QLineEdit"), "a")
24 mouseClick(waitForObject(":Parameter_ExpressionEditor"), 97, 31, 0, Qt.LeftButton)
26 #[step] Enter variable expression '100+b'
27 type(waitForObject(":Parameter_ExpressionEditor"), "100+b")
29 #[step] Check that expression tooltip is: Errors:\nexpression - Parameters_ExpressionValidator: name 'b' is not defined
30 waitFor("object.exists(':Parameter_ExpressionEditor')", 20000)
31 test.compare(str(findObject(":Parameter_ExpressionEditor").toolTip), "Errors:\nexpression - Parameters_ExpressionValidator: name 'b' is not defined")
32 #[step] Check that result message is: Error: unexpected EOF while parsing (<string>, line 0)
33 waitFor("object.exists(':Parameter.Result_QLabel')", 20000)
34 test.compare(str(findObject(":Parameter.Result_QLabel").text), "Error: name 'b' is not defined")
36 #[step] Check that feature ToolTip is: expression - Parameters_ExpressionValidator: name 'b' is not defined
37 waitFor("object.exists(':Parameter_QFrame')", 20000)
38 test.compare(str(findObject(":Parameter_QFrame").toolTip), "expression - Parameters_ExpressionValidator: name 'b' is not defined")
40 #[step] Check that apply button is red [vp VP_APPLY_RED]
41 test.vp("VP_APPLY_RED")