use of org.eclipse.reddeer.workbench.condition.EditorWithTitleIsActive in project jbosstools-openshift by jbosstools.
the class NodeJSAppDebugTest method testVariablesAvailableInView.
@Test
public void testVariablesAvailableInView() throws CoreException, IOException {
ProjectExplorer pe = new ProjectExplorer();
pe.open();
pe.getProject(OpenShiftResources.NODEJS_GIT_NAME).getProjectItem("server.js").open();
new WaitUntil(new EditorWithTitleIsActive("server.js"));
TextEditor editor = new TextEditor("server.js");
setLineBreakpoint(editor, BREAKPOINT_LINE);
triggerDebugSession();
// test couple of js variables
TreeItem var_db = getVariable(VAR_db);
TreeItem var_initDb = getVariable(VAR_initDb);
TreeItem var_require = getVariable(VAR_require);
assertTrue("Variable '" + VAR_db + "' not found in view!", var_db != null);
assertThat(var_db.getCell(0), is(VAR_db));
assertThat(var_db.getCell(1), containsString(VAR_VALUE_db));
assertTrue("Variable '" + VAR_initDb + "' not found in view!", var_initDb != null);
assertThat(var_initDb.getCell(0), is(VAR_initDb));
assertThat(var_initDb.getCell(1), containsString(VAR_VALUE_initDb));
assertTrue("Variable '" + VAR_require + "' not found in view!", var_require != null);
assertThat(var_require.getCell(0), is(VAR_require));
assertThat(var_require.getCell(1), containsString(VAR_VALUE_require));
}
use of org.eclipse.reddeer.workbench.condition.EditorWithTitleIsActive in project jbosstools-openshift by jbosstools.
the class NodeJSAppDebugTest method testDebuggerStopsAtBreakpoint.
@Test
public void testDebuggerStopsAtBreakpoint() throws CoreException, IOException {
ProjectExplorer pe = new ProjectExplorer();
pe.open();
pe.getProject(OpenShiftResources.NODEJS_GIT_NAME).getProjectItem("server.js").open();
new WaitUntil(new EditorWithTitleIsActive("server.js"));
TextEditor editor = new TextEditor("server.js");
setLineBreakpoint(editor, BREAKPOINT_LINE);
triggerDebugSession();
try {
new WaitUntil(new EditorWithTitleIsActive("server.js"), TimePeriod.LONG);
new WaitUntil(new CursorPositionIsOnLine(editor, BREAKPOINT_LINE));
} catch (WaitTimeoutExpiredException e) {
Assert.fail("Debugger hasn't stopped on breakpoint");
}
}
Aggregations