use of org.eclipse.reddeer.workbench.impl.editor.TextEditor in project jbosstools-hibernate by jbosstools.
the class JPADetailsViewTest method testJPADetailView.
@Test
public void testJPADetailView() {
ProjectUtils.getItem(PRJ, "org.gen", "Actor.java").open();
TextEditor textEditor = new TextEditor("Actor.java");
textEditor.setCursorPosition(20, 1);
JPADetailsView jpaDetailsView = new JPADetailsView();
jpaDetailsView.open();
try {
new DefaultStyledText("Type 'Actor' is mapped as entity.");
} catch (RedDeerException e) {
fail("JPA details should be available - known issue - https://issues.jboss.org/browse/JBIDE-17940");
}
}
use of org.eclipse.reddeer.workbench.impl.editor.TextEditor in project jbosstools-openshift by jbosstools.
the class PublishChangesTest method changeProjectAndVerifyAutoPublish.
private void changeProjectAndVerifyAutoPublish() {
ProjectExplorer projectExplorer = new ProjectExplorer();
projectExplorer.open();
projectExplorer.getProject(PROJECT_NAME).select();
ProjectItem projectItem = projectExplorer.getProject(PROJECT_NAME).getProjectItem("Java Resources", "src/main/java", "org.jboss.as.quickstarts.helloworld", "HelloService.java");
projectItem.select();
projectItem.open();
TextEditor textEditor = new TextEditor("HelloService.java");
textEditor.setText(PUBLISHED_CODE);
textEditor.close(true);
new WaitWhile(new JobIsRunning(), TimePeriod.DEFAULT);
new WaitUntil(new ConsoleHasNoChange(), TimePeriod.VERY_LONG);
assertTrue("Local changes performed to project have not been autopublished, or at least rsync " + "output in console view does not contain information about sending incremental list of changes," + "specifically with changed class " + changedClass, new ConsoleView().getConsoleText().contains(changedClass));
}
use of org.eclipse.reddeer.workbench.impl.editor.TextEditor in project jbosstools-openshift by jbosstools.
the class EditResourcesTest method getBuildConfigTextEditor.
private TextEditor getBuildConfigTextEditor() {
getBuildConfig().select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.EDIT).select();
System.out.println("TESTING:" + "[" + requiredProject.getProjectName() + "] Build Config : eap-app.json");
return new TextEditor("[" + requiredProject.getProjectName() + "] Build Config : eap-app.json");
}
use of org.eclipse.reddeer.workbench.impl.editor.TextEditor in project jbosstools-openshift by jbosstools.
the class EditResourcesTest method testEditBuildConfigAndCheckChangesInExplorer.
@Test
public void testEditBuildConfigAndCheckChangesInExplorer() {
TextEditor editor = getBuildConfigTextEditor();
String text = editor.getText();
if (buildConfig == null) {
buildConfig = text;
}
editor.setText(text.replace(originalRepo, customRepo));
editor.close(true);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
assertTrue("Changes from updating of a build config should be shown " + "in Properties view, but it is not.", getBuildConfig().getPropertyValue("Source", "URI").equals(customRepo));
}
use of org.eclipse.reddeer.workbench.impl.editor.TextEditor in project jbosstools-openshift by jbosstools.
the class EditResourcesTest method setOriginalBuildConfigContent.
@After
public void setOriginalBuildConfigContent() {
if (buildConfig != null) {
getBuildConfig().select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.EDIT).select();
TextEditor editor = new TextEditor(BUILD_CONFIG_EDITOR);
editor.setText(buildConfig);
editor.close(true);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
}
Aggregations