Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ms2/test/src/org/labkey/test/ms2/MS2TestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected void doCleanup(boolean afterTest) throws TestTimeoutException

protected void createProjectAndFolder()
{
_containerHelper.createProject(getProjectName(), null);
_containerHelper.createProject(getProjectName(), "MS2");
_containerHelper.createSubfolder(getProjectName(), FOLDER_NAME, "MS2");

log("Set bad pipeline root.");
Expand Down
43 changes: 39 additions & 4 deletions ms2/test/src/org/labkey/test/tests/ms2/MS2Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import java.util.Set;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;

@Category({MS2.class, Daily.class})
Expand Down Expand Up @@ -71,13 +72,11 @@ protected void setupMS2()
protected void verifyMS2()
{
verifyFirstRun();

validateSecondRun();

validateRunGroups();

queryValidationTest();
pepXMLtest();
validateContainerFilter();
}

private void verifyFirstRun()
Expand Down Expand Up @@ -921,7 +920,7 @@ private void validateRunGroups()
verifyGroupAudit();
}

//verify audit trail registers runs added to or removed from groups.
//verify audit trail registers runs added to or removed from groups.
private void verifyGroupAudit()
{
List<Map<String, Object>> rows = executeSelectRowCommand("auditLog", "ExperimentAuditEvent").getRows();
Expand Down Expand Up @@ -1224,4 +1223,40 @@ public Set<String> getFilters()
}
return result;
}

/**
* Issue 52245 - container filter not getting propagated to run group lookup
*/
private void validateContainerFilter()
{
// create a run group at the project level
goToProjectHome(getProjectName());
clickAndWait(Locator.linkWithText("Run Groups"));
clickButton("Create Run Group");
setFormElement(Locator.name("name"), RUN_GROUP3_NAME);
Comment on lines +1235 to +1236

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a wait after the clickButton and before the setFormElement?
Like:
waitForElement(Locator.name("name"));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The page is probably static. Waiting for elements isn't quite as necessary outside of the apps.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is all server-rendered HTML. Waits are fine to add but probably not strictly necessary here.

clickButton("Submit");

navigateToFolder(FOLDER_NAME);
DataRegionTable runsTable = new DataRegionTable(REGION_NAME_SEARCH_RUNS, this);
runsTable.checkAllOnPage();
runsTable.clickHeaderMenu("Add to run group", RUN_GROUP3_NAME);

goToProjectHome(getProjectName());
goToSchemaBrowser();
DataRegionTable dataTable = viewQueryData("ms2", "XTandemPeptides");
dataTable.setContainerFilter(DataRegionTable.ContainerFilterType.CURRENT_AND_SUBFOLDERS);

_customizeViewsHelper.openCustomizeViewPanel();
_customizeViewsHelper.addColumn(new String[]{"Fraction", "Run", "ExperimentRunLSID", "RunGroups"});
_customizeViewsHelper.applyCustomView();
assertNotEquals("All rows should have a value for the run group", 0, dataTable.getDataRowCount());

// validate a single run group with the expected label
Set<String> runGroups = new HashSet<>(dataTable.getColumnDataAsText("RunGroups"));
assertEquals("Incorrect number of run groups", 1, runGroups.size());
assertEquals("Invalid run group label", RUN_GROUP3_NAME, runGroups.iterator().next());

dataTable.setFilter("Fraction/Run/ExperimentRunLSID/RunGroups", "Is Blank");
assertEquals("All rows should have a value for the run group", 0, dataTable.getDataRowCount());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to check the value is rendering correctly here, making sure we don't have a broken lookup or similar.

}
}