Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Tasse2018-12-18 17:39:40 -0500
committerBernd Hufmann2019-03-15 15:15:30 -0400
commita7a672b82dc571954403f4bf93f36784ab593197 (patch)
tree0a2d7f4ec8e1781fd989bda93d16b5c7f61a05e4
parent7c534ed340d2cb0d80905b66273ffd87cc1fce02 (diff)
downloadorg.eclipse.tracecompass-stable-3.3.tar.gz
org.eclipse.tracecompass-stable-3.3.tar.xz
org.eclipse.tracecompass-stable-3.3.zip
swtbot: Fix TestTraceOffsettingstable-3.3
Do not call pressShortcut() on the tree item. This gives focus to the tree, which takes away focus from the cell editor. Instead find the cell editor text and call pressShortcut() on it. Change-Id: Ia063cdc56f40611dac00a78a81c808773cfc375d Signed-off-by: Patrick Tasse <patrick.tasse@gmail.com> Reviewed-on: https://git.eclipse.org/r/134215 Tested-by: CI Bot Reviewed-by: Simon Delisle <simon.delisle@ericsson.com> Tested-by: Simon Delisle <simon.delisle@ericsson.com> Reviewed-on: https://git.eclipse.org/r/137755 Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com> Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
-rw-r--r--tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ui/swtbot/tests/viewers/events/TestTraceOffsetting.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ui/swtbot/tests/viewers/events/TestTraceOffsetting.java b/tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ui/swtbot/tests/viewers/events/TestTraceOffsetting.java
index 9e13718ef2..d200729414 100644
--- a/tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ui/swtbot/tests/viewers/events/TestTraceOffsetting.java
+++ b/tmf/org.eclipse.tracecompass.tmf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ui/swtbot/tests/viewers/events/TestTraceOffsetting.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2015 Ericsson
+ * Copyright (c) 2015, 2018 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
@@ -34,6 +34,7 @@ import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
import org.eclipse.swtbot.swt.finder.utils.SWTUtils;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.eclipse.tracecompass.internal.tmf.core.Activator;
import org.eclipse.tracecompass.tmf.core.io.BufferedRandomAccessFile;
@@ -152,9 +153,11 @@ public class TestTraceOffsetting {
final SWTBotTreeItem swtBotTreeItem = allItems[0];
swtBotTreeItem.select();
swtBotTreeItem.click(1);
- swtBotTreeItem.pressShortcut(KeyStroke.getInstance('9'));
- swtBotTreeItem.pressShortcut(KeyStroke.getInstance('9'));
- swtBotTreeItem.pressShortcut(KeyStroke.getInstance('\n'));
+ // Press shortcuts on the cell editor
+ SWTBotText text = shell.bot().text(1);
+ text.pressShortcut(KeyStroke.getInstance('9'));
+ text.pressShortcut(KeyStroke.getInstance('9'));
+ text.pressShortcut(KeyStroke.getInstance('\n'));
WaitUtils.waitForJobs();
fBot.button("OK").click();

Back to the top