| --- RCPTT testcase --- |
| Format-Version: 1.0 |
| Contexts: _SapwEL4pEeOsAoUpt_cnqw,_LOMGYGrvEeK_JdLra2Bk5A,_KpbEwGNDEeSnVZVQFV_quQ |
| Element-Name: ts009_tc005_logicalmodel_view_synchro_editor |
| Element-Type: testcase |
| Element-Version: 3.0 |
| External-Reference: |
| Id: _cfl4QGNHEeSnVZVQFV_quQ |
| Runtime-Version: 2.0.0.201506120617 |
| Save-Time: 1/4/16 3:04 PM |
| Testcase-Type: ecl |
| |
| ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa |
| Content-Type: text/plain |
| Entry-Name: .description |
| |
| This test just checks the existence of the Logical Model View, and the initial state of its toolbar buttons. |
| |
| 1. Select Window/Show View/Other... |
| 2. Click on EMF Compare/Logical Model View item |
| 3. Click on a model |
| // Assert that the view is not populated (because the synchronization is not active) |
| 4. Activate the synchronization |
| 5. Click on a model |
| // Assert that the view is populated with the logical models computing from the selected model(because the synchronization is active) |
| 6. Click on another model |
| // Assert that the view is populated with the logical models computing from the new selected model |
| 7. Click on a folder |
| // Assert that the view is populated with the logical models computing from the old selected model |
| 8. Deactivate the synchronization |
| 9. Click on a model |
| // Assert that the view is populated with the logical models computing from old selected model |
| ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- |
| ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac |
| Content-Type: text/ecl |
| Entry-Name: .content |
| |
| get-button "View Menu" | click |
| get-view "Package Explorer" | get-menu "Filters..." | click |
| with [get-window "Java Element Filters"] { |
| get-table | get-item ".\\* resources" | uncheck |
| get-button OK | click |
| } |
| |
| //1. Select Window/Show View/Other... |
| get-menu "Window/Show View/Other..." | click |
| //2. Click on EMF Compare/Logical Model View item |
| with [get-window "Show View"] { |
| get-tree | select "EMF Compare/Logical Model View" |
| get-button OK | click |
| } |
| |
| //3. Open a model editor (double-click on a model) |
| get-view "Package Explorer" | get-tree | select "UML-Library/left/model.uml" | double-click |
| |
| //Create variable to store the logical model view tree |
| //From mars release, get-view Logical Model View return null, so we have to find another way to retrive the tree. |
| //It's ugly but I didn't found a proper way. |
| let [val lmvTree [try -command {get-view "Logical Model View" | get-tree} -catch {get-tree -index 2}]] { |
| |
| // Assert that the view is not populated (because the synchronization is not active) |
| $lmvTree | get-property itemCount | equals 0 | verify-true |
| //4. Focus on the opened editor. |
| // Assert that the view is not populated (because the synchronization is not active) |
| get-editor "model.uml" | get-tree | select "platform:\\/resource\\/UML-Library\\/left\\/model.uml" |
| $lmvTree | get-property itemCount | equals 0 | verify-true |
| //5. Open another model editor |
| // Assert that the view is not populated (because the synchronization is not active) |
| get-view "Package Explorer" | get-tree | select "UML-Library/origin/model.di" | double-click |
| $lmvTree | get-property itemCount | equals 0 | verify-true |
| //6. Activate synchronization |
| try -command {//From Mars release |
| get-view "Logical Model View" | get-button "Synchronize with Editor and Selection" | click |
| } -catch {//Before Mars release |
| get-button "Synchronize with Editor and Selection" | click |
| } |
| //7. Focus on the first opened editor. |
| // Assert that the view is populated (because the synchronization is active) |
| get-editor "model.uml" | get-tree | select "platform:\\/resource\\/UML-Library\\/left\\/model.uml" |
| with [$lmvTree] { |
| get-property itemCount | equals 3 | verify-true |
| get-property "getItems().TreeItem[0].getText()" | equals "model.di - /UML-Library/left" | verify-true |
| get-property "getItems().TreeItem[1].getText()" | equals "model.notation - /UML-Library/left" | verify-true |
| get-property "getItems().TreeItem[2].getText()" | equals "model.uml - /UML-Library/left" | verify-true |
| } |
| //8. Focus on the second opened editor. |
| // Assert that the view is populated |
| with [get-editor "model.di"] { |
| with [get-diagram -index 1 | get-edit-part -name model] { |
| mouse-move 543 80 -height 1055 -width 1315 |
| } |
| } |
| with [$lmvTree] { |
| get-property itemCount | equals 3 | verify-true |
| get-property "getItems().TreeItem[0].getText()" | equals "model.di - /UML-Library/origin" | verify-true |
| get-property "getItems().TreeItem[1].getText()" | equals "model.notation - /UML-Library/origin" | verify-true |
| get-property "getItems().TreeItem[2].getText()" | equals "model.uml - /UML-Library/origin" | verify-true |
| } |
| //9. Open and focused on a non-model editor |
| // Assert that the view is populated with the logical models computing from the old selected editor |
| get-view "Package Explorer" | get-tree | select "UML-Library/.project" | double-click |
| get-editor ".project" |
| with [$lmvTree] { |
| get-property itemCount | equals 3 | verify-true |
| get-property "getItems().TreeItem[0].getText()" | equals "model.di - /UML-Library/origin" | verify-true |
| get-property "getItems().TreeItem[1].getText()" | equals "model.notation - /UML-Library/origin" | verify-true |
| get-property "getItems().TreeItem[2].getText()" | equals "model.uml - /UML-Library/origin" | verify-true |
| } |
| //10. Deactivate the synchronization |
| try -command {//From Mars release |
| get-view "Logical Model View" | get-button "Synchronize with Editor and Selection" | click |
| } -catch {//Before Mars release |
| get-button "Synchronize with Editor and Selection" | click |
| } |
| //9. Click on an editor |
| // Assert that the view is populated with the logical models computing from old selected model |
| get-editor "model.uml" | get-tree | select "platform:\\/resource\\/UML-Library\\/left\\/model.uml" |
| with [$lmvTree] { |
| get-property itemCount | equals 3 | verify-true |
| get-property "getItems().TreeItem[0].getText()" | equals "model.di - /UML-Library/origin" | verify-true |
| get-property "getItems().TreeItem[1].getText()" | equals "model.notation - /UML-Library/origin" | verify-true |
| get-property "getItems().TreeItem[2].getText()" | equals "model.uml - /UML-Library/origin" | verify-true |
| } |
| } |
| get-button "View Menu" | click |
| get-view "Package Explorer" | get-menu "Filters..." | click |
| with [get-window "Java Element Filters"] { |
| get-table | get-item ".\\* resources" | check |
| get-button OK | click |
| } |
| ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- |