Skip to content

Commit

Permalink
Merge 24.7 to develop
Browse files Browse the repository at this point in the history
  • Loading branch information
labkey-teamcity committed Aug 20, 2024
2 parents 46c1215 + f7d7a61 commit e9bc4a2
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public UtilizationCalendarWebPart markOffline(String startDate, @Nullable String
ModalDialog modalDialog = clickDate(startDate);
getWrapper().setFormElement(Locator.name("event-description").findElement(modalDialog.getComponentElement()), description);
getWrapper().setFormElement(Locator.name("event-end-date").findElement(modalDialog.getComponentElement()), endDate);
modalDialog.dismiss("Save", 0);
doAndWaitForElementToRefresh(() -> modalDialog.dismiss("Save"), elementCache().dayLoc.withText(extractDay(startDate)), 10);
return this;
}

Expand All @@ -88,18 +88,22 @@ public UtilizationCalendarWebPart markOfflineExpectingError(String startDate, @N
modalDialog.dismiss("Save", 0);
getWrapper().waitForElement(elementCache().error_msg.withText(errorMsg));
Assert.assertEquals("Incorrect validation message", errorMsg, elementCache().error_msg.findElement(modalDialog.getComponentElement()).getText());
modalDialog.dismiss("Cancel", 0);
modalDialog.dismiss("Cancel");
return this;
}

public ModalDialog clickDate(String date)
{
String clickDate = date.substring(date.lastIndexOf("-") + 1);
String clickDate = extractDay(date);
getWrapper().log("Clicking " + clickDate + " to update the status");
elementCache().dayLoc.withText(clickDate).findElement(elementCache().calendar.findWhenNeeded(this)).click();
return new ModalDialog.ModalDialogFinder(getDriver()).withTitle("Instrument Offline Annotation").waitFor();
}

private String extractDay(String date)
{
return date.substring(date.lastIndexOf("-") + 1);
}
public boolean isOffline(String date)
{
String day = date.substring(date.lastIndexOf("-") + 1);
Expand All @@ -111,7 +115,7 @@ public UtilizationCalendarWebPart markOnline(String date)
if (isOffline(date))
{
ModalDialog modalDialog = clickDate(date);
modalDialog.dismiss("Delete", 0);
modalDialog.dismiss("Delete");
}
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.labkey.test.util.APIContainerHelper;
import org.labkey.test.util.PortalHelper;
import org.labkey.test.util.SampleTypeHelper;
import org.labkey.test.util.exp.SampleTypeAPIHelper;

import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -114,10 +115,7 @@ public void testSampleTypeNavigation()
private void createSampleType(String sampleName)
{
projectMenu().navigateToFolder(getProjectName(), Sample_Manager_Subfolder);
SampleTypeHelper sampleTypeHelper = new SampleTypeHelper(this);
SampleTypeDefinition sampleTypeDefinition = new SampleTypeDefinition(sampleName);
sampleTypeHelper.createSampleType(sampleTypeDefinition);
sampleTypeHelper.goToSampleType(sampleName);
SampleTypeAPIHelper.createEmptySampleType(getProjectName() + "/" + Sample_Manager_Subfolder, new SampleTypeDefinition(sampleName));
}

private void addSamples(String sampleName, List<Map<String, String>> samples)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.regex.Pattern;

@Category({})
@BaseWebDriverTest.ClassTimeout(minutes = 2)
@BaseWebDriverTest.ClassTimeout(minutes = 5)
public class TargetedMSQCConfigureMetricTest extends TargetedMSPremiumTest
{
private final static String SUBFOLDER_1 = "QC Subfolder 1";
Expand Down
8 changes: 5 additions & 3 deletions webapp/TargetedMS/js/LeveyJenningsPlotHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,15 @@ Ext4.define("LABKEY.targetedms.LeveyJenningsPlotHelper", {
return ['value_series1', 'value_series2'];
},

getLJLegend: function () {
getLJLegend: function (combinedPlot) {
var ljLegend = [];

if (!this.getMetricPropsById(this.metric).series2Label) {
let metricInfo = this.getMetricPropsById(this.metric);

if (metricInfo.metricStatus === LABKEY.targetedms.MetricStatus.ValueCutoff || metricInfo.metricStatus === LABKEY.targetedms.MetricStatus.MeanDeviationCutoff) {
let isCombinedValueCutOff = LABKEY.targetedms.MetricStatus.ValueCutoff && combinedPlot;
let isYAxisScaleLinearOrLog = this.yAxisScale === 'linear' || this.yAxisScale === 'log';
let showLegend = (isYAxisScaleLinearOrLog && isCombinedValueCutOff) || !isCombinedValueCutOff;
if (showLegend|| metricInfo.metricStatus === LABKEY.targetedms.MetricStatus.MeanDeviationCutoff) {
if (Number.isFinite(metricInfo.upperBound)) {
ljLegend.push({
text: 'Upper: ' + metricInfo.upperBound,
Expand Down
4 changes: 2 additions & 2 deletions webapp/TargetedMS/js/QCPlotHelperBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ Ext4.define("LABKEY.targetedms.QCPlotHelperBase", {
newLegendData = newLegendData.concat(ionLegend);
}

var extraPlotLegendData = this.getAdditionalPlotLegend(plotType);
var extraPlotLegendData = this.getAdditionalPlotLegend(plotType, true);
newLegendData = newLegendData.concat(extraPlotLegendData);

return newLegendData;
Expand Down Expand Up @@ -861,7 +861,7 @@ Ext4.define("LABKEY.targetedms.QCPlotHelperBase", {

Ext4.apply(trendLineProps, this.getPlotTypeProperties(precursorInfo, plotType, isCUSUMMean, metricProps));

var plotLegendData = this.getAdditionalPlotLegend(plotType);
var plotLegendData = this.getAdditionalPlotLegend(plotType, false);
if (Ext4.isArray(this.legendData)) {
plotLegendData = plotLegendData.concat(this.legendData);
}
Expand Down
4 changes: 2 additions & 2 deletions webapp/TargetedMS/js/QCPlotHelperWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,13 @@ Ext4.define("LABKEY.targetedms.QCPlotHelperWrapper", {
return this.getLJCombinedPlotLegendSeries();
},

getAdditionalPlotLegend: function(plotType) {
getAdditionalPlotLegend: function(plotType, combinedPlot) {
if (plotType === LABKEY.vis.TrendingLinePlotType.CUSUM)
return this.getCUSUMGroupLegend();
if (plotType === LABKEY.vis.TrendingLinePlotType.MovingRange)
return this.getMRLegend();
if (plotType === LABKEY.vis.TrendingLinePlotType.LeveyJennings)
return this.getLJLegend();
return this.getLJLegend(combinedPlot);
if (this.showMeanCUSUMPlot() || this.showVariableCUSUMPlot() ||
plotType === LABKEY.vis.TrendingLinePlotType.TrailingMean ||
plotType === LABKEY.vis.TrendingLinePlotType.TrailingCV)
Expand Down

0 comments on commit e9bc4a2

Please sign in to comment.