use of org.knime.core.node.wizard.page.WizardPage in project knime-core by knime.
the class EnhWEBP674_SinglePageExecution method reexecuteSinglePageAndKeepExecuting.
private void reexecuteSinglePageAndKeepExecuting(WizardExecutionController wec) {
wec.reexecuteSinglePage(createNodeID(getManager().getID(), 7, 0, 7), createWizardPageInput(400000));
assertThat(wec.hasCurrentWizardPage(), is(true));
Awaitility.await().atMost(5, TimeUnit.SECONDS).pollInterval(100, TimeUnit.MILLISECONDS).untilAsserted(() -> {
WizardPage pc = wec.getCurrentWizardPage();
assertThat(pc.getPageMap().size(), is(4));
});
}
use of org.knime.core.node.wizard.page.WizardPage in project knime-core by knime.
the class Bug6713_newWizardContainingOldMetanode method testWizardStepThrough.
@Test
public void testWizardStepThrough() throws Exception {
final WorkflowManager wfm = getManager();
assertTrue("should have new wizard execution", WebResourceController.hasWizardExecution(wfm));
WizardExecutionController wizardController = wfm.getWizardExecutionController();
wizardController.stepFirst();
waitWhile(wfm, new WizardHold(), -1);
assertTrue("should have steps", wizardController.hasCurrentWizardPage());
checkState(m_subnodeFirstPage_6, EXECUTED);
checkState(m_subnodeSecondPage_7, CONFIGURED_MARKEDFOREXEC);
checkState(m_javaEdit_3, CONFIGURED_MARKEDFOREXEC);
// outside loop
WizardPage currentWizardPage = wizardController.getCurrentWizardPage();
// TODO: load something real
wizardController.loadValuesIntoCurrentPage(Collections.<String, String>emptyMap());
// TODO check IDs
// assertEquals(m_subnodeFirstPage_6.toString(), currentWizardPage.getPageNodeID());
wizardController.stepNext();
waitWhile(wfm, new WizardHold(), -1);
checkState(wfm, CONFIGURED_MARKEDFOREXEC, UNCONFIGURED_MARKEDFOREXEC);
checkStateOfMany(EXECUTED, m_subnodeFirstPage_6, m_subnodeSecondPage_7, m_javaEdit_3);
checkStateOfMany(CONFIGURED_MARKEDFOREXEC, m_metaNode_8, m_javaEdit_InMetaNode_8_4);
checkStateOfMany(UNCONFIGURED_MARKEDFOREXEC, m_subnodeThirdPage_9);
assertTrue("should have steps (2nd page)", wizardController.hasCurrentWizardPage());
// inside loop 1st time
currentWizardPage = wizardController.getCurrentWizardPage();
// assertEquals(m_subnodeSecondPage_7.toString(), currentWizardPage.getPageNodeID());
wizardController.stepNext();
waitWhile(wfm, new WizardHold(), -1);
checkState(m_subnodeThirdPage_9, EXECUTED);
checkState(wfm, EXECUTED);
assertTrue("should have steps (3rd/last page)", wizardController.hasCurrentWizardPage());
// inside loop 2nd time
currentWizardPage = wizardController.getCurrentWizardPage();
// assertEquals(m_subnodeSecondPage_7.toString(), currentWizardPage.getPageNodeID());
wizardController.stepNext();
waitWhile(wfm, new WizardHold(), -1);
assertFalse("should have no more pages", wizardController.hasCurrentWizardPage());
checkState(wfm, EXECUTED);
}
Aggregations