Example usage for org.eclipse.jface.dialogs IDialogConstants FINISH_LABEL

List of usage examples for org.eclipse.jface.dialogs IDialogConstants FINISH_LABEL

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IDialogConstants FINISH_LABEL.

Prototype

String FINISH_LABEL

To view the source code for org.eclipse.jface.dialogs IDialogConstants FINISH_LABEL.

Click Source Link

Document

The label for finish buttons.

Usage

From source file:org.bonitasoft.studio.configuration.test.swtbot.TestConfigurationDialog.java

License:Open Source License

@Test
public void testOpenDialog() {
    SWTBotEditor botEditor = bot.activeEditor();
    SWTBotGefEditor gmfEditor = bot.gefEditor(botEditor.getTitle());

    IGraphicalEditPart part = (IGraphicalEditPart) gmfEditor.mainEditPart().part();
    MainProcess model = (MainProcess) part.resolveSemanticElement();
    Pool pool = (Pool) model.getElements().get(0);
    String processLabel = pool.getName() + " (" + pool.getVersion() + ")";
    clickOnConfigure();/*w w  w  .  j a  v a  2 s .c  o m*/
    bot.waitUntil(Conditions.shellIsActive("Local configuration for " + processLabel));

    if (SWTBotTestUtil.testingBosSp()) {
        bot.table().getTableItem("Parameter").select();
    }
    bot.table().getTableItem("Actor mapping").select();

    bot.button(IDialogConstants.FINISH_LABEL).click();
}

From source file:org.bonitasoft.studio.configuration.test.swtbot.TestConfigurationDialog.java

License:Open Source License

@Test
public void testAdvancedCheckbox() {
    SWTBotEditor botEditor = bot.activeEditor();
    SWTBotGefEditor gmfEditor = bot.gefEditor(botEditor.getTitle());

    IGraphicalEditPart part = (IGraphicalEditPart) gmfEditor.mainEditPart().part();
    MainProcess model = (MainProcess) part.resolveSemanticElement();
    Pool pool = (Pool) model.getElements().get(0);
    String processLabel = pool.getName() + " (" + pool.getVersion() + ")";
    if (SWTBotTestUtil.testingBosSp()) {
        bot.toolbarDropDownButton("Configure").click();
    } else {//from   ww w.  j a v  a  2  s  .  c o  m
        bot.toolbarButton("Configure").click();
    }
    bot.waitUntil(Conditions.shellIsActive("Local configuration for " + processLabel));
    if (bot.checkBox().isChecked()) {
        bot.checkBox().click();
    }
    boolean notFound = false;
    try {
        bot.table().getTableItem("Process dependencies").select();
    } catch (WidgetNotFoundException e) {
        notFound = true;
    }
    assertTrue("Proces dependencies menu should not be visible", notFound);

    if (!bot.checkBox().isChecked()) {
        bot.checkBox().click();
    }
    bot.table().getTableItem("Process dependencies").select();

    bot.button(IDialogConstants.FINISH_LABEL).click();

    //VALIDATE CHECKBOX STATE RESTORED
    clickOnConfigure();
    bot.waitUntil(Conditions.shellIsActive("Local configuration for " + processLabel));
    assertTrue("Advanced checbox should be ckecked", bot.checkBox().isChecked());
    bot.button(IDialogConstants.FINISH_LABEL).click();
}

From source file:org.bonitasoft.studio.configuration.test.swtbot.TestConfigurationDialog.java

License:Open Source License

