Skip to content

Commit

Permalink
Fix for #33 - test cases window with no connection
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilfb committed Nov 10, 2017
1 parent d7d65d2 commit cbb3850
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ private void initialiseTestCasesWindow(final Window parentWindow)
testCasesStage.setTitle("Test cases");
testCasesStage.initOwner(parentWindow);
testCasesStage.setScene(scene);
((TestCasesExecutionController) loader.getController()).init();

final TestCasesExecutionController testCasesExecutionController = (TestCasesExecutionController) loader.getController();
testCasesExecutionController.setScriptManager(genericScriptManager);
testCasesExecutionController.init();
}

private void initialiseFormattersWindow(final Window parentWindow)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,12 @@ public class TestCasesExecutionController extends AnchorPane implements Initiali

private String scriptsLocation;

// private EventManager<FormattedMqttMessage> eventManager;

// private IKBus eventBus;

private BaseScriptManagerInterface scriptManager;

private InteractiveTestCaseManager testCaseManager;

// private MqttAsyncConnection connection;

private MenuButton settingsButton;

// private ConnectionController connectionController;

private Label titleLabel;

public void initialize(URL location, ResourceBundle resources)
Expand Down Expand Up @@ -339,18 +331,15 @@ public void updateItem(TestCaseStatus item, boolean empty)

public void init()
{
titleLabel = new Label(pane.getText());
// Don't populate the title if not embedded
if (pane != null)
{
titleLabel = new Label(pane.getText());
}

// scriptManager = new InteractiveScriptManager(eventBus, connection);
testCaseManager = new InteractiveTestCaseManager(scriptManager, this, testCaseExecutionPaneController);

testCaseExecutionPaneController.setTestCaseManager(testCaseManager);

// if (connectionController != null)
// {
// // paneTitle = new AnchorPane();
// settingsButton = ViewManager.createTitleButtons(this, new AnchorPane(), connectionController);
// }
}

public void refreshInfo()
Expand Down Expand Up @@ -433,11 +422,6 @@ public void showSelected()
// === Setters and getters =======
// ===============================

// public void setEventBus(final IKBus eventBus)
// {
// this.eventBus = eventBus;
// }

@Override
public TitledPane getTitledPane()
{
Expand All @@ -449,16 +433,6 @@ public void setTitledPane(TitledPane pane)
{
this.pane = pane;
}

// public void setConnection(MqttAsyncConnection connection)
// {
// this.connection = connection;
// }

// public void setConnectionController(final ConnectionController connectionController)
// {
// this.connectionController = connectionController;
// }

@Override
public void updatePane(PaneVisibilityStatus status)
Expand Down

0 comments on commit cbb3850

Please sign in to comment.