Skip to content

Commit 65db95f

Browse files
More test updates
1 parent d793d7a commit 65db95f

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

resources/web/PanoramaPremium/window/AddNewMetricWindow.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,7 @@ Ext4.define('Panorama.Window.AddCustomMetricWindow', {
190190
};
191191
this.metricTypeCombo = Ext4.create('Ext.form.field.ComboBox', config);
192192

193-
if(this.operation === this.insert) {
194-
this.metricTypeCombo.setValue(true);
195-
}
193+
this.metricTypeCombo.setValue(this.operation === this.insert ? true : this.metric.PrecursorScoped);
196194
}
197195
return this.metricTypeCombo;
198196
},

test/src/org/labkey/test/tests/targetedms/TargetedMSPeptideSummaryHeatmapTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public void testMetricUsagePeptideSummaryHeatmap()
160160
peptideSummaryHeatMap = new PeptideSummaryWebPart(getDriver());
161161
Assert.assertEquals("Metric type " + QCPlotsWebPart.MetricType.TOTAL_PEAK + " should not be present",
162162
Arrays.asList("", "Full Width at Base (FWB)", "Full Width at Half Maximum (FWHM)", "Isotope dotp", "Precursor Area",
163-
"Precursor Mass Error", "Retention Time", "TIC Area", "Transition & Precursor Areas", "Transition Area",
163+
"Precursor Mass Error", "Retention Time", "TIC Area", "Transition Area",
164164
"Transition Mass Error", "Transition/Precursor Area Ratio", "Total"),
165165
peptideSummaryHeatMap.getHeatmapTable().getTableHeaderTexts());
166166
Assert.assertEquals("Outlier value should not be calculated for " + QCPlotsWebPart.MetricType.TRANSITION_MASS_ERROR,

webapp/TargetedMS/js/QCTrendPlotPanel.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ Ext4.define('LABKEY.targetedms.QCTrendPlotPanel', {
606606
if (paramValue !== undefined) {
607607
metric = this.validateMetricId(paramValue);
608608
if(metric == null) {
609-
alertMessage += "Invalid Metric, reverting to default metric.";
609+
alertMessage += "Invalid metric, reverting to default metric.";
610610
sep = ' ';
611611
}
612612
else {
@@ -669,7 +669,9 @@ Ext4.define('LABKEY.targetedms.QCTrendPlotPanel', {
669669
},
670670

671671
validateMetricId : function(id) {
672-
for (var i = 0; i < this.metricPropArr.length; i++) {
672+
// convert id to an integer, handling a parsing failure gracefully
673+
id = parseInt(id);
674+
for (let i = 0; i < this.metricPropArr.length; i++) {
673675
if (this.metricPropArr[i].id === id) {
674676
return this.metricPropArr[i].id;
675677
}

0 commit comments

Comments
 (0)