Commit f65eb4cf authored by Romain Bioteau's avatar Romain Bioteau Committed by Romain Bioteau

fix(Tests) Downgrade UID version (#171)

parent b49d81d9
......@@ -14,7 +14,7 @@
<tychoExtrasVersion>0.22.0</tychoExtrasVersion>
<os-jvm-flags></os-jvm-flags>
<bundle.version>7.4.0-SNAPSHOT</bundle.version>
<ui.designer.version>1.4.7</ui.designer.version>
<ui.designer.version>1.4.6</ui.designer.version>
<engine.version>7.4.0-SNAPSHOT</engine.version>
<filters.version>7.4.0-SNAPSHOT</filters.version>
<theme.builder.version>1.1.0</theme.builder.version>
......
......@@ -24,6 +24,7 @@ import java.io.IOException;
import org.bonitasoft.studio.common.jface.SWTBotConstants;
import org.bonitasoft.studio.properties.i18n.Messages;
import org.bonitasoft.studio.swtbot.framework.rule.SWTGefBotRule;
import org.bonitasoft.studio.test.swtbot.util.SWTBotTestUtil;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swtbot.eclipse.finder.waits.Conditions;
......@@ -32,14 +33,13 @@ import org.eclipse.swtbot.eclipse.gef.finder.SWTGefBot;
import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor;
import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
import org.junit.After;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(SWTBotJunit4ClassRunner.class)
public class TestThrowCatchMessage implements
SWTBotConstants {
public class TestThrowCatchMessage implements SWTBotConstants {
private final String catchMessageEventName = "send order";
private final String sectionTitle = "Messages";
private final String messageContentSectionTitle = "Message content";
......@@ -56,15 +56,18 @@ public class TestThrowCatchMessage implements
private final String messageContent2 = "customerInformation";
private final String messageContent3 = "orderInformation";
private SWTGefBot bot = new SWTGefBot();
private final SWTGefBot bot = new SWTGefBot();
@Rule
public SWTGefBotRule rule = new SWTGefBotRule(bot);
@Test
public void testThrowCathMessage() throws IOException {
SWTBotTestUtil.importProcessWIthPathFromClass(bot,
"DemoMessageContentCorrelation-1.0.bos", SWTBotTestUtil.IMPORTER_TITLE_BONITA,
"DemoMessageContentCorrelation", this.getClass(), false);
SWTBotEditor botEditor = bot.activeEditor();
SWTBotGefEditor gmfEditor = bot.gefEditor(botEditor.getTitle());
final SWTBotEditor botEditor = bot.activeEditor();
final SWTBotGefEditor gmfEditor = bot.gefEditor(botEditor.getTitle());
SWTBotTestUtil.selectEventOnProcess(bot, gmfEditor,
catchMessageEventName);
......@@ -194,29 +197,24 @@ public class TestThrowCatchMessage implements
assertEquals(correlationKey2, bot.table().cell(1, 0));
}
@After
public void tearDown() throws Exception {
bot.saveAllEditors();
bot.closeAllEditors();
}
@Test
public void testCathMessageNotAllowed() throws IOException {
SWTBotTestUtil.importProcessWIthPathFromClass(bot,
"TestCatchMessageSelectionTest-1.0.bos", SWTBotTestUtil.IMPORTER_TITLE_BONITA,
"TestCatchMessageSelectionTest", this.getClass(), false);
SWTBotEditor botEditor = bot.activeEditor();
SWTBotGefEditor gmfEditor = bot.gefEditor(botEditor.getTitle());
final SWTBotEditor botEditor = bot.activeEditor();
final SWTBotGefEditor gmfEditor = bot.gefEditor(botEditor.getTitle());
SWTBotTestUtil.selectEventOnProcess(bot, gmfEditor, "Message2");
bot.viewById(SWTBotTestUtil.VIEWS_PROPERTIES_PROCESS_GENERAL).show();
bot.viewById(SWTBotTestUtil.VIEWS_PROPERTIES_PROCESS_GENERAL)
.setFocus();
SWTBotCombo combo = bot
final SWTBotCombo combo = bot
.comboBoxWithLabel(Messages.selectMessageEventLabel);
for (String s : combo.items()) {
for (final String s : combo.items()) {
Assert.assertFalse(
"The message throw from the same pool should not be available in the combo.",
s.equals("theMessage"));
......
......@@ -28,6 +28,7 @@ import org.bonitasoft.studio.common.jface.SWTBotConstants;
import org.bonitasoft.studio.model.process.MainProcess;
import org.bonitasoft.studio.model.process.Pool;
import org.bonitasoft.studio.properties.i18n.Messages;
import org.bonitasoft.studio.swtbot.framework.rule.SWTGefBotRule;
import org.bonitasoft.studio.test.swtbot.util.SWTBotTestUtil;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.draw2d.PositionConstants;
......@@ -43,6 +44,7 @@ import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
import org.eclipse.swtbot.swt.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
......@@ -53,8 +55,11 @@ public class TestWebPurchase implements SWTBotConstants {
private static final String PAGEFLOW_LABEL = "Pageflow";
private String diagramTitle = null;
private SWTGefBot bot = new SWTGefBot();
private final SWTGefBot bot = new SWTGefBot();
@Rule
public SWTGefBotRule rule = new SWTGefBotRule(bot);
@Test
public void testWebPurchase() throws Exception {
SWTBotTestUtil.createNewDiagram(bot);
......@@ -98,8 +103,8 @@ public class TestWebPurchase implements SWTBotConstants {
SWTBotTestUtil.addNewData(bot, "customerName", "Text", false, null);
bot.buttonWithId(SWTBOT_ID_ADD_PROCESS_DATA).click();
SWTBotTestUtil.addNewData(bot, "customerPhone", "Text", false, null);
final Map<String, List<String>> options = new HashMap<String, List<String>>();
final ArrayList<String> choices = new ArrayList<String>();
final Map<String, List<String>> options = new HashMap<>();
final ArrayList<String> choices = new ArrayList<>();
choices.add("TV");
choices.add("Mobile Phone");
choices.add("Laptop");
......@@ -135,8 +140,8 @@ public class TestWebPurchase implements SWTBotConstants {
bot.radio(useTaskActors).click();
bot.comboBoxWithLabel(selectActorTitle).setSelection(0);
selectDataVariablesTabbedPropertyView();
final Map<String, List<String>> options = new HashMap<String, List<String>>();
final List<String> choices = new ArrayList<String>();
final Map<String, List<String>> options = new HashMap<>();
final List<String> choices = new ArrayList<>();
choices.add("Approve");
choices.add("Reject");
choices.add("More Info");
......
Markdown is supported
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