Skip to content
Merged
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
35 changes: 19 additions & 16 deletions snd/test/src/org/labkey/test/tests/snd/SNDTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,7 @@ public void preTest()
//TODO: once exp tables are exposed - do a full cleanup from snd.pkgs, exp.DomainDescriptor, exp.PropertyDomain, exp.PropertyDescriptor
}

@SuppressWarnings("JUnit3StyleTestMethodInJUnit4Class") // Explicitly called as part of setup
public void testSNDImport()
{
//go to SND Project
Expand Down Expand Up @@ -1264,7 +1265,7 @@ public void cloneDraftPackage()
assertEquals("2", fairReviewRow.getMin());
assertEquals("7", fairReviewRow.getMax());
assertEquals(":-)", fairReviewRow.getDefault());
assertEquals(true, fairReviewRow.getRequired());
assertTrue(fairReviewRow.getRequired());
assertEquals("lol", fairReviewRow.getRedactedText());
}

Expand Down Expand Up @@ -1404,7 +1405,7 @@ public void saveNewPackage()
assertEquals("2", reviewRow.getMin());
assertEquals("7", reviewRow.getMax());
assertEquals("men", reviewRow.getDefault());
assertEquals(true, reviewRow.getRequired());
assertTrue(reviewRow.getRequired());
assertEquals("and women", reviewRow.getRedactedText());
}

Expand Down Expand Up @@ -1545,11 +1546,11 @@ public void editCategories() throws Exception

CategoryEditRow surgeryRowCat = catPage.getCategory("Surgery");
assertNotNull("Surgery category should exist", surgeryRowCat);
assertEquals("Surgery category should be active", true, surgeryRowCat.getIsActive());
assertTrue("Surgery category should be active", surgeryRowCat.getIsActive());

CategoryEditRow ourCat = catPage.getCategory(editedCategory);
assertNotNull("test edit category should exist", ourCat);
assertEquals("test edit category should be inactive", false, ourCat.getIsActive());
assertFalse("test edit category should be inactive", ourCat.getIsActive());
assertEquals("test edit category should have new description", editedCategory, ourCat.getDescription());

SelectRowsCommand catsCmd = new SelectRowsCommand("snd", "PkgCategories");
Expand Down Expand Up @@ -1803,12 +1804,17 @@ public void testProjectApis() throws Exception
public void testSuperPackageApis() throws Exception
{
goToProjectHome();
goToSchemaBrowser();

//insert super package
runScript(SAVEPACKAGEAPI_CHILDREN);
goToSchemaBrowser();
viewQueryData("snd", "SuperPkgs");
selectQuery("snd", "SuperPkgs");
// Issue 52277: Be sure that the call to analyze the query has completed by waiting for the dependency report,
// ensuring it won't be chosen as a deadlock victim
waitForText("Dependency Report");
Locator viewData = Locator.linkWithText("view data");
waitAndClickAndWait(viewData);

assertTextPresent(TEST_SUPER_PKG_DESCRIPTION_1, 1);
checkResults(TEST_SUPER_PKG_DESCRIPTION_1,
Arrays.asList(TEST_SUPER_PKG_START_ID1 + 1, // top-level super package is the + 0, so start at + 1
Expand All @@ -1818,8 +1824,7 @@ public void testSuperPackageApis() throws Exception

//update super package without cloning, with children
runScript(UPDATESUPERPACKAGEAPI_CHILDREN);
goToSchemaBrowser();
viewQueryData("snd", "SuperPkgs");
refresh();
assertTextPresent(TEST_SUPER_PKG_DESCRIPTION_2, 1);
assertTextNotPresent(TEST_SUPER_PKG_DESCRIPTION_1);
checkResults(TEST_SUPER_PKG_DESCRIPTION_2,
Expand All @@ -1832,8 +1837,7 @@ public void testSuperPackageApis() throws Exception

//update super package with cloning
runScript(UPDATESUPERPACKAGEAPI_CLONE);
goToSchemaBrowser();
viewQueryData("snd", "SuperPkgs");
refresh();
assertTextPresent(TEST_SUPER_PKG_DESCRIPTION_3, 1);
assertTextPresent(TEST_SUPER_PKG_DESCRIPTION_2, 1);
checkResults(TEST_SUPER_PKG_DESCRIPTION_3,
Expand All @@ -1846,8 +1850,7 @@ public void testSuperPackageApis() throws Exception

//update super package without cloning, without children
runScript(UPDATESUPERPACKAGEAPI_NOCHILDREN);
goToSchemaBrowser();
viewQueryData("snd", "SuperPkgs");
refresh();
assertTextPresent(TEST_SUPER_PKG_DESCRIPTION_4, 1);
assertTextPresent(TEST_SUPER_PKG_DESCRIPTION_3, 1);
assertTextNotPresent(TEST_SUPER_PKG_DESCRIPTION_2);
Expand Down Expand Up @@ -2170,7 +2173,7 @@ public void categoryPermissionsUI() throws Exception
{
value = getPermissionTableValue(i, 1);
assertNotNull(value);
assertTrue(value.equals("None"));
assertEquals("None", value);
categoryRows.add(i);
}
}
Expand All @@ -2182,7 +2185,7 @@ public void categoryPermissionsUI() throws Exception
{
value = getPermissionTableValue(r, 1);
assertNotNull(value);
assertTrue(value.equals("SND Reader"));
assertEquals("SND Reader", value);
}

findButton("Clear All").click();
Expand All @@ -2192,7 +2195,7 @@ public void categoryPermissionsUI() throws Exception
{
value = getPermissionTableValue(categoryRows.get(k), 1);
assertNotNull(value);
assertTrue(value.equals("None"));
assertEquals("None", value);
click(getSimpleTableCell(Locator.id("category-security"), categoryRows.get(k), 1));
clickRoleInOpenDropDown(permissions.get(k));
}
Expand All @@ -2203,7 +2206,7 @@ public void categoryPermissionsUI() throws Exception
{
value = getPermissionTableValue(categoryRows.get(j), 1);
assertNotNull(value);
assertTrue(value.equals(permissions.get(j)));
assertEquals(value, permissions.get(j));
}

}
Expand Down