Commit 466e8fb4 authored by Aurelien Pupier's avatar Aurelien Pupier
Browse files

BS-14178: improve robustness of SWTBot framework to avoid issue when

integrated in test suite on CI
parent 7f1aee1c
......@@ -17,6 +17,7 @@ import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.waits.DefaultCondition;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTable;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
......@@ -46,6 +47,18 @@ public class BotAddConnectorDialog extends BotWizardDialog {
*/
public void selectConnector(final String pConnectorId) {
bot.tree().select("All");
bot.waitUntil(new DefaultCondition() {
@Override
public boolean test() throws Exception {
return "All".equals(bot.tree().selection().get(0).get(0));
}
@Override
public String getFailureMessage() {
return "Root element of the tree not selected.";
}
});
bot.table().select(pConnectorId);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment