Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael Istria2016-11-16 10:56:40 +0000
committerMickael Istria2016-11-16 11:25:38 +0000
commitb7f3ffa65ea1e763726db5578d97d0ac7df76130 (patch)
treea0a2fb078091eac940327d6cf09347497764dfdc
parent851c273949c0849aca835aa110b76a3e8c5f571d (diff)
downloadeclipse.platform.ui-b7f3ffa65ea1e763726db5578d97d0ac7df76130.tar.gz
eclipse.platform.ui-b7f3ffa65ea1e763726db5578d97d0ac7df76130.tar.xz
eclipse.platform.ui-b7f3ffa65ea1e763726db5578d97d0ac7df76130.zip
Bug 505678 - Fix test assertion; Bug 448838 - enable SurefireY20161117-1000I20161116-2000
The test needed an update to match current expected behaviour Change-Id: Id7da83b18697cd7a880ccf80fafec30b7e62dce3 Signed-off-by: Mickael Istria <mistria@redhat.com>
-rw-r--r--tests/org.eclipse.e4.ui.tests/pom.xml4
-rw-r--r--tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java32
2 files changed, 25 insertions, 11 deletions
diff --git a/tests/org.eclipse.e4.ui.tests/pom.xml b/tests/org.eclipse.e4.ui.tests/pom.xml
index d20e5a6f104..bc79d435082 100644
--- a/tests/org.eclipse.e4.ui.tests/pom.xml
+++ b/tests/org.eclipse.e4.ui.tests/pom.xml
@@ -22,10 +22,6 @@
<version>0.11.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
- <properties>
- <!-- TODO Change to false to run tests during Tycho build -->
- <skipTests>true</skipTests>
- </properties>
<build>
<plugins>
<plugin>
diff --git a/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java b/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
index 5e051f00893..bb58ff69e74 100644
--- a/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
+++ b/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/workbench/PartRenderingEngineTests.java
@@ -14,6 +14,7 @@ package org.eclipse.e4.ui.tests.workbench;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
@@ -46,6 +47,7 @@ import org.eclipse.e4.ui.workbench.modeling.EModelService;
import org.eclipse.e4.ui.workbench.modeling.EPartService;
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
import org.eclipse.jface.databinding.swt.DisplayRealm;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.widgets.Control;
@@ -737,17 +739,33 @@ public class PartRenderingEngineTests {
// the selected element doesn't change its value
container.setSelectedElement(partA);
partB.setToBeRendered(false);
- assertTrue(
+ assertEquals(
"Changing the TBR of a non-selected element should not change the value of the container's seletedElement",
- container.getSelectedElement() == partA);
+ partA, container.getSelectedElement());
+
- // Ensure that changing the TBR state of the selected element results in
- // it going null
+ // Ensure that changing the TBR state of the selected element to false
+ // results in selecting moving to a TBR=true element
container.setSelectedElement(partA);
partA.setToBeRendered(false);
- assertTrue(
- "Changing the TBR of the selected element should have set the field to null",
- container.getSelectedElement() == null);
+ assertNotEquals("Changing the TBR of the selected element should have moved selection to a TBR item", partA,
+ container.getSelectedElement());
+
+ if ("gtk".equals(SWT.getPlatform())) {
+ assertTrue(
+ "Changing the TBR of the selected element should have moved selection to a TBR item",
+ container.getSelectedElement().isToBeRendered());
+
+ // Ensure that when all elements are TBR=false, selection is null
+ partC.setToBeRendered(false);
+ // Then there should be TBR item
+ assertNull("Changing the TBR of all elements to false should have set the field to null",
+ container.getSelectedElement());
+ } else {
+ assertTrue(
+ "Changing the TBR of the selected element should have set the field to null",
+ container.getSelectedElement() == null);
+ }
}
@Test

Back to the top