| --- RCPTT testcase --- |
| Format-Version: 1.0 |
| Contexts: _ihvnUC3mEeSwhO5Nwx0hPg,_ZOi4wZ77EeOm87IlbkWrfQ,_2bS8sTNtEeSiS7b7ptZeHw |
| Element-Name: EcoreEditor_OpenFromHistory |
| Element-Type: testcase |
| Element-Version: 3.0 |
| External-Reference: |
| Id: _wk-EcKiXEemAyNs4iWgMTw |
| Runtime-Version: 2.5.0.201907120000 |
| Save-Time: 7/18/19 2:03 PM |
| Testcase-Type: ecl |
| |
| ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa |
| Content-Type: text/plain |
| Entry-Name: .description |
| |
| Bug 541190: |
| Tests that the Ecore Editor (and thereby indirectly the Generic Editor) are capable of opening a model which is not present as a file in the workspace but only as a revision in the history. |
| Thereby, verify that the editor is in read-only mode because the opened revision can not be persisted. |
| ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- |
| ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac |
| Content-Type: text/ecl |
| Entry-Name: .content |
| |
| get-view "Project Explorer" | get-tree | select "com.eclipsesource.makeithappen.model/model/task.ecore" | get-menu |
| -path "Open With/Ecore Editor" | click |
| get-editor "task.ecore" | get-tree |
| | select "platform:\\/resource\\/com.eclipsesource.makeithappen.model\\/model\\/task.ecore/task" | get-menu |
| -path EEnum | click |
| with [get-window "Create new EEnum"] { |
| get-editbox -after [get-label Name] | set-text V1 |
| get-button OK | click |
| } |
| get-editor "task.ecore" | get-tree | get-item "platform:\\/resource\\/com.eclipsesource.makeithappen.model\\/model\\/task.ecore/task/V1" | get-menu -path Delete |
| get-button "Save (M1+S)" | click |
| with [get-editor "task.ecore" | get-editbox -after [get-label Name]] { |
| set-text V2 |
| key-type "TRAVERSE_TAB_NEXT" |
| } |
| get-button "Save (M1+S)" | click |
| get-editor "task.ecore" | close |
| |
| // Open second latest revision (with enum V1) |
| get-view "Project Explorer" | get-tree | select "com.eclipsesource.makeithappen.model/model/task.ecore" | get-menu |
| -path "Team/Show Local History" | click |
| get-view History | get-tree | select [get-item -path ".*" -index 1] | get-menu |
| -path "Open With/Ecore Editor" | click |
| |
| // verify read-only in detail |
| get-editor "task.ecore" | get-tree | select "file:\\/com.eclipsesource.makeithappen.model\\/model\\/task.ecore/task/V1" |
| get-editor "task.ecore" | get-editbox -after [get-label Name] | get-property enablement | equals false | verify-true |
| |
| // verify no context menu by example: delete, cut, copy actions |
| with [get-editor "task.ecore" | get-tree | get-item "file:\\/com.eclipsesource.makeithappen.model\\/model\\/task.ecore/task/V1"] { |
| verify-error { get-menu -path Delete } |
| verify-error { get-menu -path Cut } |
| verify-error { get-menu -path Copy } |
| } |
| |
| // verify that the toolbar buttons are not shown |
| with [get-editor "task.ecore"] { |
| verify-error { get-button "Load Ecore" } |
| verify-error { get-button "Generate All" } |
| } |
| |
| ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- |