@Test
public void testMappingOfActors() {
    SWTBotEditor botEditor = bot.activeEditor();
    SWTBotGefEditor gmfEditor = bot.gefEditor(botEditor.getTitle());

    IGraphicalEditPart part = (IGraphicalEditPart) gmfEditor.mainEditPart().part();
    MainProcess model = (MainProcess) part.resolveSemanticElement();
    Pool pool = (Pool) model.getElements().get(0);
    String processLabel = pool.getName() + " (" + pool.getVersion() + ")";
    clickOnConfigure();/*  w  w  w.  j  a  v a 2s.  c o m*/
    bot.waitUntil(Conditions.shellIsActive("Local configuration for " + processLabel));
    bot.table().getTableItem("Actor mapping").select();

    //Remove default mapping
    bot.tree().getTreeItem(defaultEmployeeActor).select();
    bot.button("Groups...").click();
    bot.table().getTableItem(0).uncheck();
    bot.button(IDialogConstants.FINISH_LABEL).click();

    //Map to a group
    bot.tree().getTreeItem(defaultEmployeeActor + " -- Not mapped").select();
    bot.button("Groups...").click();
    bot.table().getTableItem(0).check();
    bot.button(IDialogConstants.FINISH_LABEL).click();

    //Map to a role
    bot.tree().getTreeItem(defaultEmployeeActor).select();
    bot.button("Roles...").click();
    bot.table().getTableItem(0).check();
    bot.button(IDialogConstants.FINISH_LABEL).click();

    //Map to a user
    bot.tree().getTreeItem(defaultEmployeeActor).select();
    bot.button("Users...").click();
    bot.table().getTableItem(0).check();
    bot.button(IDialogConstants.FINISH_LABEL).click();

    //Map to a membership
    bot.tree().getTreeItem(defaultEmployeeActor).select();
    bot.button("Memberships...").click();
    bot.button("Add membership...").click();
    assertFalse("Finish button should be disabled", bot.button(IDialogConstants.FINISH_LABEL).isEnabled());
    bot.comboBoxWithLabel("Group").setSelection(1);
    assertFalse("Finish button should be disabled", bot.button(IDialogConstants.FINISH_LABEL).isEnabled());
    bot.comboBoxWithLabel("Role").setSelection(1);
    assertTrue("Finish button should be enabled", bot.button(IDialogConstants.FINISH_LABEL).isEnabled());
    bot.button(IDialogConstants.FINISH_LABEL).click();

    bot.tree().getTreeItem(defaultEmployeeActor).getNode("Groups").expand();
    bot.tree().getTreeItem(defaultEmployeeActor).getNode("Roles").expand();
    bot.tree().getTreeItem(defaultEmployeeActor).getNode("Users").expand();
    bot.tree().getTreeItem(defaultEmployeeActor).getNode("Membership").expand();

    bot.button(IDialogConstants.FINISH_LABEL).click();

    if (SWTBotTestUtil.testingBosSp()) {
        bot.toolbarDropDownButton("Configure").click();
    } else {
        bot.toolbarButton("Configure").click();
    }
    bot.waitUntil(Conditions.shellIsActive("Local configuration for " + processLabel));
    bot.table().select("Actor mapping");
    bot.tree().getTreeItem(defaultEmployeeActor).getNode("Groups").expand();
    bot.tree().getTreeItem(defaultEmployeeActor).getNode("Roles").expand();
    bot.tree().getTreeItem(defaultEmployeeActor).getNode("Users").expand();
    bot.tree().getTreeItem(defaultEmployeeActor).getNode("Membership").expand();

    bot.button(IDialogConstants.FINISH_LABEL).click();
}

From source file:org.bonitasoft.studio.connector.model.definition.dialog.ConnectorDefinitionWizardDialog.java

License:Open Source License

@Override
public void showPage(IWizardPage page) {
    super.showPage(page);
    if (page instanceof PageWidgetsWizardPage) {
        ExtensibleWizard wizard = (ExtensibleWizard) getWizard();
        wizard.addAdditionalPage(page);//from  w  w  w.  ja va  2s.  c o m
        updateButtons();
        getButton(IDialogConstants.FINISH_ID).setText(Messages.apply);
        getButton(IDialogConstants.NEXT_ID).setVisible(false);
        getButton(IDialogConstants.BACK_ID).setVisible(false);
    } else {
        getButton(IDialogConstants.NEXT_ID).setVisible(true);
        getButton(IDialogConstants.BACK_ID).setVisible(true);
        getButton(IDialogConstants.FINISH_ID).setText(IDialogConstants.FINISH_LABEL);
    }
}

