Search in sources :

Example 1 with SWTBotTableItem

use of org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem in project linuxtools by eclipse.

the class DockerContainersViewSWTBotTest method selectContainerInTable.

private SWTBotTableItem selectContainerInTable(final String containerName) {
    final SWTBotTableItem tableItem = SWTUtils.getListItem(dockerContainersViewBot.bot().table(), containerName);
    assertThat(tableItem).isNotNull();
    return tableItem.click().select();
}
Also used : SWTBotTableItem(org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem)

Example 2 with SWTBotTableItem

use of org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem in project linuxtools by eclipse.

the class DockerImagesViewSWTBotTest method selectImageInTable.

private SWTBotTableItem selectImageInTable(final String imageName) {
    final SWTBotTableItem tableItem = SWTUtils.getListItem(dockerImagesBotView.bot().table(), imageName);
    assertThat(tableItem).isNotNull();
    return tableItem.click().select();
}
Also used : SWTBotTableItem(org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem)

Example 3 with SWTBotTableItem

use of org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem in project eclipse-pmd by acanda.

the class PMDPropertyDialogTest method deactivateFileSystemRuleSet.

private void deactivateFileSystemRuleSet() {
    PMDPropertyDialogBot dialog = JavaProjectClient.openPMDPropertyDialog(PROJECT_NAME_1);
    assertTrue("PMD should be enabled", dialog.enablePMD().isChecked());
    final SWTBotTableItem fileSystemTableItem = dialog.ruleSets().getTableItem(FILE_SYSTEM_RULE_SET_NAME);
    fileSystemTableItem.uncheck();
    dialog.bot().waitWhile(isChecked(fileSystemTableItem));
    dialog.ok().click();
    dialog.bot().waitUntil(shellCloses(dialog));
    dialog = JavaProjectClient.openPMDPropertyDialog(PROJECT_NAME_1);
    assertFalse("The deactivated rule set should still be in the table since it is used by project " + PROJECT_NAME_2, dialog.ruleSets().getTableItem(FILE_SYSTEM_RULE_SET_NAME).isChecked());
    dialog.ok().click();
    dialog.bot().waitUntil(shellCloses(dialog));
}
Also used : PMDPropertyDialogBot(ch.acanda.eclipse.pmd.swtbot.bot.PMDPropertyDialogBot) SWTBotTableItem(org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem)

Example 4 with SWTBotTableItem

use of org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem in project eclipse-pmd by acanda.

the class PMDPropertyDialogTest method deactivateWorkspaceRuleSet.

private void deactivateWorkspaceRuleSet() {
    PMDPropertyDialogBot dialog = JavaProjectClient.openPMDPropertyDialog(PROJECT_NAME_1);
    assertTrue("PMD should be enabled", dialog.enablePMD().isChecked());
    final SWTBotTableItem workspaceTableItem = dialog.ruleSets().getTableItem(WORKSPACE_RULE_SET_NAME);
    workspaceTableItem.uncheck();
    dialog.bot().waitWhile(isChecked(workspaceTableItem));
    dialog.ok().click();
    dialog.bot().waitUntil(shellCloses(dialog));
    dialog = JavaProjectClient.openPMDPropertyDialog(PROJECT_NAME_1);
    assertEquals("The deactivated rule set should not be in the table anymore since it is not used by any other project", 3, dialog.ruleSets().rowCount());
    dialog.ok().click();
    dialog.bot().waitUntil(shellCloses(dialog));
}
Also used : PMDPropertyDialogBot(ch.acanda.eclipse.pmd.swtbot.bot.PMDPropertyDialogBot) SWTBotTableItem(org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem)

Aggregations

SWTBotTableItem (org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem)4 PMDPropertyDialogBot (ch.acanda.eclipse.pmd.swtbot.bot.PMDPropertyDialogBot)2