| --- Q7 testcase --- |
| Format-Version: 1.0 |
| Q7-vendor: www.xored.com/q7 |
| Contexts: _SapwEL4pEeOsAoUpt_cnqw,_LOMGYGrvEeK_JdLra2Bk5A,_b-pvsLdMEeSzKYAU0FYwkQ |
| Element-Name: ts012_tc002_case1 |
| Element-Type: testcase |
| Element-Version: 3.0 |
| External-Reference: |
| Id: _9lJ2ILdVEeSzKYAU0FYwkQ |
| Q7-Runtime-Version: 1.3.15.201412220512 |
| Save-Time: 3/18/15 3:29 PM |
| Testcase-Type: ecl |
| |
| ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa |
| Content-Type: text/plain |
| Entry-Name: .description |
| |
| This test case tests the content of the SMV and the CMVs, and the synchronization between elements. |
| |
| TEST STEPS |
| 1) Select the 3 ecore models and run a 3-way comparison (select origin/R1.ecore as ancestor) //asserts that the 3 models are selected |
| 2) Check the content of the SMV and its default selected element |
| 3) Check the content of the three CMVs (left, right, ancestor) and their default selected element |
| 4) Check synchronization between SMV and CMVs |
| 5) Switch to Default Group : Check the content of the SMV |
| 6) Switch to By Kind Group : Check the content of the SMV |
| 7) Switch to By Resource Group : Check the content of the SMV |
| ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- |
| ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac |
| Content-Type: text/ecl |
| Entry-Name: .content |
| |
| with [get-view "Package Explorer" | get-tree] { |
| select "case1/left/R1.ecore" "case1/origin/R1.ecore" "case1/right/R1.ecore" |
| get-menu "Compare With/Each Other" | click |
| get-item "case1/left/R1.ecore" | get-property selected | equals true | verify-true |
| get-item "case1/origin/R1.ecore" | get-property selected | equals true | verify-true |
| get-item "case1/right/R1.ecore" | get-property selected | equals true | verify-true |
| } |
| with [get-window "Select Common Ancestor"] { |
| get-button "\'/case1/origin/R1.ecore\'" | click |
| get-button OK | click |
| } |
| |
| get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')" |
| | get-button "Expand All" | click |
| get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')" |
| | get-button "Show Ancestor Pane" | click |
| // 3-way Group Provider |
| with [get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')"] { |
| // Check selection |
| with [get-tree] { |
| get-property "selection[0].path[0]" | equals "> case1/right/R1.ecore" | verify-true |
| get-property "selection[0].path[1]" | equals "> A" | verify-true |
| get-property "selection[0].path[2]" | equals "C \\[eSubpackages add\\]" | verify-true |
| } |
| with [get-tree -after [get-label "(Local: /)?case1/right/R1.ecore"] -index 1] { |
| get-property "selection[0].path[0]" | equals A | verify-true |
| get-property "selection[0].path[1]" | equals " " | verify-true |
| } |
| with [get-tree -after [get-label "(Local: /)?case1/right/R1.ecore"] -index 2] { |
| get-property "selection[0].path[0]" | equals A | verify-true |
| get-property "selection[0].path[1]" | equals C | verify-true |
| } |
| |
| //Expand CMV's trees |
| get-tree -after [get-label "(Local: /)?case1/right/R1.ecore"] | select A | expand-all |
| |
| // Check content of SMV |
| with [get-tree] { |
| get-property "getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 2 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 0 |
| | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()" |
| | equals "C [eSubpackages add]" | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getItems().length" | equals 1 |
| | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().length" |
| | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" |
| | equals 0 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getText()" |
| | equals "F [eSubpackages delete]" | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getText()" |
| | equals "> D" | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getText()" | equals "> [ ... ]" |
| | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "> A" | verify-true |
| get-property "getItems().TreeItem[0].getText()" | equals "> case1/right/R1.ecore" | verify-true |
| } |
| // Check content of ancestor CMV |
| with [get-tree -after [get-label "(Local: /)?case1/right/R1.ecore"]] { |
| get-property "getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" |
| | equals 2 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" |
| | equals 0 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()" |
| | equals E | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getItems().length" |
| | equals 0 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[1].getText()" |
| | equals F | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals D |
| | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "[ ... ]" | verify-true |
| get-property "getItems().TreeItem[0].getText()" | equals A | verify-true |
| } |
| // Check content of left CMV |
| with [get-tree -after [get-label "(Local: /)?case1/right/R1.ecore"] -index 1] { |
| get-property "getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().length" | equals 2 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 0 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "" | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().length" |
| | equals 2 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" |
| | equals 0 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getText()" |
| | equals E | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[1].getItems().length" |
| | equals 0 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[1].getText()" |
| | equals F | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getText()" | equals D |
| | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getText()" | equals "[ ... ]" | verify-true |
| get-property "getItems().TreeItem[0].getText()" | equals A | verify-true |
| } |
| // Check content of right CMV |
| with [get-tree -after [get-label "(Local: /)?case1/right/R1.ecore"] -index 2] { |
| get-property "getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().length" | equals 2 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().length" |
| | equals 2 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" |
| | equals 0 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getText()" |
| | equals E | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[1].getItems().length" |
| | equals 0 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[1].getText()" |
| | equals "" | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getText()" | equals D |
| | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getText()" | equals "[ ... ]" | verify-true |
| get-property "getItems().TreeItem[0].getText()" | equals A | verify-true |
| } |
| } |
| |
| // Check synchronization |
| get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')" | get-tree |
| | select "> case1\\/right\\/R1.ecore/> A/> \\[ ... \\]/> D/F \\[eSubpackages delete\\]" | double-click |
| with [get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')"] { |
| with [get-tree] { |
| get-property "selection[0].path[0]" | equals "> case1/right/R1.ecore" | verify-true |
| get-property "selection[0].path[1]" | equals "> A" | verify-true |
| get-property "selection[0].path[2]" | equals "> \\[ ... \\]" | verify-true |
| get-property "selection[0].path[3]" | equals "> D" | verify-true |
| get-property "selection[0].path[4]" | equals "F \\[eSubpackages delete\\]" | verify-true |
| } |
| with [get-tree -after [get-label "(Local: /)?case1/right/R[13].ecore"]] { |
| get-property "selection[0].path[0]" | equals A | verify-true |
| get-property "selection[0].path[1]" | equals "\\[ ... \\]" | verify-true |
| get-property "selection[0].path[2]" | equals D | verify-true |
| get-property "selection[0].path[3]" | equals F | verify-true |
| } |
| with [get-tree -after [get-label "(Local: /)?case1/right/R[13].ecore"] -index 1] { |
| get-property "selection[0].path[0]" | equals A | verify-true |
| get-property "selection[0].path[1]" | equals "\\[ ... \\]" | verify-true |
| get-property "selection[0].path[2]" | equals D | verify-true |
| get-property "selection[0].path[3]" | equals F | verify-true |
| } |
| with [get-tree -after [get-label "(Local: /)?case1/right/R[13].ecore"] -index 2] { |
| get-property "selection[0].path[0]" | equals A | verify-true |
| get-property "selection[0].path[1]" | equals "\\[ ... \\]" | verify-true |
| get-property "selection[0].path[2]" | equals D | verify-true |
| get-property "selection[0].path[3]" | equals " " | verify-true |
| } |
| } |
| |
| // Default Group Provider |
| get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')" | get-button Groups | click -arrow |
| get-menu Default | click |
| get-window "Group preference" | get-button No | click |
| get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')" |
| | get-button "Expand All" | click |
| with [get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')" | get-tree] { |
| get-property "getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().length" | equals 2 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 0 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "C [eSubpackages add]" | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().length" | equals 1 |
| | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" |
| | equals 0 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getText()" |
| | equals "F [eSubpackages delete]" | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getItems().TreeItem[0].getText()" | equals "> D" |
| | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[1].getText()" | equals "> [ ... ]" | verify-true |
| get-property "getItems().TreeItem[0].getText()" | equals "> A" | verify-true |
| } |
| |
| // By Kind Group Provider |
| get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')" |
| | get-button Groups | click -arrow |
| get-menu "By Kind" | click |
| get-window "Group preference" | get-button No | click |
| get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')" |
| | get-button "Expand All" | click |
| with [get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')" | get-tree] { |
| get-property "getItems().length" | equals 2 | verify-true |
| get-property "getItems().TreeItem[0].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 0 |
| | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()" |
| | equals "C [eSubpackages add]" | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "> A" | verify-true |
| get-property "getItems().TreeItem[0].getText()" | equals "> Additions" | verify-true |
| get-property "getItems().TreeItem[1].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[1].getItems().TreeItem[0].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 1 |
| | verify-true |
| get-property "getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" |
| | equals 0 | verify-true |
| get-property "getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()" |
| | equals "F [eSubpackages delete]" | verify-true |
| get-property "getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "> D" |
| | verify-true |
| get-property "getItems().TreeItem[1].getItems().TreeItem[0].getText()" | equals "> [ ... ]" | verify-true |
| get-property "getItems().TreeItem[1].getText()" | equals "> Deletions" | verify-true |
| } |
| |
| // By Resource Group Provider |
| get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')" |
| | get-button Groups | click -arrow |
| get-menu "By Resource" | click |
| get-window "Group preference" | get-button No | click |
| get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')" |
| | get-button "Expand All" | click |
| with [get-editor "Compare (\'case1/right/R1.ecore\' - \'case1/left/R1.ecore\' - \'case1/right/R1.ecore\')" | get-tree] { |
| get-property "getItems().length" | equals 2 | verify-true |
| get-property "getItems().TreeItem[0].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 0 |
| | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getItems().TreeItem[0].getText()" |
| | equals "C [eSubpackages add]" | verify-true |
| get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | equals "> A" | verify-true |
| get-property "getItems().TreeItem[0].getText()" | equals "left/R1.ecore <-> right/R1.ecore (origin/R1.ecore)" |
| | verify-true |
| get-property "getItems().TreeItem[1].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[1].getItems().TreeItem[0].getItems().length" | equals 1 | verify-true |
| get-property "getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getItems().length" | equals 0 |
| | verify-true |
| get-property "getItems().TreeItem[1].getItems().TreeItem[0].getItems().TreeItem[0].getText()" |
| | equals "F [eSubpackages delete]" | verify-true |
| get-property "getItems().TreeItem[1].getItems().TreeItem[0].getText()" | equals "> D" | verify-true |
| get-property "getItems().TreeItem[1].getText()" | equals "left/R3.ecore <-> right/R3.ecore (origin/R3.ecore)" |
| | verify-true |
| } |
| ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- |