Skip to content

Commit 244420c

Browse files
authored
Regression coverage for 52245 (#895)
1 parent 4bf6571 commit 244420c

2 files changed

Lines changed: 40 additions & 5 deletions

File tree

ms2/test/src/org/labkey/test/ms2/MS2TestBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected void doCleanup(boolean afterTest) throws TestTimeoutException
8282

8383
protected void createProjectAndFolder()
8484
{
85-
_containerHelper.createProject(getProjectName(), null);
85+
_containerHelper.createProject(getProjectName(), "MS2");
8686
_containerHelper.createSubfolder(getProjectName(), FOLDER_NAME, "MS2");
8787

8888
log("Set bad pipeline root.");

ms2/test/src/org/labkey/test/tests/ms2/MS2Test.java

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import java.util.Set;
4242

4343
import static org.junit.Assert.assertEquals;
44+
import static org.junit.Assert.assertNotEquals;
4445
import static org.junit.Assert.assertTrue;
4546

4647
@Category({MS2.class, Daily.class})
@@ -71,13 +72,11 @@ protected void setupMS2()
7172
protected void verifyMS2()
7273
{
7374
verifyFirstRun();
74-
7575
validateSecondRun();
76-
7776
validateRunGroups();
78-
7977
queryValidationTest();
8078
pepXMLtest();
79+
validateContainerFilter();
8180
}
8281

8382
private void verifyFirstRun()
@@ -921,7 +920,7 @@ private void validateRunGroups()
921920
verifyGroupAudit();
922921
}
923922

924-
//verify audit trail registers runs added to or removed from groups.
923+
//verify audit trail registers runs added to or removed from groups.
925924
private void verifyGroupAudit()
926925
{
927926
List<Map<String, Object>> rows = executeSelectRowCommand("auditLog", "ExperimentAuditEvent").getRows();
@@ -1224,4 +1223,40 @@ public Set<String> getFilters()
12241223
}
12251224
return result;
12261225
}
1226+
1227+
/**
1228+
* Issue 52245 - container filter not getting propagated to run group lookup
1229+
*/
1230+
private void validateContainerFilter()
1231+
{
1232+
// create a run group at the project level
1233+
goToProjectHome(getProjectName());
1234+
clickAndWait(Locator.linkWithText("Run Groups"));
1235+
clickButton("Create Run Group");
1236+
setFormElement(Locator.name("name"), RUN_GROUP3_NAME);
1237+
clickButton("Submit");
1238+
1239+
navigateToFolder(FOLDER_NAME);
1240+
DataRegionTable runsTable = new DataRegionTable(REGION_NAME_SEARCH_RUNS, this);
1241+
runsTable.checkAllOnPage();
1242+
runsTable.clickHeaderMenu("Add to run group", RUN_GROUP3_NAME);
1243+
1244+
goToProjectHome(getProjectName());
1245+
goToSchemaBrowser();
1246+
DataRegionTable dataTable = viewQueryData("ms2", "XTandemPeptides");
1247+
dataTable.setContainerFilter(DataRegionTable.ContainerFilterType.CURRENT_AND_SUBFOLDERS);
1248+
1249+
_customizeViewsHelper.openCustomizeViewPanel();
1250+
_customizeViewsHelper.addColumn(new String[]{"Fraction", "Run", "ExperimentRunLSID", "RunGroups"});
1251+
_customizeViewsHelper.applyCustomView();
1252+
assertNotEquals("All rows should have a value for the run group", 0, dataTable.getDataRowCount());
1253+
1254+
// validate a single run group with the expected label
1255+
Set<String> runGroups = new HashSet<>(dataTable.getColumnDataAsText("RunGroups"));
1256+
assertEquals("Incorrect number of run groups", 1, runGroups.size());
1257+
assertEquals("Invalid run group label", RUN_GROUP3_NAME, runGroups.iterator().next());
1258+
1259+
dataTable.setFilter("Fraction/Run/ExperimentRunLSID/RunGroups", "Is Blank");
1260+
assertEquals("All rows should have a value for the run group", 0, dataTable.getDataRowCount());
1261+
}
12271262
}

0 commit comments

Comments
 (0)