blob: 3ab30832db20ebdf1a39ffdea0e392b44fe04068 [file] [log] [blame]
--- RCPTT testcase ---
Format-Version: 1.0
Contexts: _D4Pj4C3lEeSwhO5Nwx0hPg,_Iu0EsS36EeSYRYqCbC6LMQ,_KNHBoKPJEemYVp7Ch3g4pw
Element-Name: ViewModelRules_nested
Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _o1gAAKS1EemqHtyndiPQqQ
Runtime-Version: 2.5.2.202006292356
Save-Time: 7/23/20 4:10 PM
Testcase-Type: ecl
------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa
Content-Type: text/plain
Entry-Name: .description
Smoke test for nested conditions contained in an IterateCondition
------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa--
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content
// SETUP VIEW MODEL
MiH-View-Model
get-view "Project Explorer" | get-tree | select "org.eclipse.emf.ecp.makeithappen.model.viewmodel/viewmodels/UserGroup.view"
| get-menu -path "Open With/View Model Editor" | click
get-editor "UserGroup.view" | get-tree | select View | get-menu -path "Generate Controls" | click
with [get-window -class WizardDialog] {
get-table | get-item -path "name : EString" | check
get-button Finish | click
}
// Setup table with objects to iterate over
with [get-editor "UserGroup.view"] {
with [get-tree] {
select View | get-menu -path TableControl | click
select "View/TableControl"
}
get-button "Create and link new Domain Model Reference" | click
}
with [get-window "Configure TableDomainModelReference"] {
get-button "Create and link new Domain Model Reference" | click
with [get-window "New Reference Element"] {
get-tree | select "model/FeaturePathDomainModelReference"
get-button "Next >" | click
get-button "Link Domain Model EFeature" | click
with [get-window "Select a EStructuralFeature"] {
get-tree | select "users : User"
get-button OK | click
}
get-button Finish | click
}
get-button Finish | click
}
with [get-editor "UserGroup.view"] {
get-tree | select "View/TableControl" | get-menu -path "Generate Columns" | click
get-table | select email dateOfBirth nationality heigth weight timeOfRegistration active gender lastName
with [get-button Remove] {
click
key-type "M1+s"
}
}
// enable rule with iterate condition
with [get-editor "UserGroup.view"] {
with [get-tree] {
select "View/Control name" | get-menu -path "Enable Rule" | click
select "View/Control name/Enable Rule false" | get-menu -path "Iterate Condition" | click
select "View/Control name/Enable Rule false/Iterate Condition all"
}
get-combo -after [get-label "Quantifier*"] | select Any
get-button "Create and link new Item Reference" | click
}
with [get-window "New Reference Element"] {
get-tree | select "model/FeaturePathDomainModelReference"
get-button "Next >" | click
get-button "Link Domain Model EFeature" | click
with [get-window "Select a EStructuralFeature"] {
get-tree | select "users : User"
get-button OK | click
}
get-button Finish | click
}
// nested leaf condition
with [get-editor "UserGroup.view"] {
get-tree | select "View/Control name/Enable Rule false/Iterate Condition any" | get-menu -path "Leaf Condition" | click
get-tree | select "View/Control name/Enable Rule false/Iterate Condition any/Leaf Condition"
get-button "Create and link new Domain Model Reference" | click
}
with [get-window "New Reference Element"] {
get-tree | select "model/FeaturePathDomainModelReference"
get-button "Next >" | click
get-button "Link Domain Model EFeature" | click
with [get-window "Select a EStructuralFeature"] {
get-tree | select "firstName : EString"
get-button OK | click
}
get-button Finish | click
}
get-editor "UserGroup.view" | get-button "Select Object" | click
with [get-window "Insert the value"] {
with [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 John
}
get-button OK | click
}
// ----------------------
// VERIFY BEHAVIOR
//-----------------------
get-view "EMF Forms Preview" | get-button "Refresh Preview View" | click
get-view "EMF Forms Preview" | get-editbox -after [get-label Name] | get-property enablement | equals false
| verify-true
get-view "EMF Forms Preview" | get-button "Add an instance of User" | click
get-view "EMF Forms Preview" | get-editbox -after [get-label Name] | get-property enablement | equals false
| verify-true
with [get-view "EMF Forms Preview" | get-table] {
select "" | activate-cell-edit -column 1 -type MouseClickSelection
with [get-editbox] {
set-text John
key-type Enter
}
apply-cell-edit -deactivate
}
get-view "EMF Forms Preview" | get-editbox -after [get-label Name] | get-property enablement | equals true | verify-true
with [get-view "EMF Forms Preview"] {
get-button "Add an instance of User" | click
with [get-table] {
select [get-item -path "" -index 1] | activate-cell-edit -column 1 -type MouseClickSelection
with [get-editbox] {
set-text Sepp
key-type Enter
}
apply-cell-edit -deactivate
}
}
get-view "EMF Forms Preview" | get-editbox -after [get-label Name] | get-property enablement | equals true | verify-true
with [get-view "EMF Forms Preview" | get-table] {
select John -column "First Name" | activate-cell-edit -column 1 -type MouseClickSelection
with [get-editbox] {
set-text Jo
key-type Enter
}
apply-cell-edit -deactivate
}
get-view "EMF Forms Preview" | get-editbox -after [get-label Name] | get-property enablement | equals false
| verify-true
------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac--