diff options
| author | Florian Barbin | 2017-11-27 14:27:36 +0000 |
|---|---|---|
| committer | Florian Barbin | 2018-02-23 10:15:28 +0000 |
| commit | aa61441096f7b8df0f774d13c9a4f4f3e062a159 (patch) | |
| tree | f8890cbd8f4b1fdfec280ff63d6981f2ad901663 | |
| parent | bc9b0d4dcd7fc04dfed1b8ced1ed624bf510be15 (diff) | |
| download | org.eclipse.sirius-aa61441096f7b8df0f774d13c9a4f4f3e062a159.tar.gz org.eclipse.sirius-aa61441096f7b8df0f774d13c9a4f4f3e062a159.tar.xz org.eclipse.sirius-aa61441096f7b8df0f774d13c9a4f4f3e062a159.zip | |
[457804] Updates TP to SWTBot 2.6
* Makes the SWTBot tests compile with the 2.6 version
* Retrieves Error Log by using viewByPartName: with some views,
the ViewByTitle does not work anymore. In the future we should
use viewByPartName.
Bug: 457804
Change-Id: I4d29f66d1318b300a693f947609bd951d3154a81
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
16 files changed, 108 insertions, 80 deletions
diff --git a/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/AbstractSiriusSwtBotGefTestCase.java b/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/AbstractSiriusSwtBotGefTestCase.java index e24a953619..76bc2ccb38 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/AbstractSiriusSwtBotGefTestCase.java +++ b/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/AbstractSiriusSwtBotGefTestCase.java @@ -512,7 +512,7 @@ public abstract class AbstractSiriusSwtBotGefTestCase extends SWTBotGefTestCase public int getNbStatusInErrorLog() { openErrorLogViewByAPI(); - SWTBotView logViewBot = bot.viewByTitle("Error Log"); + SWTBotView logViewBot = bot.viewByPartName("Error Log"); logViewBot.show(); SWTBotTree tree = logViewBot.bot().tree(); int nbStatus = tree.getAllItems().length; diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/DragNDropTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/DragNDropTest.java index e15c29d2ee..c8701c47ed 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/DragNDropTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/DragNDropTest.java @@ -172,7 +172,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); @@ -203,7 +203,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); @@ -241,7 +241,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { // editor.zoom(ZoomLevel.ZOOM_200); openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); @@ -294,7 +294,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); // DnD P2 from P1 to the diagram @@ -338,7 +338,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); SWTBotGefEditPart sourceSwtBotPart = editor.getEditPart(CONTAINER_TO_DRAG_P2, AbstractDiagramContainerEditPart.class); @@ -372,7 +372,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); @@ -427,7 +427,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { // TODO Reactivate once #521937 is fixed. // editor.zoom(ZoomLevel.ZOOM_200); openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); @@ -500,7 +500,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); @@ -536,7 +536,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); @@ -576,7 +576,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); @@ -607,7 +607,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); @@ -642,7 +642,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); @@ -694,7 +694,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); @@ -716,9 +716,8 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { } /** - * Test the drag&drop of C1(EClass) from the Model Content view to the - * diagram. This move should be allowed (as it is in a transient layer - * enabled by default) and no error message should be generated. + * Test the drag&drop of C1(EClass) from the Model Content view to the diagram. This move should be allowed (as it + * is in a transient layer enabled by default) and no error message should be generated. * * @throws Exception * In case of problem @@ -730,7 +729,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); @@ -752,9 +751,8 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { /** * @throws Exception - * Test the drag&drop of P2 from the Model Content view to P1 - * previously created. This move should not be allowed and no - * error message should be generated. + * Test the drag&drop of P2 from the Model Content view to P1 previously created. This move should not + * be allowed and no error message should be generated. */ @Test public void test_DnDPackageFromMC2ContainerBlank5() throws Exception { @@ -763,7 +761,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); @@ -793,7 +791,7 @@ public class DragNDropTest extends AbstractSiriusSwtBotGefTestCase { * Close the Error log view */ protected void closeErrorLogView() throws Exception { - SWTBotView errorView = bot.viewByTitle("Error Log"); + SWTBotView errorView = bot.viewByPartName("Error Log"); if (errorView.isActive()) { errorView.close(); } diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/InvalidMetamodelRessourceTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/InvalidMetamodelRessourceTest.java index c2b5c8b0c9..841324a462 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/InvalidMetamodelRessourceTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/InvalidMetamodelRessourceTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2014 Obeo. + * Copyright (c) 2014, 2017 Obeo. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -87,7 +87,7 @@ public class InvalidMetamodelRessourceTest extends AbstractSiriusSwtBotGefTestCa private void checkMessageErrorLog() { try { openErrorLogView(); - SWTBotView logViewBot = bot.viewByTitle("Error Log"); + SWTBotView logViewBot = bot.viewByPartName("Error Log"); assertTrue("Invalid Metamodel URI does not appear in the error log.", isMessageInErrorLog(logViewBot)); logViewBot.close(); } finally { diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/RefreshWithCustomizedStyleTests.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/RefreshWithCustomizedStyleTests.java index d0e40d0de8..505197999d 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/RefreshWithCustomizedStyleTests.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/RefreshWithCustomizedStyleTests.java @@ -279,13 +279,13 @@ public class RefreshWithCustomizedStyleTests extends AbstractRefreshWithCustomiz public void testBundledImageStyleCustomizationWithError() { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); String error1 = "The org.eclipse.sirius.diagram.bundledImageShape extension of id 'sample.design.donut2' should have the colorAttribute attribute with a value."; assertNotNull("Error \'" + error1 + "\' should be detected.", errorLogBot.tree().getTreeItem(error1)); String error2 = "The org.eclipse.sirius.diagram.bundledImageShape extension of id 'sample.design.donut2' should have the borderColorAttribute attribute with a value."; assertNotNull("Error \'" + error1 + "\' should be detected.", errorLogBot.tree().getTreeItem(error2)); } finally { - SWTBotView errorView = bot.viewByTitle("Error Log"); + SWTBotView errorView = bot.viewByPartName("Error Log"); if (errorView.isActive()) { errorView.close(); } diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/RemovedDefaultColorMenuTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/RemovedDefaultColorMenuTest.java index dea224783e..460872b37f 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/RemovedDefaultColorMenuTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/RemovedDefaultColorMenuTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2014 THALES GLOBAL SERVICES. + * Copyright (c) 2010, 2017 THALES GLOBAL SERVICES. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -244,7 +244,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromContainerMappingFontColor() { selectAndCheckEditPart(NODE_CONTAINER, DNodeContainerEditPart.class); - SWTBotToolbarDropDownButton fontColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR).click(); + SWTBotToolbarDropDownButton fontColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR); + fontColor.click(); try { fontColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -259,7 +260,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromContainerMappingLineColor() { selectAndCheckEditPart(NODE_CONTAINER, DNodeContainerEditPart.class); - SWTBotToolbarDropDownButton lineColor = editor.bot().toolbarDropDownButtonWithTooltip(LINE_COLOR).click(); + SWTBotToolbarDropDownButton lineColor = editor.bot().toolbarDropDownButtonWithTooltip(LINE_COLOR); + lineColor.click(); try { lineColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -274,7 +276,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromContainerMappingFillColor() { selectAndCheckEditPart(NODE_CONTAINER, DNodeContainerEditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FILL_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FILL_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -289,7 +292,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromContainer2MappingFillColor() { selectAndCheckEditPart(NODE_CONTAINER2, DNodeContainer2EditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FILL_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FILL_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -304,7 +308,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromContainer2MappingFontColor() { selectAndCheckEditPart(NODE_CONTAINER2, DNodeContainer2EditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -319,7 +324,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromContainer2MappingLineColor() { selectAndCheckEditPart(NODE_CONTAINER2, DNodeContainer2EditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(LINE_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(LINE_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -334,7 +340,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromNode3MappingFontColor() { selectAndCheckEditPart(NODE3, DNode3EditPart.class); - SWTBotToolbarDropDownButton fontColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR).click(); + SWTBotToolbarDropDownButton fontColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR); + fontColor.click(); try { fontColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -349,7 +356,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromNode3MappingLineColor() { selectAndCheckEditPart(NODE3, DNode3EditPart.class); - SWTBotToolbarDropDownButton lineColor = editor.bot().toolbarDropDownButtonWithTooltip(LINE_COLOR).click(); + SWTBotToolbarDropDownButton lineColor = editor.bot().toolbarDropDownButtonWithTooltip(LINE_COLOR); + lineColor.click(); try { lineColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -364,7 +372,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromNode3MappingFillColor() { selectAndCheckEditPart(NODE3, DNode3EditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FILL_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FILL_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -379,7 +388,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromNodeMappingFillColor() { selectAndCheckEditPart(NODE, DNodeEditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FILL_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FILL_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -394,7 +404,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromNodeMappingFontColor() { selectAndCheckEditPart(NODE, DNodeEditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -409,7 +420,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromNodeMappingLineColor() { selectAndCheckEditPart(NODE, DNodeEditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(LINE_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(LINE_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -424,7 +436,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromNode2MappingFontColor() { selectAndCheckEditPart(NODE2, DNode2EditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -439,7 +452,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromNode2MappingFillColor() { selectAndCheckEditPart(NODE2, DNode2EditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FILL_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FILL_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -454,7 +468,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromNode2MappingLineColor() { selectAndCheckEditPart(NODE2, DNode2EditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -469,7 +484,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromRelationBaseEdgeMappingFontColor() { selectAndCheckEditPart(REF, DEdgeEditPart.class); - SWTBotToolbarDropDownButton fontColor = editor.bot().toolbarDropDownButtonWithTooltip(LINE_COLOR).click(); + SWTBotToolbarDropDownButton fontColor = editor.bot().toolbarDropDownButtonWithTooltip(LINE_COLOR); + fontColor.click(); try { fontColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -486,7 +502,7 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase selectAndCheckEditPart(REF, DEdgeEditPart.class); editor.bot().toolbarDropDownButtonWithTooltip(LINE_COLOR).click(); try { - editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR).click().menuItem(DEFAULT_COLOR).click(); + ((SWTBotToolbarDropDownButton) editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR).click()).menuItem(DEFAULT_COLOR).click(); fail(); } catch (WidgetNotFoundException wnfe) { assertTrue(true); @@ -499,7 +515,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromBorderedNodeMappingFontColor() { selectAndCheckEditPart(NODE4, DNode4EditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FONT_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -514,7 +531,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromBorderedNodeMappingFillColor() { selectAndCheckEditPart(NODE4, DNode4EditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FILL_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(FILL_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); @@ -529,7 +547,8 @@ public class RemovedDefaultColorMenuTest extends AbstractSiriusSwtBotGefTestCase */ public void testNoDefaulColortMenuInToolBarFromBorderedNodeMappingLineColor() { selectAndCheckEditPart(NODE4, DNode4EditPart.class); - SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(LINE_COLOR).click(); + SWTBotToolbarDropDownButton fillColor = editor.bot().toolbarDropDownButtonWithTooltip(LINE_COLOR); + fillColor.click(); try { fillColor.menuItem(DEFAULT_COLOR).click(); fail(); diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/SetStyleToWorkspaceImageTests.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/SetStyleToWorkspaceImageTests.java index 2b643336eb..3f5cebb366 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/SetStyleToWorkspaceImageTests.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/SetStyleToWorkspaceImageTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2016 THALES GLOBAL SERVICES. + * Copyright (c) 2010, 2017 THALES GLOBAL SERVICES. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -544,7 +544,7 @@ public class SetStyleToWorkspaceImageTests extends AbstractSiriusSwtBotGefTestCa private void testSetWkpImageStyleCancel(String name, Class<? extends IGraphicalEditPart> type, boolean tabbar) throws Exception { openErrorLogViewByAPI(); - SWTBotView errorLogView = bot.viewByTitle("Error Log"); + SWTBotView errorLogView = bot.viewByPartName("Error Log"); errorLogView.setFocus(); int errorCount = errorLogView.bot().tree().rowCount(); @@ -761,6 +761,6 @@ public class SetStyleToWorkspaceImageTests extends AbstractSiriusSwtBotGefTestCa * any exception */ protected void closeErrorLogView() throws Exception { - bot.viewByTitle("Error Log").close(); + bot.viewByPartName("Error Log").close(); } } diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/AbstractSequenceDiagramTestCase.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/AbstractSequenceDiagramTestCase.java index e94df1b6ed..615592825e 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/AbstractSequenceDiagramTestCase.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/AbstractSequenceDiagramTestCase.java @@ -420,7 +420,7 @@ public abstract class AbstractSequenceDiagramTestCase extends AbstractSiriusSwtB */ @Deprecated protected void closeErrorLogView() throws Exception { - bot.viewByTitle("Error Log").close(); + bot.viewByPartName("Error Log").close(); } protected void closeErrorLogViewByAPI() throws Exception { diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/SequenceArrangeLinkedBorderedNodesTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/SequenceArrangeLinkedBorderedNodesTest.java index 4b07f20d87..9be5943c4c 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/SequenceArrangeLinkedBorderedNodesTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/SequenceArrangeLinkedBorderedNodesTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2014 THALES GLOBAL SERVICES. + * Copyright (c) 2010, 2017 THALES GLOBAL SERVICES. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -34,7 +34,7 @@ public class SequenceArrangeLinkedBorderedNodesTest extends AbstractDefaultModel public void test_ArrangeLinkedBorderedNodes() throws Exception { openErrorLogViewByAPI(); try { - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/SequenceExecutionMessageToSelfTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/SequenceExecutionMessageToSelfTest.java index 965ca85732..443ce2787c 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/SequenceExecutionMessageToSelfTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/sequence/SequenceExecutionMessageToSelfTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2014 THALES GLOBAL SERVICES. + * Copyright (c) 2010, 2017 THALES GLOBAL SERVICES. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -43,7 +43,7 @@ public class SequenceExecutionMessageToSelfTest extends AbstractDefaultModelSequ public void test_Delete_Message_And_Sub_Reflexive_Messages() throws Exception { try { openErrorLogViewByAPI(); - SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); + SWTBot errorLogBot = bot.viewByPartName("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); editor.setFocus(); diff --git a/releng/org.eclipse.sirius.targets/modules/swtbot-2.6.tpd b/releng/org.eclipse.sirius.targets/modules/swtbot-2.6.tpd new file mode 100644 index 0000000000..f7ec77a2db --- /dev/null +++ b/releng/org.eclipse.sirius.targets/modules/swtbot-2.6.tpd @@ -0,0 +1,11 @@ +target "swtbot-2.6" + +with source, requirements + +location SWTBot-2_6 "http://download.eclipse.org/technology/swtbot/releases/2.6.0/" { + org.eclipse.swtbot.eclipse.feature.group [2.6.0,2.7.0) + org.eclipse.swtbot.eclipse.gef.feature.group [2.6.0,2.7.0) + org.eclipse.swtbot.feature.group [2.6.0,2.7.0) + org.eclipse.swtbot.forms.feature.group [2.6.0,2.7.0) + org.eclipse.swtbot.ide.feature.group [2.6.0,2.7.0) +} diff --git a/releng/org.eclipse.sirius.targets/sirius_neon.target b/releng/org.eclipse.sirius.targets/sirius_neon.target index f4b1c5885e..76528c86ee 100644 --- a/releng/org.eclipse.sirius.targets/sirius_neon.target +++ b/releng/org.eclipse.sirius.targets/sirius_neon.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform --> -<target name="sirius_neon" sequenceNumber="1516611988"> +<target name="sirius_neon" sequenceNumber="1513329962"> <locations> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.apache.log4j" version="0.0.0"/> @@ -12,12 +12,12 @@ <repository id="Orbit" location="http://download.eclipse.org/tools/orbit/downloads/drops/R20170818183741/repository"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> - <unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.1.1.201307101628"/> - <unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="2.1.1.201307101628"/> - <unit id="org.eclipse.swtbot.feature.group" version="2.1.1.201307101628"/> - <unit id="org.eclipse.swtbot.forms.feature.group" version="2.1.1.201307101628"/> - <unit id="org.eclipse.swtbot.ide.feature.group" version="2.1.1.201307101628"/> - <repository id="SWTBot-2_1" location="http://download.eclipse.org/technology/swtbot/releases/2.1.1/"/> + <unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.6.0.201706141832"/> + <unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="2.6.0.201706141832"/> + <unit id="org.eclipse.swtbot.feature.group" version="2.6.0.201706141832"/> + <unit id="org.eclipse.swtbot.forms.feature.group" version="2.6.0.201706141832"/> + <unit id="org.eclipse.swtbot.ide.feature.group" version="2.6.0.201706141832"/> + <repository id="SWTBot-2_6" location="http://download.eclipse.org/technology/swtbot/releases/2.6.0/"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.eclipse.license.feature.group" version="0.0.0"/> diff --git a/releng/org.eclipse.sirius.targets/sirius_neon.targetplatform b/releng/org.eclipse.sirius.targets/sirius_neon.targetplatform index d0132f6640..a8c76c65e8 100644 --- a/releng/org.eclipse.sirius.targets/sirius_neon.targetplatform +++ b/releng/org.eclipse.sirius.targets/sirius_neon.targetplatform @@ -1,7 +1,7 @@ target "sirius_neon" include "modules/orbit.tpd" -include "modules/swtbot-2.1.tpd" +include "modules/swtbot-2.6.tpd" include "modules/shared-license.tpd" include "modules/aql-nightly.tpd" include "modules/acceleo-nightly.tpd" diff --git a/releng/org.eclipse.sirius.targets/sirius_oxygen.target b/releng/org.eclipse.sirius.targets/sirius_oxygen.target index 69cc6697e2..dda673b7a7 100644 --- a/releng/org.eclipse.sirius.targets/sirius_oxygen.target +++ b/releng/org.eclipse.sirius.targets/sirius_oxygen.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform --> -<target name="sirius_oxygen" sequenceNumber="1516612013"> +<target name="sirius_oxygen" sequenceNumber="1513329860"> <locations> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.apache.log4j" version="0.0.0"/> @@ -12,12 +12,12 @@ <repository id="Orbit" location="http://download.eclipse.org/tools/orbit/downloads/drops/R20170818183741/repository"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> - <unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.1.1.201307101628"/> - <unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="2.1.1.201307101628"/> - <unit id="org.eclipse.swtbot.feature.group" version="2.1.1.201307101628"/> - <unit id="org.eclipse.swtbot.forms.feature.group" version="2.1.1.201307101628"/> - <unit id="org.eclipse.swtbot.ide.feature.group" version="2.1.1.201307101628"/> - <repository id="SWTBot-2_1" location="http://download.eclipse.org/technology/swtbot/releases/2.1.1/"/> + <unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.6.0.201706141832"/> + <unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="2.6.0.201706141832"/> + <unit id="org.eclipse.swtbot.feature.group" version="2.6.0.201706141832"/> + <unit id="org.eclipse.swtbot.forms.feature.group" version="2.6.0.201706141832"/> + <unit id="org.eclipse.swtbot.ide.feature.group" version="2.6.0.201706141832"/> + <repository id="SWTBot-2_6" location="http://download.eclipse.org/technology/swtbot/releases/2.6.0/"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.eclipse.license.feature.group" version="0.0.0"/> diff --git a/releng/org.eclipse.sirius.targets/sirius_oxygen.targetplatform b/releng/org.eclipse.sirius.targets/sirius_oxygen.targetplatform index 1177bb0278..fdefe9d348 100644 --- a/releng/org.eclipse.sirius.targets/sirius_oxygen.targetplatform +++ b/releng/org.eclipse.sirius.targets/sirius_oxygen.targetplatform @@ -1,7 +1,7 @@ target "sirius_oxygen" include "modules/orbit.tpd" -include "modules/swtbot-2.1.tpd" +include "modules/swtbot-2.6.tpd" include "modules/shared-license.tpd" include "modules/aql-nightly.tpd" include "modules/acceleo-nightly.tpd" diff --git a/releng/org.eclipse.sirius.targets/sirius_photon.target b/releng/org.eclipse.sirius.targets/sirius_photon.target index 3d6d6d72b0..937a2dc064 100644 --- a/releng/org.eclipse.sirius.targets/sirius_photon.target +++ b/releng/org.eclipse.sirius.targets/sirius_photon.target @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/mbarbero/fr.obeo.releng.targetplatform --> -<target name="sirius_photon" sequenceNumber="1517571601"> +<target name="sirius_photon" sequenceNumber="1514364121"> <locations> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.apache.log4j" version="0.0.0"/> @@ -12,12 +12,12 @@ <repository id="Orbit" location="http://download.eclipse.org/tools/orbit/downloads/drops/R20170818183741/repository"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> - <unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.1.1.201307101628"/> - <unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="2.1.1.201307101628"/> - <unit id="org.eclipse.swtbot.feature.group" version="2.1.1.201307101628"/> - <unit id="org.eclipse.swtbot.forms.feature.group" version="2.1.1.201307101628"/> - <unit id="org.eclipse.swtbot.ide.feature.group" version="2.1.1.201307101628"/> - <repository id="SWTBot-2_1" location="http://download.eclipse.org/technology/swtbot/releases/2.1.1/"/> + <unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.6.0.201706141832"/> + <unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="2.6.0.201706141832"/> + <unit id="org.eclipse.swtbot.feature.group" version="2.6.0.201706141832"/> + <unit id="org.eclipse.swtbot.forms.feature.group" version="2.6.0.201706141832"/> + <unit id="org.eclipse.swtbot.ide.feature.group" version="2.6.0.201706141832"/> + <repository id="SWTBot-2_6" location="http://download.eclipse.org/technology/swtbot/releases/2.6.0/"/> </location> <location includeMode="planner" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="false" type="InstallableUnit"> <unit id="org.eclipse.license.feature.group" version="0.0.0"/> diff --git a/releng/org.eclipse.sirius.targets/sirius_photon.targetplatform b/releng/org.eclipse.sirius.targets/sirius_photon.targetplatform index 7a99d5d335..57572b0860 100644 --- a/releng/org.eclipse.sirius.targets/sirius_photon.targetplatform +++ b/releng/org.eclipse.sirius.targets/sirius_photon.targetplatform @@ -1,7 +1,7 @@ target "sirius_photon" include "modules/orbit.tpd" -include "modules/swtbot-2.1.tpd" +include "modules/swtbot-2.6.tpd" include "modules/shared-license.tpd" include "modules/aql-nightly.tpd" include "modules/acceleo-nightly.tpd" |
