use of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton in project translationstudio8 by heartsome.
the class XlfEditor method changeEditorLayout.
/**
* 修改编辑器布局 将编辑器布局由水平改为垂直,或反之
*/
public void changeEditorLayout() {
XlfEditor xe = new XlfEditor(bot.activeEditor());
SWTBotToolbarButton changeEditorLayout = TS.getInstance().tlbBtnWTltChangeEditorLayout();
if (xe.isHorizontalLayout()) {
changeEditorLayout.click();
// 修改布局会导致 NatTable 重绘,重新赋值以更新其他地方的引用
getNatTable();
bot.waitUntil(new IsEditorLayoutVertical(xe));
} else {
changeEditorLayout.click();
getNatTable();
bot.waitUntil(new IsEditorLayoutHorizontal(xe));
}
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton in project linuxtools by eclipse.
the class AbstractSWTBotTest method exitProjectFolder.
/**
* Exit from the project tree.
*/
private static void exitProjectFolder(SWTWorkbenchBot bot) {
try {
SWTBotToolbarButton forwardButton = projectExplorer.toolbarPushButton("Forward");
projectExplorer.toolbarPushButton("Back to Workspace").click();
bot.waitUntil(widgetIsEnabled(forwardButton));
} catch (WidgetNotFoundException e) {
// Already exited from project folder
}
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton in project linuxtools by eclipse.
the class TestUtils method exitProjectFolder.
/**
* Exit from the project tree.
*/
public static void exitProjectFolder(SWTWorkbenchBot bot, SWTBotView navigator) {
SWTBotToolbarButton forwardButton = navigator.toolbarPushButton(ICreaterepoTestConstants.GO_FORWARD);
navigator.toolbarPushButton(ICreaterepoTestConstants.GO_BACK).click();
bot.waitUntil(widgetIsEnabled(forwardButton));
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton in project linuxtools by eclipse.
the class TestCreateSystemtapScript method finalCleanUp.
@AfterClass
public static void finalCleanUp() {
projectExplorer.setFocus();
SWTBotToolbarButton forwardButton = projectExplorer.toolbarPushButton("Forward");
projectExplorer.toolbarPushButton("Back to Workspace").click();
bot.waitUntil(Conditions.widgetIsEnabled(forwardButton));
projectExplorer.bot().tree().select(SYSTEMTAP_PROJECT_NAME).contextMenu("Delete").click();
SWTBotShell deleteShell = bot.shell("Delete Resources");
deleteShell.bot().button("OK").click();
bot.waitUntil(Conditions.shellCloses(deleteShell));
}
use of org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton in project linuxtools by eclipse.
the class DockerImagesViewSWTBotTest method verifyBuildAndPullActionEnablement.
@Test
public void verifyBuildAndPullActionEnablement() {
// given
final DockerClient client = MockDockerClientFactory.image(MockImageFactory.name("angry_bar").build()).build();
final DockerConnection dockerConnection = MockDockerConnectionFactory.from("Test", client).withDefaultTCPConnectionSettings();
DockerConnectionManagerUtils.configureConnectionManager(dockerConnection);
SWTUtils.syncExec(() -> SWTUtils.getView(bot, "org.eclipse.ui.views.PropertySheet", true));
this.dockerImagesView.setFocus();
// select the container in the table
selectImageInTable("angry_bar");
List<SWTBotToolbarButton> buttons = this.dockerImagesBotView.getToolbarButtons();
for (SWTBotToolbarButton button : buttons) {
if (button.getText().equals("Build Image")) {
assertThat(button.isEnabled());
} else if (button.getText().equals("Pull...")) {
assertThat(button.isEnabled());
}
}
unselectImages();
buttons = this.dockerImagesBotView.getToolbarButtons();
for (SWTBotToolbarButton button : buttons) {
if (button.getText().equals("Build Image")) {
assertThat(button.isEnabled());
} else if (button.getText().equals("Pull...")) {
assertThat(button.isEnabled());
}
}
unselectConnections();
buttons = this.dockerImagesBotView.getToolbarButtons();
for (SWTBotToolbarButton button : buttons) {
if (button.getText().equals("Build Image")) {
assertThat(!button.isEnabled());
} else if (button.getText().equals("Pull...")) {
assertThat(!button.isEnabled());
}
}
}
Aggregations