Skip to content

Commit 83e28aa

Browse files
committed
Add release note
1 parent e8459a4 commit 83e28aa

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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

qt/scientific_interfaces/Indirect/test/Reduction/ISISEnergyTransferModelTest.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ class ISISEnergyTransferModelTest : public CxxTest::TestSuite {
283283
auto properties = std::make_unique<Mantid::API::AlgorithmRuntimeProps>();
284284

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

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

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

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

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

328-
auto configuredAlg = m_model->energyTransferAlgorithm(instData, runData, "Elwin");
328+
auto configuredAlg = m_model->energyTransferAlgorithm(instData, runData, "label");
329329
auto &runtimeProps = configuredAlg->getAlgorithmRuntimeProps();
330330
TS_ASSERT_EQUALS("instrument", runtimeProps.getPropertyValue("Instrument"));
331331
TS_ASSERT_EQUALS("analyser", runtimeProps.getPropertyValue("Analyser"));

qt/scientific_interfaces/Indirect/test/Reduction/ISISEnergyTransferPresenterTest.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ class ISISEnergyTransferPresenterTest : public CxxTest::TestSuite {
3737
auto algorithmRunner = std::make_unique<NiceMock<MockAlgorithmRunner>>();
3838

3939
m_runView = std::make_unique<NiceMock<MockRunView>>();
40+
m_outputNameView = std::make_unique<NiceMock<MockOutputNameView>>();
4041
m_outputOptionsView = std::make_unique<NiceMock<MockOutputPlotOptionsView>>();
4142
m_instrumentConfig = std::make_unique<NiceMock<MockInstrumentConfig>>();
4243

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

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

131133
std::unique_ptr<NiceMock<MockRunView>> m_runView;
134+
std::unique_ptr<NiceMock<MockOutputNameView>> m_outputNameView;
132135
std::unique_ptr<NiceMock<MockOutputPlotOptionsView>> m_outputOptionsView;
133136
std::unique_ptr<NiceMock<MockInstrumentConfig>> m_instrumentConfig;
134137
};

qt/scientific_interfaces/Indirect/test/Reduction/MockObjects.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class MockIETModel : public IIETModel {
4444
MOCK_METHOD1(validateRunData, std::vector<std::string>(IETRunData const &runData));
4545
MOCK_METHOD1(validatePlotData, std::vector<std::string>(IETPlotData const &plotData));
4646

47-
MOCK_METHOD2(energyTransferAlgorithm,
47+
MOCK_METHOD3(energyTransferAlgorithm,
4848
MantidQt::API::IConfiguredAlgorithm_sptr(InstrumentData const &instData, IETRunData &runParams,
4949
std::string const &outputLabel));
5050
MOCK_CONST_METHOD2(plotRawAlgorithmQueue,
@@ -76,6 +76,7 @@ class MockIETView : public IIETView {
7676
MOCK_CONST_METHOD0(getSaveData, IETSaveData());
7777
MOCK_CONST_METHOD0(getGroupOutputOption, std::string());
7878
MOCK_CONST_METHOD0(getRunView, IRunView *());
79+
MOCK_CONST_METHOD0(getOutputName, IOutputNameView *());
7980
MOCK_CONST_METHOD0(getPlotOptionsView, IOutputPlotOptionsView *());
8081
MOCK_CONST_METHOD0(getGroupOutputCheckbox, bool());
8182
MOCK_CONST_METHOD0(getFirstFilename, std::string());

qt/widgets/spectroscopy/test/OutputWidget/OutputNamePresenterTest.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ class OutputNamePresenterTest : public CxxTest::TestSuite {
5151
}
5252

5353
void test_enable_editing() {
54-
EXPECT_CALL(*m_view, enableLabelEditor().Times(1));
54+
EXPECT_CALL(*m_view, enableLabelEditor()).Times(1);
5555
m_presenter->enableEditing();
5656
}
5757

5858
void test_get_current_label() {
59-
EXPECT_CALL(*m_view, getCurrentLabel().Times(1));
59+
EXPECT_CALL(*m_view, getCurrentLabel()).Times(1);
6060
m_presenter->getCurrentLabel();
6161
}
6262

0 commit comments

Comments
 (0)