Skip to content

Commit

Permalink
Add release note
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedAlmaki committed Jan 15, 2025
1 parent e8459a4 commit 83e28aa
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- :ref:`ISIS Energy Transfer tab <ISISEnergyTransfer>` now supports an output label that is appended to the output name and doesn't override previous outputs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ class ISISEnergyTransferModelTest : public CxxTest::TestSuite {
auto properties = std::make_unique<Mantid::API::AlgorithmRuntimeProps>();

IETOutputData outputData(true, true);
m_model->setOutputProperties(*properties, outputData, "output");
m_model->setOutputProperties(*properties, outputData, "output", "label");

TS_ASSERT_EQUALS(properties->getPropertyValue("UnitX"), "DeltaE_inWavenumber");
TS_ASSERT_EQUALS(properties->getPropertyValue("FoldMultipleFrames"), "1");
Expand All @@ -294,7 +294,7 @@ class ISISEnergyTransferModelTest : public CxxTest::TestSuite {
auto properties = std::make_unique<Mantid::API::AlgorithmRuntimeProps>();

IETOutputData outputData(false, false);
m_model->setOutputProperties(*properties, outputData, "output");
m_model->setOutputProperties(*properties, outputData, "output", "label");

TS_ASSERT(!properties->existsProperty("UnitX"));
TS_ASSERT_EQUALS(properties->getPropertyValue("FoldMultipleFrames"), "0");
Expand Down Expand Up @@ -325,7 +325,7 @@ class ISISEnergyTransferModelTest : public CxxTest::TestSuite {

InstrumentData instData("instrument", "analyser", "reflection");

auto configuredAlg = m_model->energyTransferAlgorithm(instData, runData, "Elwin");
auto configuredAlg = m_model->energyTransferAlgorithm(instData, runData, "label");
auto &runtimeProps = configuredAlg->getAlgorithmRuntimeProps();
TS_ASSERT_EQUALS("instrument", runtimeProps.getPropertyValue("Instrument"));
TS_ASSERT_EQUALS("analyser", runtimeProps.getPropertyValue("Analyser"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ class ISISEnergyTransferPresenterTest : public CxxTest::TestSuite {
auto algorithmRunner = std::make_unique<NiceMock<MockAlgorithmRunner>>();

m_runView = std::make_unique<NiceMock<MockRunView>>();
m_outputNameView = std::make_unique<NiceMock<MockOutputNameView>>();
m_outputOptionsView = std::make_unique<NiceMock<MockOutputPlotOptionsView>>();
m_instrumentConfig = std::make_unique<NiceMock<MockInstrumentConfig>>();

m_view = std::make_unique<NiceMock<MockIETView>>();
ON_CALL(*m_view, getRunView()).WillByDefault(Return(m_runView.get()));
ON_CALL(*m_view, getOutputName()).WillByDefault(Return(m_outputNameView.get()));
ON_CALL(*m_view, getPlotOptionsView()).WillByDefault(Return(m_outputOptionsView.get()));

m_model = model.get();
Expand Down Expand Up @@ -129,6 +131,7 @@ class ISISEnergyTransferPresenterTest : public CxxTest::TestSuite {
std::unique_ptr<NiceMock<MockDataReduction>> m_idrUI;

std::unique_ptr<NiceMock<MockRunView>> m_runView;
std::unique_ptr<NiceMock<MockOutputNameView>> m_outputNameView;
std::unique_ptr<NiceMock<MockOutputPlotOptionsView>> m_outputOptionsView;
std::unique_ptr<NiceMock<MockInstrumentConfig>> m_instrumentConfig;
};
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class MockIETModel : public IIETModel {
MOCK_METHOD1(validateRunData, std::vector<std::string>(IETRunData const &runData));
MOCK_METHOD1(validatePlotData, std::vector<std::string>(IETPlotData const &plotData));

MOCK_METHOD2(energyTransferAlgorithm,
MOCK_METHOD3(energyTransferAlgorithm,
MantidQt::API::IConfiguredAlgorithm_sptr(InstrumentData const &instData, IETRunData &runParams,
std::string const &outputLabel));
MOCK_CONST_METHOD2(plotRawAlgorithmQueue,
Expand Down Expand Up @@ -76,6 +76,7 @@ class MockIETView : public IIETView {
MOCK_CONST_METHOD0(getSaveData, IETSaveData());
MOCK_CONST_METHOD0(getGroupOutputOption, std::string());
MOCK_CONST_METHOD0(getRunView, IRunView *());
MOCK_CONST_METHOD0(getOutputName, IOutputNameView *());
MOCK_CONST_METHOD0(getPlotOptionsView, IOutputPlotOptionsView *());
MOCK_CONST_METHOD0(getGroupOutputCheckbox, bool());
MOCK_CONST_METHOD0(getFirstFilename, std::string());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ class OutputNamePresenterTest : public CxxTest::TestSuite {
}

void test_enable_editing() {
EXPECT_CALL(*m_view, enableLabelEditor().Times(1));
EXPECT_CALL(*m_view, enableLabelEditor()).Times(1);
m_presenter->enableEditing();
}

void test_get_current_label() {
EXPECT_CALL(*m_view, getCurrentLabel().Times(1));
EXPECT_CALL(*m_view, getCurrentLabel()).Times(1);
m_presenter->getCurrentLabel();
}

Expand Down

0 comments on commit 83e28aa

Please sign in to comment.