control: fix tree item selection in SWTBot tests
authorBernd Hufmann <Bernd.Hufmann@ericsson.com>
Mon, 13 Jun 2016 19:29:46 +0000 (15:29 -0400)
committerBernd Hufmann <bernd.hufmann@ericsson.com>
Thu, 16 Jun 2016 19:28:22 +0000 (15:28 -0400)
Before the all tree node was not selected. The test still was
successful due to default behaviour

Change-Id: I6356def3db40cdd3414185d6df6d3d2c16415a6c
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/75181
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
lttng/org.eclipse.tracecompass.lttng2.control.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/control/ui/swtbot/tests/ControlViewKernelFilterTest.java
lttng/org.eclipse.tracecompass.lttng2.control.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/control/ui/swtbot/tests/ControlViewTest.java

index 88499658096f2c4ba32229c7d290511b23057b12..b78b17b92072f15913e1ca8771bfdacbac2e3ae5 100644 (file)
@@ -111,7 +111,9 @@ public class ControlViewKernelFilterTest extends ControlViewTest {
         shell.bot().radioInGroup(ControlViewSwtBotUtil.GROUP_SELECT_NAME, ControlViewSwtBotUtil.TRACEPOINTS_GROUP_NAME).click();
 
         SWTBotTree tracepointsTree = shell.bot().tree();
-        tracepointsTree.select(ControlViewSwtBotUtil.ALL_TREE_NODE);
+        SWTBotTreeItem allItem = SWTBotUtils.getTreeItem(fBot, tracepointsTree, ControlViewSwtBotUtil.ALL_TREE_NODE);
+        allItem.check();
+
         SWTBotText filterText = shell.bot().textInGroup(ControlViewSwtBotUtil.FILTER_EXPRESSION_LABEL);
         filterText.setText(FILTER_EXPRESSION);
         shell.bot().button(ControlViewSwtBotUtil.DIALOG_OK_BUTTON).click();
index b9a77f3de194a49fc14f00f74de3c8485add4a30..66bd80bcbee5e801ecf7061eabe7c5c67a4bffba 100644 (file)
@@ -296,7 +296,8 @@ public class ControlViewTest {
         shell.bot().radioInGroup(ControlViewSwtBotUtil.GROUP_SELECT_NAME, ControlViewSwtBotUtil.TRACEPOINTS_GROUP_NAME).click();
 
         SWTBotTree tracepointsTree = shell.bot().tree();
-        tracepointsTree.select(ControlViewSwtBotUtil.ALL_TREE_NODE);
+        SWTBotTreeItem allItem = SWTBotUtils.getTreeItem(fBot, tracepointsTree, ControlViewSwtBotUtil.ALL_TREE_NODE);
+        allItem.check();
         shell.bot().button(ControlViewSwtBotUtil.DIALOG_OK_BUTTON).click();
         SWTBotUtils.waitForJobs();
 
This page took 0.025847 seconds and 5 git commands to generate.