diff options
| author | Florian Barbin | 2017-12-19 15:40:18 +0000 |
|---|---|---|
| committer | Florian Barbin | 2018-02-23 10:19:38 +0000 |
| commit | 88150637ace43fa5e9584466acd2d993d230e919 (patch) | |
| tree | 9fd89602fa25fefd1e19c1987f9c63bae4821487 | |
| parent | 63b690bfae765153ad3ce1543bcf794566de60b3 (diff) | |
| download | org.eclipse.sirius-88150637ace43fa5e9584466acd2d993d230e919.tar.gz org.eclipse.sirius-88150637ace43fa5e9584466acd2d993d230e919.tar.xz org.eclipse.sirius-88150637ace43fa5e9584466acd2d993d230e919.zip | |
[525804] Fixes combobox issues in swtbot tests in Photon
* In properties view, some feature widgets have been replaced by a
checkbox instead of a combobox
* We need to press enter to leave the combo
* Also fixes ProjectsConcurrentCloseTest
Bug: 525804
Change-Id: I2e9b129d7bcdb4a26d9a729776ba1f5568595b99
Signed-off-by: Florian Barbin <florian.barbin@obeo.fr>
8 files changed, 103 insertions, 23 deletions
diff --git a/plugins/org.eclipse.sirius.tests.junit.support/src/org/eclipse/sirius/tests/support/api/TestsUtil.java b/plugins/org.eclipse.sirius.tests.junit.support/src/org/eclipse/sirius/tests/support/api/TestsUtil.java index 36c5c71a76..df6ad88474 100644 --- a/plugins/org.eclipse.sirius.tests.junit.support/src/org/eclipse/sirius/tests/support/api/TestsUtil.java +++ b/plugins/org.eclipse.sirius.tests.junit.support/src/org/eclipse/sirius/tests/support/api/TestsUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2017 THALES GLOBAL SERVICES + * Copyright (c) 2010, 2018 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 @@ -49,6 +49,8 @@ public final class TestsUtil { private static final String UI_WORKBENCH_OXYGEN_START = "3.110"; + private static final String UI_WORKBENCH_PHOTON_START = "3.111"; + private static final String CREATE_REPRESENTATATION_IN_SEPARATE_RESOURCE = "createLocalRepresentationInSeparateResource"; /** @@ -244,6 +246,15 @@ public final class TestsUtil { } /** + * Tells if the current platform corresponds to Photon or later. + * + * @return true if the current platform corresponds to Photon or later, false otherwise. + */ + public static boolean isPhotonPlatformOrLater() { + return checkUiWorkbenchVersion(Version.parseVersion(UI_WORKBENCH_PHOTON_START), null); + } + + /** * Copied and adapted from org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(ICondition, long, long) * * Waits until the condition has been meet, or the timeout is reached. The interval is the delay between evaluating diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/AbstractRefreshWithCustomizedStyleOnCompleteExampleTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/AbstractRefreshWithCustomizedStyleOnCompleteExampleTest.java index a3f6bb70ee..19113ec777 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/AbstractRefreshWithCustomizedStyleOnCompleteExampleTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/AbstractRefreshWithCustomizedStyleOnCompleteExampleTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2017 THALES GLOBAL SERVICES and other. + * Copyright (c) 2010, 2018 THALES GLOBAL SERVICES and other. * 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 @@ -116,6 +116,7 @@ import org.eclipse.sirius.diagram.ui.tools.internal.routers.DForestRouter; import org.eclipse.sirius.diagram.ui.tools.internal.routers.DTreeRouter; import org.eclipse.sirius.tests.support.api.ImageEquality; import org.eclipse.sirius.tests.support.api.SiriusAssert; +import org.eclipse.sirius.tests.support.api.TestsUtil; import org.eclipse.sirius.tests.swtbot.support.api.business.UIResource; import org.eclipse.sirius.tests.swtbot.support.api.editor.SWTBotSiriusDiagramEditor; import org.eclipse.sirius.tests.swtbot.support.api.editor.SWTBotSiriusHelper; @@ -139,10 +140,12 @@ import org.eclipse.swtbot.eclipse.gef.finder.matchers.IsInstanceOf; import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefConnectionEditPart; import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart; import org.eclipse.swtbot.swt.finder.SWTBot; +import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes; import org.eclipse.swtbot.swt.finder.waits.ICondition; import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot; import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton; import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo; +import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem; @@ -332,13 +335,28 @@ public class AbstractRefreshWithCustomizedStyleOnCompleteExampleTest extends Abs Enumerator newValueLiteral = getNewValueLiteral(value, choiceOfValues); String text = propertyDescriptor.getLabelProvider(style).getText(newValueLiteral); ccomboBox.setSelection(text); + // In photon we need to press ENTER to leave the combo + if (TestsUtil.isPhotonPlatformOrLater()) { + ccomboBox.pressShortcut(Keystrokes.CR); + } } else if (feature.getEType() == EcorePackage.Literals.EBOOLEAN) { - SWTBotCCombo ccomboBox = propertiesBot.bot().ccomboBox(); - String newSelection = Boolean.TRUE.toString(); - if (value == Boolean.TRUE) { - newSelection = Boolean.FALSE.toString(); + + // In photon, the feature widget is not a combo anymore. + if (TestsUtil.isPhotonPlatformOrLater()) { + SWTBotCheckBox botCheckBox = propertiesBot.bot().checkBox(); + if (value == Boolean.TRUE) { + botCheckBox.deselect(); + } else { + botCheckBox.select(); + } + } else { + SWTBotCCombo ccomboBox = propertiesBot.bot().ccomboBox(); + String newSelection = Boolean.TRUE.toString(); + if (value == Boolean.TRUE) { + newSelection = Boolean.FALSE.toString(); + } + ccomboBox.setSelection(newSelection); } - ccomboBox.setSelection(newSelection); } else if (feature == ViewpointPackage.Literals.BASIC_LABEL_STYLE__ICON_PATH) { propertiesBot.bot().text().setText("/" + getProjectName() + "/" + NEW_IMAGE_NAME); } else if (feature == ViewpointPackage.Literals.BASIC_LABEL_STYLE__LABEL_COLOR || feature == DiagramPackage.Literals.BORDERED_STYLE__BORDER_COLOR diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/BackgroundStyleUpdateTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/BackgroundStyleUpdateTest.java index a5239931b6..8ee28f8ed1 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/BackgroundStyleUpdateTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/BackgroundStyleUpdateTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2018 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 @@ -18,6 +18,7 @@ import org.eclipse.sirius.diagram.FlatContainerStyle; import org.eclipse.sirius.diagram.ui.edit.api.part.IDiagramElementEditPart; import org.eclipse.sirius.diagram.ui.edit.internal.part.DiagramElementEditPartOperation; import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeContainerEditPart; +import org.eclipse.sirius.tests.support.api.TestsUtil; import org.eclipse.sirius.tests.swtbot.support.api.AbstractSiriusSwtBotGefTestCase; import org.eclipse.sirius.tests.swtbot.support.api.business.UIResource; import org.eclipse.sirius.tests.swtbot.support.api.condition.CheckSelectedCondition; @@ -26,6 +27,7 @@ import org.eclipse.sirius.tests.swtbot.support.api.editor.SWTBotSiriusHelper; import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView; import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart; import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo; +import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem; /** @@ -105,11 +107,21 @@ public class BackgroundStyleUpdateTest extends AbstractSiriusSwtBotGefTestCase { SWTBotSiriusHelper.selectPropertyTabItem("Semantic"); SWTBotTreeItem style = propertiesBot.bot().tree(0).getAllItems()[0].getNode("Liquid"); style.click(); - SWTBotCCombo lineStyle = bot.viewByTitle(PROPERTIES).bot().ccomboBox(); - if (liquid) { - lineStyle.setSelection(1); + // In photon, the feature widget is not a combo anymore. + if (TestsUtil.isPhotonPlatformOrLater()) { + SWTBotCheckBox lineStyle = bot.viewByTitle(PROPERTIES).bot().checkBox(); + if (liquid) { + lineStyle.select(); + } else { + lineStyle.deselect(); + } } else { - lineStyle.setSelection(0); + SWTBotCCombo lineStyle = bot.viewByTitle(PROPERTIES).bot().ccomboBox(); + if (liquid) { + lineStyle.setSelection(1); + } else { + lineStyle.setSelection(0); + } } editor.setFocus(); } diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/CenteredEdgesTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/CenteredEdgesTest.java index c148497890..9cf186306d 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/CenteredEdgesTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/CenteredEdgesTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2017 THALES GLOBAL SERVICES and others. + * Copyright (c) 2008, 2018 THALES GLOBAL SERVICES and others. * 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 @@ -48,6 +48,7 @@ import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeEditPart; import org.eclipse.sirius.diagram.ui.internal.refresh.GMFHelper; import org.eclipse.sirius.ext.base.Option; import org.eclipse.sirius.ext.gmf.runtime.editparts.GraphicalHelper; +import org.eclipse.sirius.tests.support.api.TestsUtil; import org.eclipse.sirius.tests.swtbot.support.api.AbstractSiriusSwtBotGefTestCase; import org.eclipse.sirius.tests.swtbot.support.api.business.UIDiagramRepresentation.ZoomLevel; import org.eclipse.sirius.tests.swtbot.support.api.business.UIResource; @@ -58,6 +59,7 @@ import org.eclipse.sirius.tests.swtbot.support.utils.SWTBotUtils; import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView; import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefConnectionEditPart; import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart; +import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes; import org.eclipse.swtbot.swt.finder.waits.DefaultCondition; import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree; @@ -1264,6 +1266,10 @@ public class CenteredEdgesTest extends AbstractSiriusSwtBotGefTestCase { SWTBotCCombo comboBox = propertiesBot.bot().ccomboBox(); String routingStyleLitteral = routingStyle.getLiteral().substring(0, 1).toUpperCase().concat(routingStyle.getLiteral().substring(1, routingStyle.getLiteral().length())); comboBox.setSelection(routingStyleLitteral); + // In Photon we need to press enter to leave the combo. + if (TestsUtil.isPhotonPlatformOrLater()) { + comboBox.pressShortcut(Keystrokes.CR); + } // applied change with change focus SWTBotSiriusHelper.selectPropertyTabItem(APPEARANCE); diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/LineStyleTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/LineStyleTest.java index 2b5e4f0674..f860ff278c 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/LineStyleTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/LineStyleTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015 Obeo. + * Copyright (c) 2015, 2018 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 @@ -32,6 +32,7 @@ import org.eclipse.sirius.diagram.ui.edit.api.part.IDiagramElementEditPart; import org.eclipse.sirius.diagram.ui.edit.api.part.IDiagramNodeEditPart; import org.eclipse.sirius.diagram.ui.edit.api.part.IStyleEditPart; import org.eclipse.sirius.diagram.ui.edit.internal.part.DiagramElementEditPartOperation; +import org.eclipse.sirius.tests.support.api.TestsUtil; import org.eclipse.sirius.tests.swtbot.support.api.AbstractSiriusSwtBotGefTestCase; import org.eclipse.sirius.tests.swtbot.support.api.business.UIResource; import org.eclipse.sirius.tests.swtbot.support.api.condition.CheckSelectedCondition; @@ -43,6 +44,7 @@ import org.eclipse.sirius.viewpoint.Customizable; import org.eclipse.sirius.viewpoint.Style; import org.eclipse.swt.SWT; import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart; +import org.eclipse.swtbot.swt.finder.keyboard.Keystrokes; import org.eclipse.swtbot.swt.finder.waits.ICondition; import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree; @@ -258,6 +260,10 @@ public class LineStyleTest extends AbstractSiriusSwtBotGefTestCase { SWTBotCCombo lineStyleCombo = bot.viewByTitle(PROPERTIES).bot().ccomboBox(); lineStyleCombo.setFocus(); lineStyleCombo.setSelection(lineStyle.getName()); + // In photon we need to press ENTER to leave the combo + if (TestsUtil.isPhotonPlatformOrLater()) { + lineStyleCombo.pressShortcut(Keystrokes.CR); + } // apply change with change focus SWTBotSiriusHelper.selectPropertyTabItem(APPEARANCE); bot.waitUntil(done); diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/SVGImageBundleTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/SVGImageBundleTest.java index 817778f5b8..b88baaacc9 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/SVGImageBundleTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/SVGImageBundleTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2016 THALES GLOBAL SERVICES. + * Copyright (c) 2010, 2018 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 @@ -23,6 +23,7 @@ import org.eclipse.sirius.diagram.ui.internal.edit.parts.BundledImageEditPart; import org.eclipse.sirius.diagram.ui.internal.edit.parts.EllipseEditPart; import org.eclipse.sirius.diagram.ui.tools.api.figure.BundledImageFigure; import org.eclipse.sirius.diagram.ui.tools.api.figure.ODesignEllipseFigure; +import org.eclipse.sirius.tests.support.api.TestsUtil; import org.eclipse.sirius.tests.swtbot.support.api.AbstractSiriusSwtBotGefTestCase; import org.eclipse.sirius.tests.swtbot.support.api.business.UIDiagramRepresentation; import org.eclipse.sirius.tests.swtbot.support.api.business.UIResource; @@ -35,6 +36,7 @@ import org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditPart; import org.eclipse.swtbot.swt.finder.SWTBot; import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException; import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo; +import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree; @@ -237,8 +239,13 @@ public class SVGImageBundleTest extends AbstractSiriusSwtBotGefTestCase { SWTBotSiriusHelper.selectPropertyTabItem(SEMANTIC); SWTBotTree tree = propertiesBot.bot().tree(); tree.expandNode("Class1 -> Class2").select().getNode("Abstract").doubleClick(); - SWTBotCCombo comboBox = propertiesBot.bot().ccomboBox(0); - comboBox.setSelection(1); + if (TestsUtil.isPhotonPlatformOrLater()) { + SWTBotCheckBox checkBox = propertiesBot.bot().checkBox(0); + checkBox.select(); + } else { + SWTBotCCombo comboBox = propertiesBot.bot().ccomboBox(0); + comboBox.setSelection(1); + } } /** diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/modelexplorer/ProjectsConcurrentCloseTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/modelexplorer/ProjectsConcurrentCloseTest.java index 207304e32f..83c56e65bd 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/modelexplorer/ProjectsConcurrentCloseTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/modelexplorer/ProjectsConcurrentCloseTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2014 THALES GLOBAL SERVICES. + * Copyright (c) 2010, 2018 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 @@ -21,6 +21,7 @@ import org.eclipse.sirius.business.api.session.SessionManager; import org.eclipse.sirius.diagram.DDiagram; import org.eclipse.sirius.diagram.business.internal.componentization.mappings.table.CandidateMappingManager; import org.eclipse.sirius.tests.support.api.EclipseTestsSupportHelper; +import org.eclipse.sirius.tests.support.api.TestsUtil; import org.eclipse.sirius.tests.swtbot.Activator; import org.eclipse.sirius.tests.swtbot.support.api.AbstractSiriusSwtBotGefTestCase; import org.eclipse.sirius.tests.swtbot.support.api.business.UILocalSession; @@ -164,8 +165,13 @@ public class ProjectsConcurrentCloseTest extends AbstractSiriusSwtBotGefTestCase return "Two projects should be selected."; } }); + String closeProjects = "Close Project"; + if (TestsUtil.isPhotonPlatformOrLater()) { + + closeProjects = "Close Projects"; + } + SWTBotUtils.clickContextMenu(modelExplorerViewBot.tree(), closeProjects); - SWTBotUtils.clickContextMenu(modelExplorerViewBot.tree(), "Close Project"); SWTBotUtils.waitAllUiEvents(); bot.waitUntil(new OpenedSessionCondition(0)); diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/table/SetPropertyOfTableTreeByPropertiesViewTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/table/SetPropertyOfTableTreeByPropertiesViewTest.java index 4dbdb0726c..4bd3588dd7 100644 --- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/table/SetPropertyOfTableTreeByPropertiesViewTest.java +++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/table/SetPropertyOfTableTreeByPropertiesViewTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2014 THALES GLOBAL SERVICES. + * Copyright (c) 2010, 2018 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 @@ -11,6 +11,7 @@ package org.eclipse.sirius.tests.swtbot.table; import org.eclipse.sirius.ext.base.Option; +import org.eclipse.sirius.tests.support.api.TestsUtil; import org.eclipse.sirius.tests.swtbot.Activator; import org.eclipse.sirius.tests.swtbot.support.api.AbstractSiriusSwtBotGefTestCase; import org.eclipse.sirius.tests.swtbot.support.api.business.UIResource; @@ -20,6 +21,7 @@ import org.eclipse.sirius.tests.swtbot.support.api.editor.SWTBotSiriusHelper; import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView; import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException; import org.eclipse.swtbot.swt.finder.widgets.SWTBotCCombo; +import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox; import org.eclipse.swtbot.swt.finder.widgets.SWTBotText; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree; import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem; @@ -368,8 +370,13 @@ public class SetPropertyOfTableTreeByPropertiesViewTest extends AbstractSiriusSw SWTBotSiriusHelper.selectPropertyTabItem(SEMANTIC); SWTBotTree tree = propertiesBot.bot().tree(); tree.expandNode(content).select().getNode("Abstract").doubleClick(); - SWTBotCCombo comboBox = propertiesBot.bot().ccomboBox(0); - comboBox.setSelection(1); + if (TestsUtil.isPhotonPlatformOrLater()) { + SWTBotCheckBox checkBox = propertiesBot.bot().checkBox(0); + checkBox.select(); + } else { + SWTBotCCombo comboBox = propertiesBot.bot().ccomboBox(0); + comboBox.setSelection(1); + } } /** @@ -431,7 +438,14 @@ public class SetPropertyOfTableTreeByPropertiesViewTest extends AbstractSiriusSw SWTBotSiriusHelper.selectPropertyTabItem(SEMANTIC); SWTBotTree tree = propertiesBot.bot().tree(); tree.expandNode(element).select().getNode("Abstract").doubleClick(); - assertEquals("The value of abstract field must be true", isAbstract, Boolean.parseBoolean(propertiesBot.bot().ccomboBox().getText())); + boolean value; + if (TestsUtil.isPhotonPlatformOrLater()) { + value = propertiesBot.bot().checkBox().isChecked(); + } else { + value = Boolean.parseBoolean(propertiesBot.bot().ccomboBox().getText()); + } + assertEquals("The value of abstract field must be true", isAbstract, value); + } /** |