From source file:org.bonitasoft.studio.connectors.test.database.TestDatabaseConnectorOutputMode.java

License:Open Source License

private void checkEnalbledChoices() {
    assertFalse(/*from   w  ww  . j  a v a 2s .com*/
            bot.checkBox(org.bonitasoft.studio.connectors.i18n.Messages.alwaysUseScriptingMode).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.graphicalMode).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.scriptMode).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.singleValue).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.oneRowNCol).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowOneCol).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowsNcolumns).isSelected());

    bot.button(IDialogConstants.NEXT_LABEL).click();
    assertEquals("tableResult",
            bot.textWithLabel(org.bonitasoft.studio.connectors.i18n.Messages.takeValueOf).getText());
    bot.button(IDialogConstants.BACK_LABEL).click();

    bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.singleValue).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    assertEquals("col1",
            bot.textWithLabel(org.bonitasoft.studio.connectors.i18n.Messages.takeValueOf).getText());
    bot.button(IDialogConstants.BACK_LABEL).click();

    bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.oneRowNCol).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    assertEquals("col1",
            bot.textWithLabel(org.bonitasoft.studio.connectors.i18n.Messages.takeValueOf).getText());
    bot.button(IDialogConstants.BACK_LABEL).click();

    bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowOneCol).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    assertEquals("col1",
            bot.textWithLabel(org.bonitasoft.studio.connectors.i18n.Messages.takeValueOf).getText());
    bot.button(IDialogConstants.BACK_LABEL).click();

    bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.scriptMode).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    assertEquals("resultset", bot.textWithId(SWTBOT_ID_EXPRESSIONVIEWER_TEXT, 1).getText());
    bot.button(IDialogConstants.BACK_LABEL).click();

    bot.checkBox(org.bonitasoft.studio.connectors.i18n.Messages.alwaysUseScriptingMode).click();
    bot.button(IDialogConstants.BACK_LABEL).click();
    bot.styledText().setText(QUERY2);
    bot.button(IDialogConstants.NEXT_LABEL).click();

    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.scriptMode).isSelected());
    assertTrue(bot.checkBox(org.bonitasoft.studio.connectors.i18n.Messages.alwaysUseScriptingMode).isChecked());

    assertFalse(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.singleValue).isEnabled());
    assertFalse(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.oneRowNCol).isEnabled());
    assertFalse(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowOneCol).isEnabled());
    assertFalse(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowsNcolumns).isSelected());

    bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.graphicalMode).click();
    assertFalse(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.singleValue).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.oneRowNCol).isEnabled());
    assertFalse(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowOneCol).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowsNcolumns).isSelected());
    assertFalse(
            bot.checkBox(org.bonitasoft.studio.connectors.i18n.Messages.alwaysUseScriptingMode).isEnabled());
    assertFalse(
            bot.checkBox(org.bonitasoft.studio.connectors.i18n.Messages.alwaysUseScriptingMode).isChecked());

    bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.oneRowNCol).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    assertTrue(bot.text("col1").isVisible());
    assertTrue(bot.text("col2").isVisible());
    assertTrue(bot.text("col3").isVisible());
    bot.button(IDialogConstants.FINISH_LABEL).click();
    bot.activeEditor().save();
}

From source file:org.bonitasoft.studio.connectors.test.exporter.SWTBotConnectorExportTests.java

License:Open Source License

private void exportConnector(String connector, String fileName, boolean hasDependencies, boolean hasSources)
        throws Exception {
    File f = new File(ProjectUtil.getBonitaStudioWorkFolder().getAbsolutePath());
    final String exportPath = f.getAbsolutePath();
    SWTBotConnectorTestUtil.activateExportConnectorShell(bot);
    bot.table().select(connector);/*  w  w  w  . java2  s  .  com*/
    assertFalse("Finish button should be disabled", bot.button(IDialogConstants.FINISH_LABEL).isEnabled());
    if (hasSources) {
        bot.checkBoxWithLabel("Include sources").select();
    } else {
        bot.checkBoxWithLabel("Include sources").deselect();
    }
    if (hasDependencies) {
        bot.checkBoxWithLabel("Add dependencies").select();
    } else {
        bot.checkBoxWithLabel("Add dependencies").deselect();
    }
    bot.textWithLabel("Destination *").setText(exportPath);
    bot.button(IDialogConstants.FINISH_LABEL).click();
    bot.waitUntil(Conditions.shellIsActive("Export result"));
    bot.button(IDialogConstants.OK_LABEL).click();
    checkExportedFile(exportPath, fileName, hasDependencies, hasSources);
}

