diff options
author | Johannes Faltermeier | 2014-03-06 17:21:59 +0000 |
---|---|---|
committer | Johannes Faltermeier | 2014-03-10 13:49:18 +0000 |
commit | 0b0d6c8bb9866612a1e994e4f20dd6964efa8075 (patch) | |
tree | 14c41b5419db23f13748ed405840969a779f273b | |
parent | 351a105bdb8d624a435feeca0431d4b09acd728a (diff) | |
download | org.eclipse.emf.ecp.core-0b0d6c8bb9866612a1e994e4f20dd6964efa8075.tar.gz org.eclipse.emf.ecp.core-0b0d6c8bb9866612a1e994e4f20dd6964efa8075.tar.xz org.eclipse.emf.ecp.core-0b0d6c8bb9866612a1e994e4f20dd6964efa8075.zip |
Bug 426489 - Missing Q7 tests
Applied patch from Attachment 239279
https://bugs.eclipse.org/bugs/show_bug.cgi?id=426489
23 files changed, 1645 insertions, 3 deletions
diff --git a/tests/ECPQ7Tests/Editor/BigDecimal.test b/tests/ECPQ7Tests/Editor/BigDecimal.test index 2e854ce375..eac1f8f1d1 100644 --- a/tests/ECPQ7Tests/Editor/BigDecimal.test +++ b/tests/ECPQ7Tests/Editor/BigDecimal.test @@ -56,6 +56,14 @@ with [get-window "Invalid Number"] { get-window "Invalid Number" | get-button OK | click +get-editor "Player Jonas" | get-editbox -after [get-label "Win Loss Ratio"] | set-text gzfghjcjhcxhjf +with [get-window "Invalid Number"] { + get-property title | equals "Invalid Number" | verify-true + get-label "The Number you have entered is invalid. The value will be unset." | get-property caption + | equals "The Number you have entered is invalid. The value will be unset." | verify-true +} +get-window "Invalid Number" | get-button OK | click + get-editor "Player Maximilian" | get-editbox -after [get-label "Number Of Victories"] | click-text 1 2 get-editor "Player Maximilian" | get-editbox -after [get-label "Win Loss Ratio"] | get-property text | equals 356356 | verify-true diff --git a/tests/ECPQ7Tests/Editor/Int.test b/tests/ECPQ7Tests/Editor/Int.test index d09060403d..83d21acd27 100644 --- a/tests/ECPQ7Tests/Editor/Int.test +++ b/tests/ECPQ7Tests/Editor/Int.test @@ -8,7 +8,7 @@ Element-Version: 3.0 External-Reference: Id: _1mLz4HHYEeKndsdNMEr_UQ Q7-Runtime-Version: 1.3.7.201309090800 -Save-Time: 10/24/13 2:04 PM +Save-Time: 1/9/14 3:49 PM Testcase-Type: ecl ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac @@ -31,6 +31,14 @@ get-editor "Player Jonas" | get-editbox -after [get-label "Number Of Victories"] get-editor "Player Jonas" | get-editbox -after [get-label "Number Of Victories"] | get-property text | equals 2147483647 | verify-true +get-editor "Player Jonas" | get-editbox -after [get-label "Number Of Victories"] | set-text "1.5" +with [get-window "Invalid Number"] { + get-property title | equals "Invalid Number" | verify-true + get-label "The Number you have entered is invalid. The value will be unset." | get-property caption + | equals "The Number you have entered is invalid. The value will be unset." | verify-true +} +get-window "Invalid Number" | get-button OK | click + get-editor "Player Jonas" | get-editbox -after [get-label "Number Of Victories"] | set-text gzfghjcjhcxhjf with [get-window "Invalid Number"] { get-property title | equals "Invalid Number" | verify-true diff --git a/tests/ECPQ7Tests/Editor/NewDate.test b/tests/ECPQ7Tests/Editor/NewDate.test index e5b3a94807..ac88b0fb70 100644 --- a/tests/ECPQ7Tests/Editor/NewDate.test +++ b/tests/ECPQ7Tests/Editor/NewDate.test @@ -59,5 +59,6 @@ with [get-editor "Player Jonas" -index 1 | get-date-time] { get-property date | equals "1988/12/5" | verify-true } + //get-date-time -after [get-label "Date Of Birth"] -index 1 | set-value "435resfd" ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/Editor/XMLDate.test b/tests/ECPQ7Tests/Editor/XMLDate.test new file mode 100644 index 0000000000..d7ab7510d1 --- /dev/null +++ b/tests/ECPQ7Tests/Editor/XMLDate.test @@ -0,0 +1,59 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,__UtTgD-XEeK-yuKsz0Lang +Element-Name: XMLDate +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _GYZaMHlAEeO9Ja8zvRhhOQ +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 4:23 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +get-view "Model Explorer" | get-tree | select "TestProject \\[trunk, Version 0\\]" | get-menu "New Model Element" + | click +with [get-window "Add new model element"] { + get-tree | select "bowling/Referee" + get-button Finish | click +} +get-editor Referee | get-button -after [get-label "Date Of Birth"] | click +get-window -from "XmlDateControlText$1.widgetSelected()" | get-date-time | set-value "2013/12/1 0:0:0" +with [get-editor "Referee 2013-12-01" | get-editbox -after [get-label "Date Of Birth"]] { + set-text "15/4/2012" +} +get-window "Invalid Number" | get-button OK | click +with [get-editor "Referee 2013-12-01" | get-editbox -after [get-label "Date Of Birth"]] { + set-text "Jan, 05,2012" +} +get-window "Invalid Number" | get-button OK | click +with [get-editor "Referee 2013-12-01" | get-editbox -after [get-label "Date Of Birth"]] { + set-text "Jan 1, 2013" +} +get-editor "Referee 2013-01-01" | get-editbox -after [get-label "Date Of Birth"] | set-text "Jans 1, 2013" +get-window "Invalid Number" | get-label "The Number you have entered is invalid. The value will be unset." + | get-property caption | equals "The Number you have entered is invalid. The value will be unset." | verify-true +get-window "Invalid Number" | get-button OK | click +get-editor "Referee 2013-01-01" | get-editbox -after [get-label "Date Of Birth"] | get-property text + | equals "Jan 1, 2013" | verify-true +get-editor "Referee 2013-01-01" | get-editbox -after [get-label "Date Of Birth"] | set-text "5.3.1954" +get-window "Invalid Number" | get-label "The Number you have entered is invalid. The value will be unset." + | get-property caption | equals "The Number you have entered is invalid. The value will be unset." | verify-true +get-window "Invalid Number" | get-button OK | click +get-editor "Referee 2013-01-01" | get-editbox -after [get-label "Date Of Birth"] | get-property text + | equals "Jan 1, 2013" | verify-true +get-view "Model Explorer" | get-tree | select "TestProject \\[trunk, Version 0\\]" | get-menu Commit | click +get-window Commit | get-button OK | click +get-view "Model Explorer" | get-tree | select "TestProjectSecondCheckOut \\[trunk, Version 0\\]" | get-menu Update + | click +get-window Update | get-button OK | click +get-editor "Referee 2013-01-01" | close +get-view "Model Explorer" | get-tree | select "TestProjectSecondCheckOut \\[trunk, Version 1\\]/Referee 2013-01-01" + | double-click +get-editor "Referee 2013-01-01" | get-editbox -after [get-label "Date Of Birth"] | get-property text + | equals "Jan 1, 2013" | verify-true +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/EditorReadonly/ReadOnlyReferenceMultiControl.test b/tests/ECPQ7Tests/EditorReadonly/ReadOnlyReferenceMultiControl.test new file mode 100644 index 0000000000..b5498768e9 --- /dev/null +++ b/tests/ECPQ7Tests/EditorReadonly/ReadOnlyReferenceMultiControl.test @@ -0,0 +1,44 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_fQ0PgDsqEeOHj9Cw0T_k4Q,_T7Yg8DstEeOHj9Cw0T_k4Q +Element-Name: ReadOnlyReferenceMultiControl +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _pgFycIQREeO0WrMxvPcxtw +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/23/14 2:06 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +get-editor "Player John" | close +get-editor Game | close +get-editor Matchup | close +get-editor "Tournament Amateur" | close +get-editor View | get-button "Link Root EClas" | click +get-window "Select an EClass." | get-tree | select "bowling/Player \\[org.eclipse.emf.emfstore.bowling.Player\\]" + | double-click +get-view "Model Explorer" | get-tree | select "Project/View" | get-menu "Generate Controls" | click +with [get-window -class SelectAttributesDialog] { + get-table | get-item "eMails : EString" | check + get-button OK | click +} +get-view "Model Explorer" | get-tree | select "Project/View/Control eMails" | double-click +get-editor "Control eMails" | get-button -after [get-label Readonly] | check +with [get-view "Model Explorer"] { + get-tree | select "Project/View" + get-button "Save Project" | click +} +get-editor View | close +get-view "Model Explorer" | get-tree | select "TestProject/Player John" | double-click +with [get-editor "Player John"] { + get-button "Add Entry" | get-property enablement | equals false | verify-true + get-button -after [get-label "EMails*"] -index 1 | get-property enablement | equals false | verify-true + get-button -after [get-label "EMails*"] -index 2 | get-property enablement | equals false | verify-true + get-button -after [get-label "EMails*"] -index 3 | get-property enablement | equals false | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/EditorReadonly/ReadOnlyXMLDate.test b/tests/ECPQ7Tests/EditorReadonly/ReadOnlyXMLDate.test new file mode 100644 index 0000000000..9881a91ed1 --- /dev/null +++ b/tests/ECPQ7Tests/EditorReadonly/ReadOnlyXMLDate.test @@ -0,0 +1,45 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,_fQ0PgDsqEeOHj9Cw0T_k4Q,_T7Yg8DstEeOHj9Cw0T_k4Q +Element-Name: ReadOnlyXMLDate +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _W0km0HlCEeO9Ja8zvRhhOQ +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 4:32 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +get-editor "Player John" | close +get-editor "Tournament Amateur" | close +get-editor Game | close +get-editor Matchup | close +get-editor View | get-button "Link Root EClas" | click +get-window "Select an EClass." | get-tree | select "bowling/Referee \\[org.eclipse.emf.emfstore.bowling.Referee\\]" + | double-click +get-view "Model Explorer" | get-tree | select TestProject | get-menu "New Model Element" | click +get-window "Add new model element" | get-tree | select "bowling/Referee" | double-click +get-editor Referee | get-editbox -after [get-label "Date Of Birth"] | get-property readOnly | equals false | verify-true +get-view "Model Explorer" | get-tree | select "Project/View" | get-menu "Generate Controls" | click +with [get-window -class SelectAttributesDialog] { + get-table | get-item "dateOfBirth : XMLDate" | check + get-button OK | click +} +get-view "Model Explorer" | get-tree | select "Project/View/Control dateOfBirth" | double-click +get-editor "Control dateOfBirth" | get-button -after [get-label Readonly] | check +with [get-view "Model Explorer"] { + get-tree | select Project + get-button "Save Project" | click +} +get-editor Referee | close +get-editor "Control dateOfBirth" | click +get-editor View | close +get-editor "Control dateOfBirth" | close +get-view "Model Explorer" | get-tree | select "TestProject/Referee" | double-click +get-editor Referee | get-editbox -after [get-label "Date Of Birth"] | get-property readOnly | equals true | verify-true +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/EditorReadonly/ReadonlyAttributeMultiControl.test b/tests/ECPQ7Tests/EditorReadonly/ReadonlyAttributeMultiControl.test new file mode 100644 index 0000000000..53704c8f47 --- /dev/null +++ b/tests/ECPQ7Tests/EditorReadonly/ReadonlyAttributeMultiControl.test @@ -0,0 +1,61 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,_fQ0PgDsqEeOHj9Cw0T_k4Q,_T7Yg8DstEeOHj9Cw0T_k4Q +Element-Name: ReadonlyAttributeMultiControl +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _ZFIgQYQvEeOewrJdzmuGPg +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/23/14 2:20 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +get-editor Game | close +get-editor "Player John" | click +get-editor Matchup | close +get-editor "Tournament Amateur" | close +get-editor "Player John" | close +get-editor View | get-button "Link Root EClas" | click +get-window "Select an EClass." | get-tree | select "bowling/Player \\[org.eclipse.emf.emfstore.bowling.Player\\]" + | double-click +get-view "Model Explorer" | get-tree | select "Project/View" | get-menu "Generate Controls" | click +with [get-window -class SelectAttributesDialog] { + get-table | get-item "eMails : EString" | check + get-button OK | click +} + + + +get-view "Model Explorer" | get-tree | select "Project/View/Control eMails" | double-click +get-editor "Control eMails" | get-button -after [get-label Readonly] | check +with [get-view "Model Explorer"] { + get-tree | select Project + try { + get-button "Save Project" | click + } -catch { + wait 1000 + try { + get-tree | select Project + get-button "Save Project" | click + } -catch { + wait 1000 + get-tree | select Project + get-button "Save Project" | click + } + } +} + +get-editor "Control eMails" | click +get-view "Model Explorer" | get-tree | select "TestProject/Player John" | double-click +with [get-editor "Player John"] { + get-button "Add Entry" | get-property enablement | equals false | verify-true + get-button -after [get-label "EMails*"] -index 1 | get-property enablement | equals false | verify-true + get-button -after [get-label "EMails*"] -index 2 | get-property enablement | equals false | verify-true + get-button -after [get-label "EMails*"] -index 3 | get-property enablement | equals false | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/Rules/AndEnableRule.test b/tests/ECPQ7Tests/Rules/AndEnableRule.test new file mode 100644 index 0000000000..ec0ed06857 --- /dev/null +++ b/tests/ECPQ7Tests/Rules/AndEnableRule.test @@ -0,0 +1,105 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,_fQ0PgDsqEeOHj9Cw0T_k4Q,_ElgmoHlIEeO9Ja8zvRhhOQ +Element-Name: AndEnableRule +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _ERkLYHlSEeOByOq_5szdNw +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 6:22 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +get-editor Player | close +with [get-editor View] { + click + close +} +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth" | get-menu "Enable Rule" | click + select "Project/View/Control dateOfBirth/Enable Rule false" | get-menu "And Condition" | click + select "Project/View/Control dateOfBirth/Enable Rule false/And Condition" | get-menu "Leaf Condition" | click + select "Project/View/Control dateOfBirth/Enable Rule false/And Condition/Leaf Condition" + | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "name : EString" + get-button OK | click +} +get-editor "Feature Path Domain Model Reference" | close +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the String class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text test + get-button OK | click +} +get-editor "Leaf Condition test" | close +get-editor "And Condition" | close +get-editor "Enable Rule false" | close +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth/Enable Rule false/And Condition" | get-menu "Leaf Condition" | click + select "Project/View/Control dateOfBirth/Enable Rule false/And Condition/Leaf Condition" + | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "isProfessional : EBoolean" + get-button OK | click +} +get-editor "Feature Path Domain Model Reference" | close +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the Boolean class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text true + get-button OK | click +} +get-editor "Leaf Condition true" | close +with [get-view "Model Explorer"] { + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + get-tree | select "Project/View" + get-button "Save Project" | click + } + } + get-tree | select "Model/Player" | double-click +} +with [get-editor Player] { + get-date-time | get-property enablement | equals false | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals false | verify-true +} +get-editor Player | get-button -after [get-label "Is Professional"] | check +with [get-editor Player] { + get-date-time | get-property enablement | equals false | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals false | verify-true +} +with [get-editor Player] { + get-button -after [get-label "Is Professional"] | uncheck + get-editbox -after [get-label Name] | set-text test + get-editbox -after [get-label Height] | click-text 1 +} +with [get-editor "Player test"] { + get-date-time | get-property enablement | equals false | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals false | verify-true +} +get-editor "Player test" | get-button -after [get-label "Is Professional"] | check +with [get-editor "Player test"] { + get-date-time | get-property enablement | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals true | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/Rules/AndOrEnableRule.test b/tests/ECPQ7Tests/Rules/AndOrEnableRule.test new file mode 100644 index 0000000000..e94707bf31 --- /dev/null +++ b/tests/ECPQ7Tests/Rules/AndOrEnableRule.test @@ -0,0 +1,168 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,_fQ0PgDsqEeOHj9Cw0T_k4Q,_ElgmoHlIEeO9Ja8zvRhhOQ +Element-Name: AndOrEnableRule +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _oHNjkHlTEeOByOq_5szdNw +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 6:35 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth" | get-menu "Enable Rule" | click + select "Project/View/Control dateOfBirth/Enable Rule false" | get-menu "Or Condition" | click + select "Project/View/Control dateOfBirth/Enable Rule false/Or Condition" | get-menu "And Condition" | click + select "Project/View/Control dateOfBirth/Enable Rule false/Or Condition/And Condition" | get-menu "Leaf Condition" + | click + select "Project/View/Control dateOfBirth/Enable Rule false/Or Condition/And Condition/Leaf Condition" + | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "name : EString" + get-button OK | click +} +get-editor "Feature Path Domain Model Reference" | close +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the String class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text test + get-button OK | click +} +get-editor "Leaf Condition test" | close +get-editor "And Condition" | close +get-editor "Or Condition" | close +get-editor "Enable Rule false" | close +get-editor Player | close +get-editor View | close +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth/Enable Rule false/Or Condition/And Condition" | get-menu "Leaf Condition" + | click + select "Project/View/Control dateOfBirth/Enable Rule false/Or Condition/And Condition/Leaf Condition" + | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "isProfessional : EBoolean" + get-button OK | click +} +get-editor "Feature Path Domain Model Reference" | close +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the Boolean class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text true + get-button OK | click +} +get-editor "Leaf Condition true" | close +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth/Enable Rule false/Or Condition" | get-menu "And Condition" | click + select [get-item "Project/View/Control dateOfBirth/Enable Rule false/Or Condition" | get-item "And Condition" + -index 1] | get-menu "Leaf Condition" | click + select [get-item "Project/View/Control dateOfBirth/Enable Rule false/Or Condition" | get-item "And Condition" + -index 1 | get-item "Leaf Condition"] | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "height : EDouble" + get-button OK | click +} +get-editor "Feature Path Domain Model Reference" | close +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + with [get-editbox + -after [get-label "The value must be parseable by the Double class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."]] { + set-text "5.5" + } + get-button OK | click +} +get-editor "Leaf Condition 5.5" | close +get-editor "And Condition" | close +with [get-view "Model Explorer" | get-tree] { + select [get-item "Project/View/Control dateOfBirth/Enable Rule false/Or Condition" | get-item "And Condition" + -index 1] | get-menu "Leaf Condition" | click + select [get-item "Project/View/Control dateOfBirth/Enable Rule false/Or Condition" | get-item "And Condition" + -index 1 | get-item "Leaf Condition"] | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +get-window "Select a EStructuralFeature" | get-tree | select "numberOfVictories : EInt" | double-click +get-editor "Feature Path Domain Model Reference" | close +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the Integer class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text 6 + get-button OK | click +} +get-editor "Leaf Condition 6" | close +with [get-view "Model Explorer"] { + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + get-tree | select "Project/View" + get-button "Save Project" | click + } + } + get-tree | select "Model/Player" | double-click +} +with [get-editor Player] { + get-date-time | get-property enablement | equals false | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals false | verify-true +} +with [get-editor Player] { + get-button -after [get-label "Is Professional"] | check + get-editbox -after [get-label Name] | set-text test + get-editbox -after [get-label "Number Of Victories"] | click-text 1 +} +with [get-editor "Player test"] { + get-date-time | get-property enablement | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals true | verify-true +} +with [get-editor "Player test"] { + get-button -after [get-label "Is Professional"] | uncheck + get-editbox -after [get-label Name] | set-text "" + get-editbox -after [get-label "Number Of Victories"] | click-text 1 +} +with [get-editor Player] { + get-editbox -after [get-label "Number Of Victories"] | set-text 6 + get-editbox -after [get-label Height] | set-text "5.5" + get-editbox -after [get-label "Number Of Victories"] | click-text 1 +} +with [get-editor Player] { + get-date-time | get-property enablement | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals true | verify-true +} +with [get-editor Player] { + get-button -after [get-label "Is Professional"] | check + get-editbox -after [get-label Name] | set-text test + get-editbox -after [get-label "Number Of Victories"] | click-text 1 +} +with [get-editor "Player test"] { + get-date-time | get-property enablement | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals true | verify-true +} +with [get-editor "Player test"] { + get-button -after [get-label "Is Professional"] | uncheck + get-editbox -after [get-label "Number Of Victories"] | set-text 7 + get-editbox -after [get-label Height] | click-text 1 +} +with [get-editor "Player test"] { + get-date-time | get-property enablement | equals false | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals false | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/Rules/AndOrShowRule.test b/tests/ECPQ7Tests/Rules/AndOrShowRule.test new file mode 100644 index 0000000000..89bb6e7186 --- /dev/null +++ b/tests/ECPQ7Tests/Rules/AndOrShowRule.test @@ -0,0 +1,187 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,_fQ0PgDsqEeOHj9Cw0T_k4Q,_ElgmoHlIEeO9Ja8zvRhhOQ +Element-Name: AndOrShowRule +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _0IvOAHlOEeOByOq_5szdNw +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 6:07 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth" | get-menu "Show Rule" | click + select "Project/View/Control dateOfBirth/Show Rule false" | get-menu "Or Condition" | click + select "Project/View/Control dateOfBirth/Show Rule false/Or Condition" | get-menu "And Condition" | click + select "Project/View/Control dateOfBirth/Show Rule false/Or Condition/And Condition" | get-menu "Leaf Condition" + | click + select "Project/View/Control dateOfBirth/Show Rule false/Or Condition/And Condition/Leaf Condition" + | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "name : EString" + get-button OK | click +} +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth/Show Rule false/Or Condition/And Condition" | get-menu "Leaf Condition" + | click + select [get-item "Project/View/Control dateOfBirth/Show Rule false/Or Condition/And Condition" + | get-item "Leaf Condition" -index 1] | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" -index 1 | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "isProfessional : EBoolean" + get-button OK | click +} +get-editor "Feature Path Domain Model Reference" -index 1 | close +get-editor "Leaf Condition" | close +get-editor "Feature Path Domain Model Reference" | close +get-editor "Leaf Condition" | close +get-editor "And Condition" | close +get-editor "Or Condition" | close +get-editor "Show Rule false" | close +get-editor Player | close +get-editor View | close +get-view "Model Explorer" | get-tree + | select "Project/View/Control dateOfBirth/Show Rule false/Or Condition/And Condition/Leaf Condition" | double-click +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the String class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text test + get-button OK | click +} +get-editor "Leaf Condition test" | close +get-view "Model Explorer" | get-tree + | select "Project/View/Control dateOfBirth/Show Rule false/Or Condition/And Condition/Leaf Condition/Feature Path Domain Model Reference" + | double-click +get-editor "Feature Path Domain Model Reference" | close +get-view "Model Explorer" | get-tree + | select "Project/View/Control dateOfBirth/Show Rule false/Or Condition/And Condition/Leaf Condition" | double-click +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the Boolean class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text true + get-button OK | click +} +get-editor "Leaf Condition true" | close +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth/Show Rule false/Or Condition" | get-menu "And Condition" | click + select [get-item "Project/View/Control dateOfBirth/Show Rule false/Or Condition" | get-item "And Condition" + -index 1] | get-menu "Leaf Condition" | click + select [get-item "Project/View/Control dateOfBirth/Show Rule false/Or Condition" | get-item "And Condition" + -index 1 | get-item "Leaf Condition"] | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "height : EDouble" + get-button OK | click +} +get-editor "Feature Path Domain Model Reference" | close +get-editor "Leaf Condition" | close +get-editor "And Condition" | close +get-view "Model Explorer" | get-tree | select [get-item "Project/View/Control dateOfBirth/Show Rule false/Or Condition" + | get-item "And Condition" -index 1 | get-item "Leaf Condition"] | double-click +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the Double class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text "5.5" + get-button OK | click +} +get-editor "Leaf Condition 5.5" | close +with [get-view "Model Explorer" | get-tree] { + select [get-item "Project/View/Control dateOfBirth/Show Rule false/Or Condition" | get-item "And Condition" + -index 1] | get-menu "Leaf Condition" | click + select [get-item "Project/View/Control dateOfBirth/Show Rule false/Or Condition" | get-item "And Condition" + -index 1 | get-item "Leaf Condition"] | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "numberOfVictories : EInt" + get-button OK | click +} +get-editor "Feature Path Domain Model Reference" | close +get-editor "Leaf Condition" | close +get-view "Model Explorer" | get-tree | select [get-item "Project/View/Control dateOfBirth/Show Rule false/Or Condition" + | get-item "And Condition" -index 1 | get-item "Leaf Condition 5.5"] | double-click +get-editor "Leaf Condition 5.5" | close +get-view "Model Explorer" | get-tree | select [get-item "Project/View/Control dateOfBirth/Show Rule false/Or Condition" + | get-item "And Condition" -index 1 | get-item "Leaf Condition"] | double-click +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the Integer class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text 6 + get-button OK | click +} +get-editor "Leaf Condition 6" | close +with [get-view "Model Explorer"] { + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + get-tree | select "Project/View" + get-button "Save Project" | click + } + } + get-tree | select "Model/Player" | double-click +} +with [get-editor Player] { + get-button -after [get-label "Is Professional"] | check + with [get-editbox -after [get-label Name]] { + set-text test + key-type "TRAVERSE_TAB_NEXT" + } +} +with [get-editor "Player test"] { + get-date-time | get-property "isVisible()" | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property "isVisible()" | equals true | verify-true +} +with [get-editor "Player test"] { + get-button -after [get-label "Is Professional"] | uncheck + get-editbox -after [get-label Name] | set-text "" + get-editbox -after [get-label Height] | click-text 1 +} +with [get-editor Player] { + get-editbox -after [get-label Height] | set-text "5.5" + with [get-editbox -after [get-label "Number Of Victories"]] { + set-text 6 + key-type "TRAVERSE_TAB_NEXT" + } +} +with [get-editor Player] { + get-date-time | get-property "isVisible()" | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property "isVisible()" | equals true | verify-true +} +with [get-editor Player] { + get-editbox -after [get-label "Number Of Victories"] | set-text 7 + get-editbox -after [get-label Height] | click-text 1 + get-button -after [get-label "Is Professional"] | check + get-editbox -after [get-label Name] | set-text test + get-editbox -after [get-label Height] | click-text 1 +} +with [get-editor "Player test"] { + get-editbox -after [get-label "Number Of Victories"] | set-text 6 + get-editbox -after [get-label Height] | click-text 1 + get-editbox -after [get-label Name] | click-text 5 +} +with [get-editor "Player test"] { + get-date-time | get-property "isVisible()" | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property "isVisible()" | equals true | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/Rules/AndShowRule.test b/tests/ECPQ7Tests/Rules/AndShowRule.test new file mode 100644 index 0000000000..f26bca34dd --- /dev/null +++ b/tests/ECPQ7Tests/Rules/AndShowRule.test @@ -0,0 +1,101 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,_fQ0PgDsqEeOHj9Cw0T_k4Q,_ElgmoHlIEeO9Ja8zvRhhOQ +Element-Name: AndShowRule +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _8VDPgHlLEeOByOq_5szdNw +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 5:43 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth" | get-menu "Show Rule" | click + select "Project/View/Control dateOfBirth/Show Rule false" | get-menu "And Condition" | click + select "Project/View/Control dateOfBirth/Show Rule false/And Condition" | get-menu "Leaf Condition" | click + select "Project/View/Control dateOfBirth/Show Rule false/And Condition/Leaf Condition" + | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "name : EString" + get-button OK | click +} +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth/Show Rule false/And Condition" | get-menu "Leaf Condition" | click + select [get-item "Project/View/Control dateOfBirth/Show Rule false/And Condition" | get-item "Leaf Condition" + -index 1] | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" -index 1 | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "isProfessional : EBoolean" + get-button OK | click +} +get-view "Model Explorer" | get-tree + | select "Project/View/Control dateOfBirth/Show Rule false/And Condition/Leaf Condition" | double-click +get-editor "Leaf Condition" | close +with [get-tab-folder -index 1] { + double-click + double-click +} +get-editor "Feature Path Domain Model Reference" -index 1 | close +get-editor "Leaf Condition" | close +get-editor "Feature Path Domain Model Reference" | close +get-editor "And Condition" | close +get-editor "Show Rule false" | close +get-editor Player | close +get-editor View | close +get-view "Model Explorer" | get-tree + | select "Project/View/Control dateOfBirth/Show Rule false/And Condition/Leaf Condition" | double-click +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the String class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text test + get-button OK | click +} +get-editor "Leaf Condition test" | close +get-view "Model Explorer" | get-tree + | select "Project/View/Control dateOfBirth/Show Rule false/And Condition/Leaf Condition" | double-click +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the Boolean class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text true + get-button OK | click +} +with [get-view "Model Explorer"] { + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + get-tree | select "Project/View" + get-button "Save Project" | click + } + } +} +get-editor "Leaf Condition true" | close +get-view "Model Explorer" | get-tree | select "Model/Player" | double-click +with [get-editor Player] { + get-button -after [get-label "Is Professional"] | check + with [get-editbox -after [get-label Name]] { + set-text test + } +} +with [get-editor "Player test"] { + get-date-time | get-property "isVisible()" | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property "isVisible()" | equals true | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/Rules/OrEnableRule.test b/tests/ECPQ7Tests/Rules/OrEnableRule.test new file mode 100644 index 0000000000..44d746f096 --- /dev/null +++ b/tests/ECPQ7Tests/Rules/OrEnableRule.test @@ -0,0 +1,101 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,_fQ0PgDsqEeOHj9Cw0T_k4Q,_ElgmoHlIEeO9Ja8zvRhhOQ +Element-Name: OrEnableRule +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _2Ozl0HlSEeOByOq_5szdNw +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 6:28 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth" | get-menu "Enable Rule" | click + select "Project/View/Control dateOfBirth/Enable Rule false" | get-menu "Or Condition" | click + select "Project/View/Control dateOfBirth/Enable Rule false/Or Condition" | get-menu "Leaf Condition" | click + select "Project/View/Control dateOfBirth/Enable Rule false/Or Condition/Leaf Condition" + | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "name : EString" + get-button OK | click +} +get-editor "Feature Path Domain Model Reference" | close +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the String class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text test + get-button OK | click +} +get-editor "Leaf Condition test" | close +get-editor "Or Condition" | close +get-editor "Enable Rule false" | close +get-editor Player | close +get-editor View | close +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth/Enable Rule false/Or Condition" | get-menu "Leaf Condition" | click + select "Project/View/Control dateOfBirth/Enable Rule false/Or Condition/Leaf Condition" + | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "isProfessional : EBoolean" + get-button OK | click +} +get-editor "Feature Path Domain Model Reference" | close +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the Boolean class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text true + get-button OK | click +} +with [get-view "Model Explorer"] { + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + get-tree | select "Project/View" + get-button "Save Project" | click + } + } +} +get-editor "Leaf Condition true" | close +get-view "Model Explorer" | get-tree | select "Model/Player" | double-click +with [get-editor Player] { + get-date-time | get-property enablement | equals false | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals false | verify-true +} +get-editor Player | get-button -after [get-label "Is Professional"] | check +with [get-editor Player] { + get-date-time | get-property enablement | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals true | verify-true +} +with [get-editor Player] { + get-button -after [get-label "Is Professional"] | uncheck + get-editbox -after [get-label Name] | set-text test +} +with [get-editor "Player test"] { + get-date-time | get-property enablement | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals true | verify-true +} +get-editor "Player test" | get-button -after [get-label "Is Professional"] | check +with [get-editor "Player test"] { + get-date-time | get-property enablement | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals true | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/Rules/OrShowRule.test b/tests/ECPQ7Tests/Rules/OrShowRule.test new file mode 100644 index 0000000000..be4d661f43 --- /dev/null +++ b/tests/ECPQ7Tests/Rules/OrShowRule.test @@ -0,0 +1,109 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,_fQ0PgDsqEeOHj9Cw0T_k4Q,_ElgmoHlIEeO9Ja8zvRhhOQ +Element-Name: OrShowRule +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _S7YtwHlNEeOByOq_5szdNw +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 5:53 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +get-editor View | close +get-editor Player | close +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth" | get-menu "Show Rule" | click + select "Project/View/Control dateOfBirth/Show Rule false" | get-menu "Or Condition" | click + select "Project/View/Control dateOfBirth/Show Rule false/Or Condition" | get-menu "Leaf Condition" | click + select "Project/View/Control dateOfBirth/Show Rule false/Or Condition/Leaf Condition" + | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "name : EString" + get-button OK | click +} +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth/Show Rule false/Or Condition" | get-menu "Leaf Condition" | click + select [get-item "Project/View/Control dateOfBirth/Show Rule false/Or Condition" | get-item "Leaf Condition" + -index 1] | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" -index 1 | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "isProfessional : EBoolean" + get-button OK | click +} +get-editor "Feature Path Domain Model Reference" -index 1 | close +get-editor "Leaf Condition" | close +get-editor "Feature Path Domain Model Reference" | close +get-editor "Leaf Condition" | close +get-editor "Or Condition" | close +get-editor "Show Rule false" | close +get-view "Model Explorer" | get-tree + | select "Project/View/Control dateOfBirth/Show Rule false/Or Condition/Leaf Condition" | double-click +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the String class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text test + get-button OK | click +} +get-editor "Leaf Condition test" | close +get-view "Model Explorer" | get-tree + | select "Project/View/Control dateOfBirth/Show Rule false/Or Condition/Leaf Condition" | double-click +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the Boolean class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text true + get-button OK | click +} +get-editor "Leaf Condition true" | close +with [get-view "Model Explorer"] { + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + get-tree | select "Project/View" + get-button "Save Project" | click + } + } + get-tree | select "Model/Player" | double-click +} +with [get-editor Player | get-editbox -after [get-label Name]] { + set-text test +} +with [get-editor "Player test"] { + get-date-time | get-property "isVisible()" | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property "isVisible()" | equals true | verify-true +} +with [get-editor "Player test" | get-editbox -after [get-label Name]] { + set-text "" +} +get-editor Player | get-button -after [get-label "Is Professional"] | check +with [get-editor Player] { + get-date-time | get-property "isVisible()" | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property "isVisible()" | equals true | verify-true +} +with [get-editor Player] { + get-button -after [get-label "Is Professional"] | uncheck + get-editbox -after [get-label Name] | set-text test +} +get-editor "Player test" | get-button -after [get-label "Is Professional"] | check +with [get-editor "Player test"] { + get-date-time | get-property "isVisible()" | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property "isVisible()" | equals true | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/Rules/SimpleEnableRule.test b/tests/ECPQ7Tests/Rules/SimpleEnableRule.test new file mode 100644 index 0000000000..af2a8d2bb4 --- /dev/null +++ b/tests/ECPQ7Tests/Rules/SimpleEnableRule.test @@ -0,0 +1,77 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,_fQ0PgDsqEeOHj9Cw0T_k4Q,_ElgmoHlIEeO9Ja8zvRhhOQ +Element-Name: SimpleEnableRule +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _6WrsEHlQEeOByOq_5szdNw +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 6:16 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth" | get-menu "Enable Rule" | click + select "Project/View/Control dateOfBirth/Enable Rule false" | get-menu "Leaf Condition" | click + select "Project/View/Control dateOfBirth/Enable Rule false/Leaf Condition" + | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "name : EString" + get-button OK | click +} +get-editor "Feature Path Domain Model Reference" | close +get-editor "Enable Rule false" | close +get-editor Player | close +get-editor View | close +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the String class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text test + get-button OK | click +} +get-editor "Leaf Condition test" | close +with [get-view "Model Explorer"] { + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + get-tree | select "Project/View" + get-button "Save Project" | click + } + } + get-tree | select "Model/Player" | double-click +} + +with [get-editor Player] { + get-date-time | get-property enablement | equals false | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals false | verify-true +} +with [get-editor Player | get-editbox -after [get-label Name]] { + set-text test +} +with [get-editor "Player test"] { + get-date-time | get-property enablement | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals true | verify-true +} +with [get-editor "Player test" | get-editbox -after [get-label Name]] { + set-text test1 +} +with [get-editor "Player test1"] { + get-date-time | get-property enablement | equals false | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property enablement | equals false | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/Rules/SimpleShowRule.test b/tests/ECPQ7Tests/Rules/SimpleShowRule.test new file mode 100644 index 0000000000..b30704f7c6 --- /dev/null +++ b/tests/ECPQ7Tests/Rules/SimpleShowRule.test @@ -0,0 +1,78 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,_fQ0PgDsqEeOHj9Cw0T_k4Q,_ElgmoHlIEeO9Ja8zvRhhOQ +Element-Name: SimpleShowRule +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _4RLuQHlHEeO9Ja8zvRhhOQ +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 5:31 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +get-editor Player | close +get-editor View | close +with [get-view "Model Explorer" | get-tree] { + select "Project/View/Control dateOfBirth" | get-menu "Show Rule" | click + select "Project/View/Control dateOfBirth/Show Rule false" | get-menu "Leaf Condition" | click + select "Project/View/Control dateOfBirth/Show Rule false/Leaf Condition" + | get-menu "Feature Path Domain Model Reference" | click +} +get-editor "Feature Path Domain Model Reference" | get-button "Link Domain Model EFeature" | click +with [get-window "Select a EStructuralFeature"] { + get-tree | select "name : EString" + get-button OK | click +} +get-view "Model Explorer" | get-tree | select "Project/View/Control dateOfBirth/Show Rule false/Leaf Condition" + | double-click +get-editor "Leaf Condition" | get-button "Select Object" | click +with [get-window "Insert the value"] { + get-editbox + -after [get-label "The value must be parseable by the String class. For a double value please use the #.# format. For boolean values \'true\' or \'false\'."] + | set-text test + get-button OK | click +} +with [get-view "Model Explorer"] { + + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + try { + get-tree | select "Project/View" + get-button "Save Project" | click + } -catch { + wait 1000 + get-tree | select "Project/View" + get-button "Save Project" | click + } + } +} +get-editor "Show Rule false" | close +with [get-editor "Leaf Condition test"] { + click + close +} +get-editor "Feature Path Domain Model Reference" | close +get-view "Model Explorer" | get-tree | select "Model/Player" | double-click +with [get-editor Player] { +try { + get-date-time | get-property "isVisible()" | equals false | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property "isVisible()" | equals false | verify-true + } -catch { + } +} +with [get-editor Player | get-editbox -after [get-label Name]] { + set-text test +} +with [get-editor "Player test"] { + get-date-time | get-property "isVisible()" | equals true | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property "isVisible()" | equals true | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/Validation/HeightValidation.test b/tests/ECPQ7Tests/Validation/HeightValidation.test new file mode 100644 index 0000000000..e7b27ac985 --- /dev/null +++ b/tests/ECPQ7Tests/Validation/HeightValidation.test @@ -0,0 +1,69 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA +Element-Name: HeightValidation +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _O_M0kXkXEeO9Ja8zvRhhOQ +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 12:08 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +get-view "Model Explorer" | get-tree | get-menu "Create new project" | click +with [get-window "Create Project"] { + get-editbox -after [get-label "Project Name:"] | set-text Project + get-button Finish | click +} +get-view "Model Explorer" | get-tree | select Project | get-menu "New Model Element" | click +with [get-window "Add new model element"] { + get-tree | select "bowling/Player" + get-button Finish | click +} +with [get-editor Player] { + get-button "Add Entry" | click + get-editbox -after [get-label "EMails*"] | set-text "john@smith.com" + get-editbox -after [get-label Height] | click-text 1 + get-editbox -after [get-label Height] | set-text 15 + get-editbox -after [get-label Name] | click-text +} + +with [get-editor Player] { + get-editbox -after [get-label Height] | get-property backgroundColor | equals "#FF0000" | verify-true + get-label -after [get-label Height] | get-property "image.path" | contains "icons/validation_error.png" + | verify-true + get-label -after [get-label Height] | get-property "getToolTipText()" + | contains "Height seems too big." | verify-true +} + +get-view "Model Explorer" | get-tree | get-item "Project/Player" | get-property "image.decorations[0].path" + | contains "icons/error_decorate.png" | verify-true + +get-view "Model Explorer" | get-tree | get-item Project | get-property "image.decorations[0].path" + | contains "icons/error_decorate.png" | verify-true + + +with [get-editor Player] { + get-editbox -after [get-label Height] | set-text 6 + get-editbox -after [get-label Name] | click-text +} +get-editor Player | get-editbox -after [get-label Height] | get-property backgroundColor | equals "#FFFFFF" + | verify-true + + +try { + get-view "Model Explorer" | get-tree | get-item "Project/Player" | get-property "image.decorations[0].path" + | contains "icons/error_decorate.png" | verify-false + } -catch { + get-editor Player | get-editbox -after [get-label Height] | get-property backgroundColor | equals "#FFFFFF" + | verify-true + } + + + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/Validation/LowerBoundValidation.test b/tests/ECPQ7Tests/Validation/LowerBoundValidation.test index a39d56082e..3b0699ca63 100644 --- a/tests/ECPQ7Tests/Validation/LowerBoundValidation.test +++ b/tests/ECPQ7Tests/Validation/LowerBoundValidation.test @@ -50,6 +50,14 @@ with [get-editor "Player John" | get-label -after [get-label "EMails*"]] { get-property "getToolTipText()" | contains "with 0 values must have at least 1 values" | verify-true get-property "getImage().getBounds().toString()" | equals "Rectangle {0, 0, 16, 17}" | verify-true } + +//Validation Propogation to the Model Explorer Tree View +get-view "Model Explorer" | get-tree | get-item "TestProject/Player John" | get-property "image.decorations[0].path" + | contains "icons/error_decorate.png" | verify-true + +get-view "Model Explorer" | get-tree | get-item TestProject | get-property "image.decorations[0].path" + | contains "icons/error_decorate.png" | verify-true + with [get-editor "Player John"] { get-button "Add Entry" | click get-editbox -after [get-label "EMails*"] | set-text "john@smith.de" diff --git a/tests/ECPQ7Tests/Validation/ReferenceValidation.test b/tests/ECPQ7Tests/Validation/ReferenceValidation.test new file mode 100644 index 0000000000..c08e50a2c8 --- /dev/null +++ b/tests/ECPQ7Tests/Validation/ReferenceValidation.test @@ -0,0 +1,37 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,_fQ0PgDsqEeOHj9Cw0T_k4Q +Element-Name: ReferenceValidation +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _CIRsAHlEEeO9Ja8zvRhhOQ +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 4:47 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +get-editor View | get-label -after [get-label "Root EClass*"] | get-property "image.path" + | contains "icons/validation_error.png" | verify-true +get-editor View | get-button "Link Root EClas" | click +with [get-window "Select an EClass."] { + get-tree | select "bowling/Referee \\[org.eclipse.emf.emfstore.bowling.Referee\\]" + get-button OK | click +} +get-editor View | get-label -after [get-label "Root EClass*"] | get-property "getToolTipText()" | equals "" + | verify-true +get-editor View | get-button "Delete Reference" | click +with [get-editor View | get-label -after [get-label "Root EClass*"]] { + get-property "image.path" | contains "icons/validation_error.png" | verify-true + get-property "getToolTipText()" | contains "must be set" | verify-true +} +with [get-view "Model Explorer" | get-tree] { + get-item "Project/View" | get-property "image.decorations[0].path" | contains "icons/error_decorate.png" + | verify-true + get-item Project | get-property "image.decorations[0].path" | contains "icons/error_decorate.png" | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/Validation/UpperBoundValidation.test b/tests/ECPQ7Tests/Validation/UpperBoundValidation.test new file mode 100644 index 0000000000..ba8c19fec2 --- /dev/null +++ b/tests/ECPQ7Tests/Validation/UpperBoundValidation.test @@ -0,0 +1,41 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA +Element-Name: UpperBoundValidation +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _JxwwQHkgEeO9Ja8zvRhhOQ +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 12:27 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +get-view "Model Explorer" | get-tree | get-menu "Create new project" | click +with [get-window "Create Project"] { + get-editbox -after [get-label "Project Name:"] | set-text Project + get-button Finish | click +} +get-view "Model Explorer" | get-tree | select Project | get-menu "New Model Element" | click +get-window "Add new model element" | get-tree | select "bowling/Matchup" | double-click + +with [get-editor Matchup | get-label -after [get-label Games]] { + get-property "image.path" | contains "icons/validation_error.png" | verify-true + get-property "getToolTipText()" | contains "with 0 values must have at least 2 values" | verify-true +} + +get-editor Matchup | get-button "Add an instance of Game" | click +with [get-editor Matchup | get-label -after [get-label Games]] { + get-property "image.path" | contains "icons/validation_error.png" | verify-true + get-property "getToolTipText()" | contains "with 1 values must have at least 2 values" | verify-true +} +get-editor Matchup | get-button "Add an instance of Game" | click +with [get-editor Matchup] { + get-label -after [get-label Games] | get-property "getToolTipText()" | equals "" | verify-true + get-button "Add an instance of Game" | get-property enablement | equals false | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/ViewModel/GenerateControls.test b/tests/ECPQ7Tests/ViewModel/GenerateControls.test new file mode 100644 index 0000000000..b119a888a9 --- /dev/null +++ b/tests/ECPQ7Tests/ViewModel/GenerateControls.test @@ -0,0 +1,80 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA,_fQ0PgDsqEeOHj9Cw0T_k4Q,_T7Yg8DstEeOHj9Cw0T_k4Q +Element-Name: GenerateControls +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _ZzQNgYQOEeO0WrMxvPcxtw +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/23/14 10:31 AM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +get-editor "Player John" | close +get-editor Game | close +get-editor Matchup | close +get-editor "Tournament Amateur" | close +get-editor View | get-button "Link Root EClas" | click +get-window "Select an EClass." | get-tree | select "bowling/Player \\[org.eclipse.emf.emfstore.bowling.Player\\]" + | double-click +get-view "Model Explorer" | get-tree | select "Project/View" | get-menu "Generate Controls" | click +with [get-window -class SelectAttributesDialog] { + with [get-table] { + get-item "name : EString" | check + get-item "isProfessional : EBoolean" | check + get-item "gender : Gender" | check + } + get-button OK | click +} +with [get-view "Model Explorer" | get-tree] { + get-item "Project/View/Control name" | get-property caption | contains name | verify-true + get-item "Project/View/Control name" | get-property childCount | equals 1 | verify-true + get-item "Project/View/Control gender" | get-property caption | contains gender | verify-true + get-item "Project/View/Control gender" | get-property childCount | equals 1 | verify-true + get-item "Project/View/Control isProfessional" | get-property caption | contains isProfessional | verify-true + get-item "Project/View/Control isProfessional" | get-property childCount | equals 1 | verify-true +} +get-view "Model Explorer" | get-tree | select "Project/View/Control name/Feature Path Domain Model Reference" + | double-click +get-editor "Feature Path Domain Model Reference" | get-link "<a>name : EString</a>" | get-property toltip + | equals "name : EString" | verify-true +get-editor "Feature Path Domain Model Reference" | close +get-view "Model Explorer" | get-tree | select "Project/View/Control gender/Feature Path Domain Model Reference" + | double-click +get-editor "Feature Path Domain Model Reference" | get-link "<a>gender : Gender</a>" | get-property toltip + | equals "gender : Gender" | verify-true +get-editor "Feature Path Domain Model Reference" | close +get-view "Model Explorer" | get-tree | select "Project/View/Control isProfessional/Feature Path Domain Model Reference" + | double-click +get-editor "Feature Path Domain Model Reference" | get-link "<a>isProfessional : EBoolean</a>" | get-property toltip + | equals "isProfessional : EBoolean" | verify-true +get-editor "Feature Path Domain Model Reference" | close +with [get-view "Model Explorer"] { + get-tree | select Project + get-button "Save Project" | click + get-tree | select "TestProject/Player John" | double-click +} + + +get-editor "View" | close +get-view "Model Explorer" | get-tree | select "Project/View" | double-click + + + +get-editor "Player John" | close +get-view "Model Explorer" | get-tree | select "TestProject/Player John" | double-click + +with [get-editor "Player John"] { + get-label Name | get-property caption | equals Name | verify-true + get-editbox -after [get-label Name] | get-property text | equals John | verify-true + get-label Gender | get-property caption | equals Gender | verify-true + get-combo -after [get-label Gender] | get-property selection | equals Male | verify-true + get-label "Is Professional" | get-property caption | equals "Is Professional" | verify-true + get-button -after [get-label "Is Professional"] | get-property selected | equals true | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/tests/ECPQ7Tests/context/SetupRuleModelObjects.ctx b/tests/ECPQ7Tests/context/SetupRuleModelObjects.ctx new file mode 100644 index 0000000000..a8e252ff0b --- /dev/null +++ b/tests/ECPQ7Tests/context/SetupRuleModelObjects.ctx @@ -0,0 +1,42 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Context-Type: com.xored.q7.ecl.context +Element-Name: SetupRuleModelObjects +Element-Type: context +Element-Version: 2.0 +Id: _ElgmoHlIEeO9Ja8zvRhhOQ +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 6:01 PM + +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998 +Content-Type: text/ecl +Entry-Name: .ecl.context + +get-view "Model Explorer" | get-tree | select Project | get-menu "Create new project" | click +with [get-window "Create Project"] { + get-editbox -after [get-label "Project Name:"] | set-text Model + get-button Finish | click +} +get-view "Model Explorer" | get-tree | select Model | get-menu "New Model Element" | click +with [get-window "Add new model element"] { + get-tree | select "bowling/Player" + get-button Finish | click +} +get-editor View | get-button "Link Root EClas" | click +with [get-window "Select an EClass."] { + get-tree | select "bowling/Player \\[org.eclipse.emf.emfstore.bowling.Player\\]" + get-button OK | click +} +get-view "Model Explorer" | get-tree | select "Project/View" | get-menu "Generate Controls" | click +with [get-window -class SelectAttributesDialog] { + with [get-table] { + get-item "name : EString" | check + get-item "dateOfBirth : EDate" | check + get-item "height : EDouble" | check + get-item "isProfessional : EBoolean" | check + get-item "numberOfVictories : EInt" | check + } + get-button OK | click +} +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998-- diff --git a/tests/ECPQ7Tests/emfstore/Unset.test b/tests/ECPQ7Tests/emfstore/Unset.test index 404b03933c..e10757d670 100644 --- a/tests/ECPQ7Tests/emfstore/Unset.test +++ b/tests/ECPQ7Tests/emfstore/Unset.test @@ -140,7 +140,7 @@ with [get-editor Fan] { get-date-time | get-property date | equals "2013/5/12" | verify-true get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property time | equals "17:9:46" | verify-true get-button "Unset Date" | get-property tooltip | equals "Unset Date" | verify-true - get-button "The Has Season Ticket of the Fan" | get-property selected | equals false | verify-true + get-button -after [get-label "Has Season Ticket"] | get-property selected | equals false | verify-true get-button "Unset boolean" | get-property tooltip | equals "Unset boolean" | verify-true get-button Unset | get-property tooltip | equals Unset | verify-true get-combo -after [get-label Gender] | get-property selection | equals Female | verify-true @@ -189,7 +189,7 @@ with [get-editor Fan] { } get-combo -after [get-label Gender] | get-property selection | equals Female | verify-true get-button "Unset value" | get-property tooltip | equals "Unset value" | verify-true - get-button "The Has Season Ticket of the Fan" | get-property selected | equals false | verify-true + get-button -after [get-label "Has Season Ticket"] | get-property selected | equals false | verify-true get-button "Unset boolean" | get-property tooltip | equals "Unset boolean" | verify-true get-button "Unset Link" | get-property tooltip | equals "Unset Link" | verify-true get-label "(Not Set)" | get-property caption | equals "(Not Set)" | verify-true diff --git a/tests/ECPQ7Tests/emfstore/Unset2.test b/tests/ECPQ7Tests/emfstore/Unset2.test new file mode 100644 index 0000000000..3931e43c94 --- /dev/null +++ b/tests/ECPQ7Tests/emfstore/Unset2.test @@ -0,0 +1,213 @@ +--- Q7 testcase --- +Format-Version: 1.0 +Q7-vendor: www.xored.com/q7 +Contexts: _mY5uUKEgEeKX8e34E6tWIg,_rr2EEFpSEeKcnaHGSt8OwA,_IuFcgFpZEeKcnaHGSt8OwA,_f3qEUVpSEeKcnaHGSt8OwA +Element-Name: Unset2 +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _rtAI4HkvEeO9Ja8zvRhhOQ +Q7-Runtime-Version: 1.3.7.201309090800 +Save-Time: 1/9/14 3:38 PM +Testcase-Type: ecl + +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +get-view "Model Explorer" | get-tree | get-menu "Create new project" | click +with [get-window "Create Project"] { + get-editbox -after [get-label "Project Name:"] | set-text UnsetTest + get-button Finish | click +} +get-view "Model Explorer" | get-tree | select UnsetTest | get-menu "New Model Element" | click +with [get-window "Add new model element"] { + get-tree | select "bowling/Fan" + get-button Finish | click +} +with [get-editor Fan] { + get-label "No text set! Click to set text." | get-property caption | equals "No text set! Click to set text." + | verify-true + get-label "No date set! Click to set date." | get-property caption | equals "No date set! Click to set date." + | verify-true + get-label "No boolean set! Click to set boolean." | get-property caption + | equals "No boolean set! Click to set boolean." | verify-true + get-label "Not set. Click to set!" | get-property caption | equals "Not set. Click to set!" | verify-true + get-label "No value set! Click to set value." | get-property caption | equals "No value set! Click to set value." + | verify-true + get-label "No link set! Click to set link." | get-property caption | equals "No link set! Click to set link." + | verify-true + get-label "Not set. Click to set!" -after [get-label "Visited Tournaments"] | get-property caption + | equals "Not set. Click to set!" | verify-true + get-label "No number set! Click to set number." | get-property caption + | equals "No number set! Click to set number." | verify-true + get-label "No number set! Click to set number." -after [get-label "Money Spent On Tickets"] | get-property caption + | equals "No number set! Click to set number." | verify-true +} +get-view "Model Explorer" | get-tree | get-item "UnsetTest/Fan" | get-property childCount | equals 0 | verify-true +get-view "Model Explorer" | get-tree | select UnsetTest | get-menu Share | click +with [get-window "ECPRepository Wizard"] { + get-button "Select existing repository" | click + get-button "Next >" | click + get-table | select "Local EMFStore" + get-button Finish | click +} +try{ +with [get-window "Authentication required"] { + get-combo -after [get-label Username] | set-text super + get-editbox -after [get-label Password] | set-text super + get-button | click + get-button OK | click +} +} -catch {} +get-window "Share succeeded" | get-button OK | click +get-view "Model Repositories" | get-tree | select "Local EMFStore/UnsetTest" | get-menu "Checkout..." | click +with [get-window Checkout] { + get-editbox -after [get-label "Project name:"] | set-text UnsetTest2 + get-button Finish | click +} +get-editor Fan | close +get-view "Model Explorer" | get-tree | select "UnsetTest2 \\[trunk, Version 0\\]/Fan" | double-click +with [get-editor Fan] { + get-label "No text set! Click to set text." | get-property caption | equals "No text set! Click to set text." + | verify-true + get-label "No date set! Click to set date." | get-property caption | equals "No date set! Click to set date." + | verify-true + get-label "No boolean set! Click to set boolean." | get-property caption + | equals "No boolean set! Click to set boolean." | verify-true + get-label "Not set. Click to set!" | get-property caption | equals "Not set. Click to set!" | verify-true + get-label "No value set! Click to set value." | get-property caption | equals "No value set! Click to set value." + | verify-true + get-label "No link set! Click to set link." | get-property caption | equals "No link set! Click to set link." + | verify-true +} +get-editor Fan | close +with [get-view "Model Explorer" | get-tree] { + select "UnsetTest \\[trunk, Version 0\\]/Fan" | get-menu "Fan Merchandise Merchandise" | click + select "UnsetTest \\[trunk, Version 0\\]/Fan" | get-menu "Favourite Merchandise Merchandise" | click +} +get-editor Merchandise | close +get-editor Merchandise | close +get-view "Model Explorer" | get-tree | select "UnsetTest \\[trunk, Version 0\\]/Fan/Merchandise" | double-click + +with [get-editor Merchandise] { + get-label "No number set! Click to set number." | get-property caption + | equals "No number set! Click to set number." | verify-true + get-label "No number set! Click to set number." -after [get-label "Serial Number"] | get-property caption + | equals "No number set! Click to set number." | verify-true +} +get-view "Model Explorer" | get-tree | get-item "UnsetTest \\[trunk, Version 0\\]/Fan" | get-property childCount + | equals 2 | verify-true +get-view "Model Explorer" | get-tree | select "UnsetTest \\[trunk, Version 0\\]" | get-menu Commit | click +get-window Commit | get-button OK | click +get-view "Model Explorer" | get-tree | select "UnsetTest2 \\[trunk, Version 0\\]" | get-menu Update | click +get-window Update | get-button OK | click +get-editor Merchandise | close +get-view "Model Explorer" | get-tree | select [get-item "UnsetTest2 \\[trunk, Version 1\\]/Fan" | get-item Merchandise + -index 1] | double-click +with [get-editor Merchandise] { + get-label "No number set! Click to set number." | get-property caption + | equals "No number set! Click to set number." | verify-true + get-label "No number set! Click to set number." -after [get-label "Serial Number"] | get-property caption + | equals "No number set! Click to set number." | verify-true +} +get-view "Model Explorer" | get-tree | get-item "UnsetTest2 \\[trunk, Version 1\\]/Fan" | get-property childCount + | equals 2 | verify-true +get-editor Merchandise | close +get-view "Model Explorer" | get-tree | select "UnsetTest \\[trunk, Version 1\\]/Fan" | double-click +with [get-editor Fan] { + get-label "No text set! Click to set text." | click + get-label "No date set! Click to set date." | click + get-label "No boolean set! Click to set boolean." | click + get-label "Not set. Click to set!" | click + get-label "No value set! Click to set value." | click + get-label "No link set! Click to set link." | click + get-label "Not set. Click to set!" | click + get-label "No number set! Click to set number." | click + get-label "No number set! Click to set number." | click +} +with [get-editor Fan] { + get-editbox -after [get-label Name] | get-property text | equals "" | verify-true + get-button "Unset text" | get-property tooltip | equals "Unset text" | verify-true +} +with [get-editor Fan] { + with [get-date-time] { + set-value "2013/5/12 18:9:0" + } + get-date-time -after [get-label "Date Of Birth"] -index 1 | set-value "2013/5/12 18:9:0" +} +with [get-editor Fan] { + get-date-time | get-property date | equals "2013/5/12" | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property time | equals "18:9:0" | verify-true + get-button "Unset Date" | get-property tooltip | equals "Unset Date" | verify-true + get-button -after [get-label "Has Season Ticket"] | get-property selected | equals false | verify-true + get-button "Unset boolean" | get-property tooltip | equals "Unset boolean" | verify-true + get-button Unset | get-property tooltip | equals Unset | verify-true + get-combo -after [get-label Gender] | get-property selection | equals Female | verify-true + get-button "Unset value" | get-property tooltip | equals "Unset value" | verify-true + get-label "(Not Set)" | get-property caption | equals "(Not Set)" | verify-true + get-button "Unset Link" | get-property tooltip | equals "Unset Link" | verify-true +} +with [get-editor Fan] { + get-button Unset -after [get-label "Visited Tournaments"] | get-property tooltip | equals Unset | verify-true + get-editbox -after [get-label "Number Of Tournaments Visited"] | get-property text | equals 0 | verify-true + get-button "Unset number" | get-property tooltip | equals "Unset number" | verify-true + get-editbox -after [get-label "Money Spent On Tickets"] | get-property text | equals 0 | verify-true + get-button "Unset number" -after [get-label "Money Spent On Tickets"] | get-property tooltip + | equals "Unset number" | verify-true +} +get-editor Fan | close +get-view "Model Explorer" | get-tree | select "UnsetTest \\[trunk, Version 1\\]/Fan/Merchandise" | double-click +with [get-editor Merchandise] { + get-label "No number set! Click to set number." | click + get-label "No number set! Click to set number." | click +} +with [get-editor Merchandise] { + get-editbox -after [get-label Price] | get-property text | equals "" | verify-true + get-button "Unset number" | get-property tooltip | equals "Unset number" | verify-true + get-editbox -after [get-label "Serial Number"] | get-property text | equals "" | verify-true + get-button "Unset number" -after [get-label "Serial Number"] | get-property tooltip | equals "Unset number" + | verify-true +} +get-editor Merchandise | close +get-view "Model Explorer" | get-tree | select "UnsetTest \\[trunk, Version 1\\]" | get-menu Commit | click +get-window Commit | get-button OK | click +get-view "Model Explorer" | get-tree | select "UnsetTest2 \\[trunk, Version 1\\]" | get-menu Update | click +get-window Update | get-button OK | click +get-view "Model Explorer" | get-tree | select "UnsetTest2 \\[trunk, Version 2\\]/Fan" | double-click + +with [get-editor Fan] { + get-editbox -after [get-label Name] | get-property text | equals "" | verify-true + get-button "Unset text" | get-property caption | equals "" | verify-true + get-date-time | get-property date | equals "2013/5/12" | verify-true + get-date-time -after [get-label "Date Of Birth"] -index 1 | get-property time | equals "17:9:46" | verify-true + get-button "Unset Date" | get-property caption | equals "" | verify-true + get-button Unset | get-property tooltip | equals Unset | verify-true + with [get-control Any -index 45] { + get-property enablement | equals true | verify-true + get-property containMenu | equals false | verify-true + get-property borderWith | equals 0 | verify-true + get-property backgroundColor | equals "#FFFFFF" | verify-true + get-property foregroundColor | equals "#000000" | verify-true + } + get-combo -after [get-label Gender] | get-property selection | equals Female | verify-true + get-button "Unset value" | get-property tooltip | equals "Unset value" | verify-true + get-button -after [get-label "Has Season Ticket"] | get-property selected | equals false | verify-true + get-button "Unset boolean" | get-property tooltip | equals "Unset boolean" | verify-true + get-button "Unset Link" | get-property tooltip | equals "Unset Link" | verify-true + get-label "(Not Set)" | get-property caption | equals "(Not Set)" | verify-true + get-button Unset -after [get-label "Visited Tournaments"] | get-property tooltip | equals Unset | verify-true + with [get-control Any -index 95] { + get-property enablement | equals true | verify-true + get-property containMenu | equals false | verify-true + get-property borderWith | equals 0 | verify-true + get-property backgroundColor | equals "#FFFFFF" | verify-true + get-property foregroundColor | equals "#000000" | verify-true + } + get-button "Unset number" | get-property tooltip | equals "Unset number" | verify-true + get-editbox -after [get-label "Number Of Tournaments Visited"] | get-property text | equals 0 | verify-true + get-button "Unset number" -after [get-label "Money Spent On Tickets"] | get-property tooltip + | equals "Unset number" | verify-true + get-editbox -after [get-label "Money Spent On Tickets"] | get-property text | equals "0" | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--
\ No newline at end of file |