Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSusan Franklin2009-03-26 22:01:26 +0000
committerSusan Franklin2009-03-26 22:01:26 +0000
commit9ffd1314026bea08df0cb8b0417e4901ff07c920 (patch)
tree448e6ded8b74aa72d0fcd2864d6e9489eac8928d
parentadb02dd8bf0bd3f235f40b0fb9e83dcdc96bf3ee (diff)
downloadrt.equinox.p2-9ffd1314026bea08df0cb8b0417e4901ff07c920.tar.gz
rt.equinox.p2-9ffd1314026bea08df0cb8b0417e4901ff07c920.tar.xz
rt.equinox.p2-9ffd1314026bea08df0cb8b0417e4901ff07c920.zip
Bug 258722 - [ui] Can't install from admin ui
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/InstallActionTest.java7
-rw-r--r--bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ProfileModificationActionTest.java7
2 files changed, 14 insertions, 0 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/InstallActionTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/InstallActionTest.java
index ead2ace96..7d3389290 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/InstallActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/InstallActionTest.java
@@ -70,6 +70,13 @@ public class InstallActionTest extends ProfileModificationActionTest {
assertEquals(1, action.getSelectedIUs().length);
}
+ public void testParentIsNestedCategory() {
+ TestInstallAction action = new TestInstallAction(getNestedCategoriesAndChildIUElements());
+ assertTrue("Should be enabled", action.isEnabled());
+ // Only the non-category should be considered a selection
+ assertEquals(1, action.getSelectedIUs().length);
+ }
+
protected IIUElement element(IInstallableUnit iu) {
return new AvailableIUElement(null, iu, profile.getProfileId(), true);
}
diff --git a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ProfileModificationActionTest.java b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ProfileModificationActionTest.java
index 79b048648..d5763d531 100644
--- a/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ProfileModificationActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests.ui/src/org/eclipse/equinox/p2/tests/ui/actions/ProfileModificationActionTest.java
@@ -28,6 +28,13 @@ public abstract class ProfileModificationActionTest extends ActionTest {
return new Object[] {element, child};
}
+ protected Object[] getNestedCategoriesAndChildIUElements() {
+ CategoryElement element = new CategoryElement(null, category);
+ CategoryElement nested = new CategoryElement(element, category);
+ AvailableIUElement child = new AvailableIUElement(nested, uninstalled, TESTPROFILE, true);
+ return new Object[] {element, nested, child};
+ }
+
protected IInstallableUnit[] getTopLevelIUs() {
return new IInstallableUnit[] {top1, top2};
}

Back to the top