Skip to content

Commit 658adda

Browse files
authored
Fix crawler and returnUrl test failures (#2930)
- Fix ListTest crawler failure - Fix bad returnUrl in AssayTransformMissingParentDirTest
1 parent a12ab93 commit 658adda

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

src/org/labkey/test/tests/assay/AssayTransformMissingParentDirTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.nio.file.AccessDeniedException;
2020
import java.nio.file.Files;
2121
import java.nio.file.Path;
22+
import java.util.List;
2223

2324
/**
2425
* Issue 54156: Regression test to ensure a reasonable error message is shown when an assay design references
@@ -40,10 +41,9 @@ public void testMissingParentDirectoryRegression() throws Exception
4041
TestFileUtils.writeFile(transformFile, transformContent);
4142

4243
// Create a General assay and add the transform by absolute path (not upload)
43-
var protocolResponse = new GeneralAssayDesign(assayName).createAssay(getProjectName(), createDefaultConnection());
44+
var protocolResponse = new GeneralAssayDesign(assayName).setBatchFields(List.of(), false).createAssay(getProjectName(), createDefaultConnection());
4445
var assayDesignerPage = ReactAssayDesignerPage.beginAt(this, getProjectName(), protocolResponse.getProtocolId(),
45-
"general", getURL().toString());
46-
assayDesignerPage.goToBatchFields().removeAllFields(true);
46+
"general", "");
4747
// add by path so the absolute path is stored; this allows reproducing the missing parent dir scenario
4848
assayDesignerPage.addTransformScript(transformFile);
4949
assayDesignerPage.clickSave();
@@ -78,7 +78,6 @@ public void testMissingParentDirectoryRegression() throws Exception
7878
1\tP1\timport after parent deleted
7979
""";
8080

81-
clickAndWait(Locator.linkWithText(assayName));
8281
new AssayRunsPage(getDriver()).getTable().clickHeaderButtonAndWait("Import Data");
8382
var importPage = new AssayImportPage(getDriver());
8483
importPage.setNamedInputText("Name", "missingParentImport");

src/org/labkey/test/tests/list/ListTest.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,11 @@ public void testCustomViews()
861861

862862
customizeURLTest();
863863
crossContainerLookupTest();
864+
865+
// Prevent crawler errors after the list is deleted
866+
// A Query WebPart for a missing query contains links that will 404
867+
goToProjectHome();
868+
new PortalHelper(this).removeAllWebParts();
864869
}
865870

866871
/* Issue 23487: add regression coverage for batch insert into list with multiple errors
@@ -1128,8 +1133,10 @@ private void filterTest()
11281133
clickProject(PROJECT_VERIFY);
11291134

11301135
PortalHelper portalHelper = new PortalHelper(this);
1131-
portalHelper.addQueryWebPart(null, "lists", LIST_NAME_COLORS, null);
1132-
portalHelper.addQueryWebPart(null, "lists", LIST_NAME_COLORS, null);
1136+
portalHelper.doInAdminMode(ph -> {
1137+
portalHelper.addQueryWebPart(null, "lists", LIST_NAME_COLORS, null);
1138+
portalHelper.addQueryWebPart(null, "lists", LIST_NAME_COLORS, null);
1139+
});
11331140

11341141
log("Test that the right filters are present for each type");
11351142
DataRegionTable region = new DataRegionTable("qwp3", getDriver());

0 commit comments

Comments
 (0)