diff options
| author | Mélanie Bats | 2016-08-30 13:31:06 +0000 |
|---|---|---|
| committer | Pierre-Charles David | 2016-09-02 07:59:54 +0000 |
| commit | d718783b5ba37f9627b12ade194af65ed5f8a43c (patch) | |
| tree | a046313db3f77e8dd436958123a84a67e68ca357 | |
| parent | 875b85c80a8d95254886b00397584c2806927150 (diff) | |
| download | org.eclipse.sirius-d718783b5ba37f9627b12ade194af65ed5f8a43c.tar.gz org.eclipse.sirius-d718783b5ba37f9627b12ade194af65ed5f8a43c.tar.xz org.eclipse.sirius-d718783b5ba37f9627b12ade194af65ed5f8a43c.zip | |
[497248] Update RCPTT tests
Remove the coordinate verifications which are not useful
Add test for the new external reference widget
Bug: 497248
Change-Id: I9c82153980234d8be045e9ddb433f2f551eb511c
Signed-off-by: Mélanie Bats <melanie.bats@obeo.fr>
17 files changed, 569 insertions, 11 deletions
diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/description/PropertiesTests.odesign index 0cfae6ef12..60d0f6dca9 100644 --- a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/description/PropertiesTests.odesign +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.label/description/PropertiesTests.odesign @@ -5,6 +5,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" + xmlns:tool="http://www.eclipse.org/sirius/description/tool/1.1.0" name="PropertiesTests" version="11.0.0.201601261200"> <ownedViewpoints diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/.classpath b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/.classpath new file mode 100644 index 0000000000..098194ca4b --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/.project b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/.project new file mode 100644 index 0000000000..8657d3d983 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.sirius.tests.rcptt.properties.design.referenceext</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.ManifestBuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.pde.SchemaBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/.settings/org.eclipse.jdt.core.prefs b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..f42de363af --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..eae608efe5 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/META-INF/MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.sirius.tests.rcptt.sample.properties.design.refererenceext +Bundle-SymbolicName: org.eclipse.sirius.tests.rcptt.sample.properties.design.refererenceext;singleton:=true +Bundle-Version: 4.1.0 +Bundle-Activator: org.eclipse.sirius.tests.rcptt.sample.properties.design.referenceext.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.sirius, + org.eclipse.sirius.common.acceleo.aql +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-Localization: plugin diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/build.properties b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/build.properties new file mode 100644 index 0000000000..c94531ff9e --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/description/PropertiesTests.odesign b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/description/PropertiesTests.odesign new file mode 100644 index 0000000000..d6b286d1e0 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/description/PropertiesTests.odesign @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:properties="http://www.eclipse.org/sirius/properties/1.0.0" xmlns:properties-ext-widgets-reference="http://www.eclipse.org/sirius/properties/1.0.0/ext/widgets/reference" name="PropertiesTests" version="11.0.0.201601261200"> + <ownedViewpoints name="PropertiesTestsReferenceExt" label="" icon=""/> + <extensions xsi:type="properties:ViewExtensionDescription"> + <pages identifier="" labelExpression="Reference" groups="//@extensions.0/@groups.0"/> + <groups identifier="ReferenceExt" labelExpression="Reference" domainClass=""> + <controls xsi:type="properties-ext-widgets-reference:ExtReferenceDescription" labelExpression="Mono containment ref" referenceNameExpression="containmentReference" semanticCandidateExpression="var:self"/> + <controls xsi:type="properties-ext-widgets-reference:ExtReferenceDescription" labelExpression="Multi containment ref" referenceNameExpression="containmentReferences" semanticCandidateExpression="var:self"/> + <controls xsi:type="properties-ext-widgets-reference:ExtReferenceDescription" labelExpression="Mono ref" referenceNameExpression="reference" semanticCandidateExpression="var:self"/> + <controls xsi:type="properties-ext-widgets-reference:ExtReferenceDescription" labelExpression="Multi ref" referenceNameExpression="references" semanticCandidateExpression="var:self"/> + <controls xsi:type="properties-ext-widgets-reference:ExtReferenceDescription" labelExpression="Mono ref Disable" isEnabledExpression="aql:false" referenceNameExpression="reference"/> + <controls xsi:type="properties-ext-widgets-reference:ExtReferenceDescription" labelExpression="Multi ref Disable" isEnabledExpression="aql:false" referenceNameExpression="references"/> + </groups> + </extensions> +</description:Group> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/plugin.xml new file mode 100644 index 0000000000..1cd3f6c1d7 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/plugin.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.0"?> +<plugin> + <extension point="org.eclipse.sirius.componentization"> + <component class="org.eclipse.sirius.tests.rcptt.sample.properties.design.referenceext.Activator" + id="org.eclipse.sirius.tests.rcptt.sample.properties.design" + name="PropertiesTests"> + </component> + </extension> +</plugin> diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/referenceext/Activator.java b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/referenceext/Activator.java new file mode 100644 index 0000000000..63b16e9283 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/src/org/eclipse/sirius/tests/rcptt/sample/properties/design/referenceext/Activator.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright (c) 2016 Obeo. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Obeo - initial API and implementation + *******************************************************************************/ +package org.eclipse.sirius.tests.rcptt.sample.properties.design.referenceext; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.sirius.tests.rcptt.sample.properties.design.reference"; + + // The shared instance + private static Activator plugin; + + private static Set<Viewpoint> viewpoints; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework. + * BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet<Viewpoint>(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/PropertiesTests.odesign")); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework. + * BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint : viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } +} diff --git a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/plugin.xml b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/plugin.xml index e96d7ba469..ad3be17370 100644 --- a/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/plugin.xml +++ b/plugins/org.eclipse.sirius.tests.rcptt.properties.samples/plugin.xml @@ -46,6 +46,10 @@ name="org.eclipse.sirius.tests.rcptt.properties.design.reference"> </projectDescriptor> <projectDescriptor + contentURI="contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.referenceext/" + name="org.eclipse.sirius.tests.rcptt.properties.design.referenceext"> + </projectDescriptor> + <projectDescriptor contentURI="contents/propertiestests/org.eclipse.sirius.tests.rcptt.properties.design.select/" name="org.eclipse.sirius.tests.rcptt.properties.design.select"> </projectDescriptor> diff --git a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/hyperlink/HyperlinkWidgetDefault.test b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/hyperlink/HyperlinkWidgetDefault.test index 4cc7e4dd1d..2dca577f23 100644 --- a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/hyperlink/HyperlinkWidgetDefault.test +++ b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/hyperlink/HyperlinkWidgetDefault.test @@ -7,7 +7,7 @@ Element-Version: 3.0 External-Reference: Id: _ZJml4B3GEeahj7Y4FJ9H9w Runtime-Version: 2.1.0.201606221726 -Save-Time: 7/6/16 10:54 AM +Save-Time: 8/30/16 4:35 PM Testcase-Type: ecl ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa @@ -43,7 +43,6 @@ with [get-view Properties | get-section Hyperlink | get-editbox -index 1] { get-property enablement | equals true | verify-true get-property readOnly | equals true | verify-true get-property text | equals Element1 | verify-true - get-property "getBounds().height" | equals 17 | verify-true get-property "styles[0].underline" | equals link | verify-true } ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/label/LabelWidgetDefault.test b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/label/LabelWidgetDefault.test index 3d839ae9f3..36daa087f0 100644 --- a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/label/LabelWidgetDefault.test +++ b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/label/LabelWidgetDefault.test @@ -7,7 +7,7 @@ Element-Version: 3.0 External-Reference: Id: _BGAcQB3BEeahj7Y4FJ9H9w Runtime-Version: 2.1.0.201606221726 -Save-Time: 7/7/16 2:30 PM +Save-Time: 8/30/16 4:41 PM Testcase-Type: ecl ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa @@ -52,6 +52,5 @@ with [get-view Properties | get-section Label | get-editbox -index 1] { "euismod est. Donec purus purus, hendrerit id tincidunt ut, varius ac magna. Nunc id viverra sem, vitae egest" + "as neque. Maecenas non commodo neque, sit amet ultrices velit. Curabitur consequat ultricies lectus, id effi" + "citur ipsum condimentum at." | verify-true - get-property "getBounds().height" | equals 17 | verify-true } ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/referenceext/ReferenceExtWidgetDefault.test b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/referenceext/ReferenceExtWidgetDefault.test new file mode 100644 index 0000000000..4535b550a5 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/referenceext/ReferenceExtWidgetDefault.test @@ -0,0 +1,348 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Contexts: _N-iakAicEea7hcZ9Jto1HQ,_Sc0HQAidEea7hcZ9Jto1HQ,_ISVO4AheEea7hcZ9Jto1HQ,_CxvK8AicEea7hcZ9Jto1HQ,_1dc_gAidEea7hcZ9Jto1HQ,_n3YRMG7AEeafMeCy9JeUaw,_ZuJ8AAifEea7hcZ9Jto1HQ +Element-Name: ReferenceExtWidgetDefault +Element-Type: testcase +Element-Version: 3.0 +External-Reference: +Id: _n3bUgG7AEeafMeCy9JeUaw +Runtime-Version: 2.1.0.201606221726 +Save-Time: 8/31/16 5:13 PM +Testcase-Type: ecl + +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa +Content-Type: text/plain +Entry-Name: .description + +This test aims to check the reference ext widget. + +The test : +* loads the tests projects released with the Sirius test product, +* opens the test diagram, +* selects the reference ext viewpoint, +* selects an element in the diagram, +* checks the properties view for the mono/multi containment/non containment reference widget. +------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa-- +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac +Content-Type: text/ecl +Entry-Name: .content + +// Check the mono containment ref +with [get-view Properties | get-section Reference] { + // Check the label + get-editbox | get-property text | equals "Mono containment ref" | verify-true + // Check the value + get-label "Test Element Element11" | get-property caption | equals "Test Element Element11" | verify-true + // Check the add button + with [get-button "Create a new object"] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Create a new object" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/Add_16x16.gif" + | verify-true + } + // Check the delete button + with [get-button "Remove the current object"] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Remove the current object" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/Delete_16x16.gif" + | verify-true + } +} +// Click on the add button +get-view Properties | get-section Reference | get-button "Create a new object" | click + +// Check a new dialog opens +get-window Create | get-button Finish | click + +// Check a new element was created +get-view Properties | get-section Reference | get-label "Test Element" | get-property caption | equals "Test Element" + | verify-true + +// Click on the remove button +get-view Properties | get-section Reference | get-button "Remove the current object" | click + +// Check that the value is deleted +get-view Properties | get-section Reference | get-label "<no value>" | get-property caption | equals "<no value>" + | verify-true + +// Check the multi containment ref +with [get-view Properties | get-section Reference] { + get-editbox -after [get-label "<no value>"] | get-property text | equals "Multi containment ref" | verify-true + // Check the table and its content + with [get-table] { + get-property className | equals "org.eclipse.swt.widgets.Table" | verify-true + get-property enablement | equals true | verify-true + get-property itemCount | equals 2 | verify-true + get-property "getItems().TableItem[0].getText()" | equals "Test Element Element12" | verify-true + get-property "getItems().TableItem[1].getText()" | equals "Test Element Element13" | verify-true + } + // Check create button + with [get-button "Create a new object" -after [get-label "<no value>"] -index 1] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Create a new object" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/Add_16x16.gif" + | verify-true + } + // Check remove button + with [get-button "Remove the current object" -after [get-label "<no value>"] -index 1] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Remove the current object" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/Delete_16x16.gif" + | verify-true + } + // Check move up button + with [get-button "Move up the selected value"] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Move up the selected value" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/ArrowUp_16x16.gif" + | verify-true + } + // Check move down button + with [get-button "Move down the selected value"] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Move down the selected value" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/ArrowDown_16x16" + + ".gif" | verify-true + } +} + +// Click on create button +get-view Properties | get-section Reference | get-button "Create a new object" -after [get-label "<no value>"] -index 1 + | click +// Check a new dialog opens +get-window Create | get-button Finish | click + +// Check a new element is created +with [get-view Properties | get-section Reference | get-table] { + get-property itemCount | equals 3 | verify-true + get-property "getItems().TableItem[0].getText()" | equals "Test Element Element12" | verify-true + get-property "getItems().TableItem[1].getText()" | equals "Test Element Element13" | verify-true + get-property "getItems().TableItem[2].getText()" | equals "Test Element" | verify-true +} +// Select an element and click on the remove button +with [get-view Properties | get-section Reference] { + get-table | select "Test Element" + get-button "Remove the current object" -after [get-label "<no value>"] -index 1 | click +} +// Check the element is deleted +with [get-view Properties | get-section Reference | get-table] { + get-property itemCount | equals 2 | verify-true + get-property "getItems().TableItem[0].getText()" | equals "Test Element Element12" | verify-true + get-property "getItems().TableItem[1].getText()" | equals "Test Element Element13" | verify-true +} +// Select an element and move it up in the list +with [get-view Properties | get-section Reference] { + get-table | select "Test Element Element13" + get-button "Move up the selected value" | click +} +// Check the element was moved up +with [get-view Properties | get-section Reference | get-table] { + get-property "getItems().TableItem[0].getText()" | equals "Test Element Element13" | verify-true + get-property "getItems().TableItem[1].getText()" | equals "Test Element Element12" | verify-true +} +// Select an element and move it down in the list +get-view Properties | get-section Reference | get-button "Move down the selected value" | click +// Check the element was moved down +with [get-view Properties | get-section Reference | get-table] { + get-property "getItems().TableItem[0].getText()" | equals "Test Element Element12" | verify-true + get-property "getItems().TableItem[1].getText()" | equals "Test Element Element13" | verify-true +} + +// Check the Mono ref +with [get-view Properties | get-section Reference] { + get-editbox -after [get-label "<no value>"] -index 1 | get-property text | equals "Mono ref" | verify-true + with [get-label "Test Element Element2"] { + get-property enablement | equals true | verify-true + get-property caption | equals "Test Element Element2" | verify-true + } + // Check the browse button + with [get-button "Browse your data to edit the current value"] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Browse your data to edit the current value" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/Browse_16x16.gif" + | verify-true + } + // Check the add button + with [get-button "Create a new object" -after [get-label "Test Element Element2"]] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Create a new object" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/Add_16x16.gif" + | verify-true + } + // Check the remove button + with [get-button "Remove the reference to the object"] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Remove the reference to the object" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/Delete_16x16.gif" + | verify-true + } +} +// Click on browse button +get-view Properties | get-section Reference | get-button "Browse your data to edit the current value" | click +// Check a new dialog opens +with [get-window Select] { + get-tree | select "platform:\\/resource\\/org.eclipse.sirius.tests.rcptt.properties.instance\\/PropertiesTestsIns" + + "tance.propertiestests/Test Root/Test Element Element3" + get-button Finish | click +} +// Check a new element is selected +get-view Properties | get-section Reference | get-label "Test Element Element3" | get-property caption | equals + "Test Element Element3" | verify-true +// Click on create button +get-view Properties | get-section Reference | get-button "Create a new object" -after [get-label + "Test Element Element3"] | click +// Check a new dialog opens +with [get-window Create] { + get-tree | select "platform:\\/resource\\/org.eclipse.sirius.tests.rcptt.properties.instance\\/PropertiesTestsIns" + + "tance.propertiestests/Test Root/Test Element Element3" + get-button Finish | click +} +// Check a new element was created +get-view Properties | get-section Reference | get-label "Test Element" | get-property caption | equals "Test Element" + | verify-true +// Click on the remove button +get-view Properties | get-section Reference | get-button "Remove the reference to the object" | click +// Check the element was deleted +get-view Properties | get-section Reference | get-label "<no value>" -after [get-label "<no value>"] | get-property + "caption" | equals "<no value>" | verify-true + +// Check the multi ref +with [get-view Properties | get-section Reference] { + get-editbox -after [get-label "<no value>" -after [get-label "<no value>"]] | get-property text | equals "Multi ref" + | verify-true + // Check the table and its content + with [get-table -after [get-label "<no value>" -after [get-label "<no value>"]]] { + get-property className | equals "org.eclipse.swt.widgets.Table" | verify-true + get-property enablement | equals true | verify-true + get-property itemCount | equals 2 | verify-true + get-property "getItems().TableItem[0].getText()" | equals "Test Element Element2" | verify-true + get-property "getItems().TableItem[1].getText()" | equals "Test Element Element3" | verify-true + } + // Check the browse button + with [get-button "Browse your data to edit the current value" -after [get-label "<no value>" -after [get-label + "<no value>"]] -index 1] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Browse your data to edit the current value" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/Browse_16x16.gif" + | verify-true + } + // Check the create button + with [get-button "Create a new object" -after [get-label "<no value>" -after [get-label "<no value>"]] -index 1] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Create a new object" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/Add_16x16.gif" + | verify-true + } + // Check the remove button + with [get-button "Remove the reference to the object" -after [get-label "<no value>" -after [get-label + "<no value>"]] -index 1] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Remove the reference to the object" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/Delete_16x16.gif" + | verify-true + } + // Check the move up button + with [get-button "Move up the selected value" -after [get-label "<no value>" -after [get-label "<no value>"]]] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Move up the selected value" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/ArrowUp_16x16.gif" + | verify-true + } + // Check the move down button + with [get-button "Move down the selected value" -after [get-label "<no value>" -after [get-label "<no value>"]]] { + get-property className | equals "org.eclipse.swt.widgets.Button" | verify-true + get-property enablement | equals true | verify-true + get-property tooltip | equals "Move down the selected value" | verify-true + get-property "image.path" | equals "org.eclipse.eef.ide.ui.ext.widgets.reference/icons/full16/ArrowDown_16x16" + + ".gif" | verify-true + } +} +// Click on browse button +get-view Properties | get-section Reference | get-button "Browse your data to edit the current value" -after [get-label + "<no value>" -after [get-label "<no value>"]] -index 1 | click +with [get-window "References -- Test Element Element1"] { + get-table | select "Test Element Element1" + get-button Add | click + get-button OK | click +} + +// Check a new value is added +with [get-view Properties | get-section Reference | get-table -after [get-label "<no value>" -after [get-label + "<no value>"]]] { + get-property itemCount | equals 3 | verify-true + get-property "getItems().TableItem[0].getText()" | equals "Test Element Element2" | verify-true + get-property "getItems().TableItem[1].getText()" | equals "Test Element Element3" | verify-true + get-property "getItems().TableItem[2].getText()" | equals "Test Element Element1" | verify-true +} + +// Click on the create button +get-view Properties | get-section Reference | get-button "Create a new object" -after [get-label "<no value>" + -after [get-label "<no value>"]] -index 1 | click +with [get-window Create] { + get-tree | select "platform:\\/resource\\/org.eclipse.sirius.tests.rcptt.properties.instance\\/PropertiesTestsIns" + + "tance.propertiestests/Test Root" + get-button Finish | click +} + +// Check the element was added to the reference +with [get-view Properties | get-section Reference | get-table -after [get-label "<no value>" -after [get-label + "<no value>"]]] { + get-property itemCount | equals 4 | verify-true + get-property "getItems().TableItem[0].getText()" | equals "Test Element Element2" | verify-true + get-property "getItems().TableItem[1].getText()" | equals "Test Element Element3" | verify-true + get-property "getItems().TableItem[2].getText()" | equals "Test Element Element1" | verify-true + get-property "getItems().TableItem[3].getText()" | equals "Test Element" | verify-true +} + +// Click on the remove button +with [get-view Properties | get-section Reference] { + get-table -after [get-label "<no value>" -after [get-label "<no value>"]] | select "Test Element" + get-button "Remove the reference to the object" -after [get-label "<no value>" -after [get-label "<no value>"]] + -index 1 | click +} +// check the element was removed +with [get-view Properties | get-section Reference | get-table -after [get-label "<no value>" -after [get-label + "<no value>"]]] { + get-property itemCount | equals 3 | verify-true + get-property "getItems().TableItem[0].getText()" | equals "Test Element Element2" | verify-true + get-property "getItems().TableItem[1].getText()" | equals "Test Element Element3" | verify-true + get-property "getItems().TableItem[2].getText()" | equals "Test Element Element1" | verify-true +} + +// Click on the move up button +with [get-view Properties | get-section Reference] { + get-table -after [get-label "<no value>" -after [get-label "<no value>"]] | select "Test Element Element1" + get-button "Move up the selected value" -after [get-label "<no value>" -after [get-label "<no value>"]] | click +} +// Check the element is moved up +with [get-view Properties | get-section Reference | get-table -after [get-label "<no value>" -after [get-label + "<no value>"]]] { + get-property "getItems().TableItem[0].getText()" | equals "Test Element Element2" | verify-true + get-property "getItems().TableItem[1].getText()" | equals "Test Element Element1" | verify-true + get-property "getItems().TableItem[2].getText()" | equals "Test Element Element3" | verify-true +} +// Click on the move down button +get-view Properties | get-section Reference | get-button "Move down the selected value" -after [get-label "<no value>" + -after [get-label "<no value>"]] | click + +// Check the element is moved down +with [get-view Properties | get-section Reference | get-table -after [get-label "<no value>" -after [get-label + "<no value>"]]] { + get-property "getItems().TableItem[0].getText()" | equals "Test Element Element2" | verify-true + get-property "getItems().TableItem[1].getText()" | equals "Test Element Element3" | verify-true + get-property "getItems().TableItem[2].getText()" | equals "Test Element Element1" | verify-true +} +------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/referenceext/SelectReferenceExtViewpoint.ctx b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/referenceext/SelectReferenceExtViewpoint.ctx new file mode 100644 index 0000000000..039130d8b9 --- /dev/null +++ b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/referenceext/SelectReferenceExtViewpoint.ctx @@ -0,0 +1,47 @@ +--- RCPTT testcase --- +Format-Version: 1.0 +Context-Type: org.eclipse.rcptt.ctx.ecl +Element-Name: SelectReferenceExtViewpoint +Element-Type: context +Element-Version: 2.0 +Id: _n3YRMG7AEeafMeCy9JeUaw +Runtime-Version: 2.1.0.201606221726 +Save-Time: 8/30/16 4:47 PM + +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998 +Content-Type: text/ecl +Entry-Name: .ecl.context + +with [get-view "Model Explorer" | get-tree] { + select "org.eclipse.sirius.tests.rcptt.properties.instance" | get-menu "Viewpoints Selection" | click +} +with [get-window "Viewpoints Selection"] { + with [get-table] { + get-item PropertiesTests | check + select PropertiesTests + get-item PropertiesTestsButton | uncheck + select PropertiesTestsButton + get-item PropertiesTestsCheckbox | uncheck + select PropertiesTestsCheckbox + get-item PropertiesTestsGroup | uncheck + select PropertiesTestsGroup + get-item PropertiesTestsHyperlink | uncheck + select PropertiesTestsHyperlink + get-item PropertiesTestsLabel | uncheck + select PropertiesTestsLabel + get-item PropertiesTestsRadio | uncheck + select PropertiesTestsRadio + get-item PropertiesTestsReference | uncheck + select PropertiesTestsReference + get-item PropertiesTestsReferenceExt | check + select PropertiesTestsReferenceExt + get-item PropertiesTestsSelect | uncheck + select PropertiesTestsSelect + get-item PropertiesTestsText | uncheck + select PropertiesTestsText + get-item PropertiesTestsWidget | uncheck + select PropertiesTestsWidget + } + get-button OK | click +} +------=_.ecl.context-718f04b4-ed39-33e3-af62-0995e4561998-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/TextAreaWidgetConditionalStyle.test b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/TextAreaWidgetConditionalStyle.test index 55b6646e66..ea9197c1ca 100644 --- a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/TextAreaWidgetConditionalStyle.test +++ b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/TextAreaWidgetConditionalStyle.test @@ -6,8 +6,8 @@ Element-Type: testcase Element-Version: 3.0 External-Reference: Id: _MyTrcBw5EeaiCsudO7w7vA -Runtime-Version: 2.0.2.201511100828 -Save-Time: 5/19/16 3:52 PM +Runtime-Version: 2.1.0.201606221726 +Save-Time: 8/5/16 4:18 PM Testcase-Type: ecl ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa @@ -48,7 +48,6 @@ with [get-view Properties | get-section TextArea | get-editbox -index 19] { get-property text | equals Element1 | verify-true get-property foregroundColor | equals "#4D8914" | verify-true get-property "getVerticalBar().isVisible()" | equals true | verify-true - get-property "getBounds().height" | equals 85 | verify-true } ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/TextAreaWidgetDefault.test b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/TextAreaWidgetDefault.test index c84e704130..82f70cff4d 100644 --- a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/TextAreaWidgetDefault.test +++ b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/TextAreaWidgetDefault.test @@ -7,7 +7,7 @@ Element-Version: 3.0 External-Reference: Id: _rlbZYBxEEeaiCsudO7w7vA Runtime-Version: 2.1.0.201606221726 -Save-Time: 7/7/16 2:59 PM +Save-Time: 8/5/16 4:17 PM Testcase-Type: ecl ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa @@ -55,6 +55,5 @@ with [get-view Properties | get-section TextArea | get-editbox -index 1] { "re certamen cum haut longe muri distarent, quorum tutela securitas poterat in solido locari cunctorum." | verify-true get-property "getVerticalBar().isVisible()" | equals true | verify-true - get-property "getBounds().height" | equals 85 | verify-true } ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- diff --git a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/TextWidgetDefault.test b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/TextWidgetDefault.test index 57bf76f2f1..00f3e2bbaf 100644 --- a/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/TextWidgetDefault.test +++ b/plugins/org.eclipse.sirius.tests.rcptt/case/properties/widgets/text/TextWidgetDefault.test @@ -7,7 +7,7 @@ Element-Version: 3.0 External-Reference: Id: _VvraQAhdEea7hcZ9Jto1HQ Runtime-Version: 2.1.0.201606221726 -Save-Time: 7/7/16 11:03 AM +Save-Time: 8/5/16 4:17 PM Testcase-Type: ecl ------=_.description-216f885c-d591-38ce-8ea2-e4f8cb4d6ffa @@ -43,6 +43,5 @@ with [get-view Properties | get-section Text | get-editbox -index 1] { get-property enablement | equals true | verify-true get-property readOnly | equals false | verify-true get-property text | equals Element1 | verify-true - get-property "getBounds().height" | equals 17 | verify-true } ------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac-- |