From source file:org.bonitasoft.studio.connectors.test.exporter.SWTBotConnectorExportTests.java

License:Open Source License

@Test
public void testUserConnectorExportWithTranslations() throws Exception {
    final int nbEditorsBefore = bot.editors().size();
    final String id = "connectorTest2";
    final String version = "1.0.0";
    final String className = "MyConnectorTest2";
    final String packageName = "org.bonitaSoft.studioTests";
    final String userConnector = id + "-impl (" + version + ")" + " -- " + packageName + "." + className;
    final String fileName = "connectorTest2-impl-1.0.0.zip";
    final String language1 = "de";
    final String language2 = "sq";
    SWTBotConnectorTestUtil.createConnectorDefAndImpl(bot, id, version, className, packageName);
    SWTBotConnectorTestUtil.activateConnectorDefEditionShell(bot);
    bot.tree().expandNode("Uncategorized").select(id + " (" + version + ")");
    bot.button(Messages.Edit).click();//www .j  a  v a2  s . c  om
    bot.waitUntil(Conditions.shellIsActive("Edit connector definition"));
    bot.button(IDialogConstants.NEXT_LABEL).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    int line = bot.table().indexOf(language1, "Locale");
    bot.table().getTableItem(line).check();
    line = bot.table().indexOf(language2, "Locale");
    bot.table().getTableItem(line).check();
    bot.button(IDialogConstants.FINISH_LABEL).click();
    bot.waitUntil(new ICondition() {

        public boolean test() throws Exception {
            return nbEditorsBefore + 3 == bot.editors().size();
        }

        public void init(SWTBot bot) {
        }

        public String getFailureMessage() {
            return "Editor for implementation has not been opened.";
        }
    }, 30000);
    exportConnector(userConnector, fileName, false, true);
    //String dirName = fileName.substring(0, fileName.lastIndexOf("."));
    File destDir = new File(ProjectUtil.getBonitaStudioWorkFolder().getAbsolutePath());
    assertNotNull(" unzip exported connector dir does not exist", destDir);
    assertTrue("dest dir doesn't exist", destDir.exists());
    Set<String> fileNames = new HashSet<String>();
    fileNames.add("connectorTest2-1.0.0.properties");
    fileNames.add("connectorTest2-1.0.0_sq.properties");
    fileNames.add("connectorTest2-1.0.0_de.properties");
    checkMessageFiles(destDir, fileNames);
}

From source file:org.bonitasoft.studio.connectors.test.swtbot.ConnectorDefinitionTranslationsTest.java

License:Open Source License

@Test
public void testConnectorDefinitionTranslation() throws Exception {
    final int nbEditorsBefore = bot.editors().size();
    final String language = "en";
    bot.button(IDialogConstants.NEXT_LABEL).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    int line = bot.table().indexOf(language, "Locale");
    bot.table().getTableItem(line).check();
    bot.button(IDialogConstants.FINISH_LABEL).click();
    ConnectorDefRepositoryStore store = (ConnectorDefRepositoryStore) RepositoryManager.getInstance()
            .getRepositoryStore(ConnectorDefRepositoryStore.class);
    DefinitionResourceProvider resourceProvider = DefinitionResourceProvider.getInstance(store,
            ConnectorPlugin.getDefault().getBundle());
    List<File> resources = resourceProvider
            .getExistingLocalesResource(store.getDefinition("testTranslationWizardPage", "1.0.0"));
    assertEquals("resources list should contain 2 resources", resources.size(), 2);
    for (File file : resources) {
        if (file.getName().contains("_en")) {
            Properties properties = new Properties();
            InputStream stream = new FileInputStream(file);
            properties.load(stream);/*  ww  w .j a va2 s .c o m*/
            assertTrue("properties file doesn't contain key widgetTest4.description",
                    properties.containsKey("widgetTest4.description"));
            assertTrue("properties file doesn't contain key widgetTest2.description",
                    properties.containsKey("widgetTest2.description"));
            assertTrue("properties file doesn't contain key widgetTest0.description",
                    properties.containsKey("widgetTest0.description"));
            assertTrue("properties file doesn't contain key widgetTest5.description",
                    properties.containsKey("widgetTest5.description"));
            assertTrue("properties file doesn't contain key widgetTest3.description",
                    properties.containsKey("widgetTest3.description"));
            assertTrue("properties file doesn't contain key widgetTest1.description",
                    properties.containsKey("widgetTest1.description"));
            assertTrue("properties file doesn't contain key widgetTest4.label",
                    properties.containsKey("widgetTest4.label"));
            assertTrue("properties file doesn't contain key widgetTest2.label",
                    properties.containsKey("widgetTest2.label"));
            assertTrue("properties file doesn't contain key widgetTest0.label",
                    properties.containsKey("widgetTest0.label"));
            assertTrue("properties file doesn't contain key widgetTest5.label",
                    properties.containsKey("widgetTest5.label"));
            assertTrue("properties file doesn't contain key widgetTest3.label",
                    properties.containsKey("widgetTest3.label"));
            assertTrue("properties file doesn't contain key widgetTest1.label",
                    properties.containsKey("widgetTest1.label"));
            assertTrue("properties file doesn't contain key category1.category",
                    properties.containsKey("categoryEWP.category"));
            assertTrue("properties file doesn't contain key pageTest.pageDescription",
                    properties.containsKey("pageTest.pageDescription"));
            assertTrue("properties file doesn't contain key pageTest.pageTitle",
                    properties.containsKey("pageTest.pageTitle"));
            stream.close();
        }

    }
    bot.waitUntil(new ICondition() {

        public boolean test() throws Exception {
            return nbEditorsBefore + 1 == bot.editors().size();
        }

        public void init(SWTBot bot) {
        }

        public String getFailureMessage() {
            return "Editor for new diagram has not been opened.";
        }
    }, 30000);
}

From source file:org.bonitasoft.studio.connectors.test.swtbot.ConnectorDefinitionWizardPageTest.java

License:Open Source License

@Test
public void testConnectorEditionWizardPage() throws Exception {
    final String connectorDefId = "testWizardPage";
    final String pageId = "pageTest";
    final String widgetId0 = "widgetTest0";
    final String widgetId1 = "widgetTest1";
    final String widgetId2 = "widgetTest2";
    final String widgetId3 = "widgetTest3";
    final String widgetId4 = "widgetTest4";
    String widgetId5 = "widgetTest5";
    openConnectorDefinitionWizardPage(connectorDefId);
    bot.button("Add...").click();
    assertFalse("button Apply should be disabled", bot.button(Messages.apply).isEnabled());
    bot.textWithLabel("Page id *").setText(pageId);
    assertTrue("button Apply should be disabled", bot.button(Messages.apply).isEnabled());
    createWidget(widgetId0, "Text", 0);
    createWidget(widgetId1, "Password", 1);
    createWidget(widgetId2, "Checkbox", 3);
    createWidget(widgetId3, "Select", 4);
    createWidget(widgetId4, "Radio group", 5);
    createWidget(widgetId5, "Group", 7);
    bot.button(Messages.apply).click();//from  w  w  w .j  av a2s.  c o  m
    bot.button(IDialogConstants.FINISH_LABEL).click();
    ConnectorDefRepositoryStore store = (ConnectorDefRepositoryStore) RepositoryManager.getInstance()
            .getRepositoryStore(ConnectorDefRepositoryStore.class);
    ConnectorDefinition connectorDef = store.getDefinition(connectorDefId, "1.0.0");
    Component widget0 = connectorDef.getPage().get(0).getWidget().get(0);
    assertNotNull("widget " + widgetId0 + " for connector definition " + connectorDefId + " and page " + pageId
            + " was not created", widget0);
    assertTrue("widget " + widgetId0 + " for connector definition " + connectorDefId + " and page " + pageId
            + " should be a text widget", widget0 instanceof Text);
    Component widget1 = connectorDef.getPage().get(0).getWidget().get(1);
    assertNotNull("widget " + widgetId1 + " for connector definition " + connectorDefId + " and page " + pageId
            + " was not created", widget1);
    assertTrue("widget " + widgetId1 + " for connector definition " + connectorDefId + " and page " + pageId
            + " should be a text widget", widget1 instanceof Password);
    Component widget2 = connectorDef.getPage().get(0).getWidget().get(2);
    assertNotNull("widget " + widgetId2 + " for connector definition " + connectorDefId + " and page " + pageId
            + " was not created", widget2);
    assertTrue("widget " + widgetId2 + " for connector definition " + connectorDefId + " and page " + pageId
            + " should be a text widget", widget2 instanceof Checkbox);
    Component widget3 = connectorDef.getPage().get(0).getWidget().get(3);
    assertNotNull("widget " + widgetId3 + " for connector definition " + connectorDefId + " and page " + pageId
            + " was not created", widget3);
    assertTrue("widget " + widgetId3 + " for connector definition " + connectorDefId + " and page " + pageId
            + " should be a text widget", widget3 instanceof Select);
    Component widget4 = connectorDef.getPage().get(0).getWidget().get(4);
    assertNotNull("widget " + widgetId4 + " for connector definition " + connectorDefId + " and page " + pageId
            + " was not created", widget4);
    assertTrue("widget " + widgetId4 + " for connector definition " + connectorDefId + " and page " + pageId
            + " should be a text widget", widget4 instanceof RadioGroup);
    Component widget5 = connectorDef.getPage().get(0).getWidget().get(5);
    assertNotNull("widget " + widgetId5 + " for connector definition " + connectorDefId + " and page " + pageId
            + " was not created", widget5);
    assertTrue("widget " + widgetId5 + " for connector definition " + connectorDefId + " and page " + pageId
            + " should be a text widget", widget5 instanceof Group);
}

From source file:org.bonitasoft.studio.connectors.test.swtbot.ConnectorEditionTest.java

License:Open Source License

@Test
public void testIdRenameEdit() throws Exception {
    final String id = "testEdit";
    final String version = "1.0.0";
    final String id2 = "testEdit2";
    SWTBotConnectorTestUtil.activateConnectorDefinitionShell(bot);
    SWTBotConnectorTestUtil.createConnectorDefinition(bot, id, version);
    bot.button(IDialogConstants.FINISH_LABEL).click();
    SWTBotConnectorTestUtil.activateConnectorDefEditionShell(bot);
    bot.tree().setFocus();//  w w  w.j  a va2s . c om
    bot.waitUntil(Conditions.widgetIsEnabled(
            bot.tree().select("Uncategorized").expandNode("Uncategorized").select(id + " (" + version + ")")),
            10000);
    bot.tree().expandNode("Uncategorized").select(id + " (" + version + ")");
    bot.button(Messages.Edit).click();
    assertEquals(bot.textWithLabel("Definition id *").getText(), id);
    assertEquals(bot.textWithLabel("Version *").getText(), version);
    bot.textWithLabel("Definition id *").setText(id2);
    bot.button(IDialogConstants.FINISH_LABEL).click();
    ConnectorDefRepositoryStore store = (ConnectorDefRepositoryStore) RepositoryManager.getInstance()
            .getRepositoryStore(ConnectorDefRepositoryStore.class);
    ConnectorDefinition connectorDef = store.getDefinition(id, version);
    ConnectorDefinition connectorDef2 = store.getDefinition(id2, version);
    assertNull("the connectorDef with previous id shouldn't exist anymore", connectorDef);
    assertNotNull("the connectorDef with new id does not exist", connectorDef2);
    removeConnectorDefinition(id2, version);
}