Skip to content

Commit 24b2f3c

Browse files
authored
Improve JBrowse lucene test coverage (#211)
1 parent f0fbb11 commit 24b2f3c

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

jbrowse/src/client/JBrowse/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ export async function fetchFieldTypeInfo(sessionId: string, trackId: string, suc
502502
url: ActionURL.buildURL('jbrowse', 'getIndexedFields.api'),
503503
method: 'GET',
504504
success: async function(res){
505-
const fields: Array<FieldModel> = JSON.parse(res.response).fields;
505+
const fields: Array<FieldModel> = JSON.parse(res.response).fields.map((f) => Object.assign(new FieldModel(), f ))
506506

507507
successCallback(fields)
508508
},

jbrowse/test/src/org/labkey/test/tests/external/labModules/JBrowseTest.java

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,16 +1150,7 @@ private void testFullTextSearch() throws Exception
11501150
Assert.assertEquals("A", jsonObject.getString("ref"));
11511151
}
11521152

1153-
getArtifactCollector().dumpPageSnapshot("JBrowseLuceneIndexPage");
1154-
1155-
beginAt("/query/" + getProjectName() + "/executeQuery.view?query.queryName=jsonfiles&schemaName=jbrowse");
1156-
final DataRegionTable drt = DataRegionTable.DataRegion(getDriver()).find();
1157-
drt.checkAllOnPage();
1158-
doAndWaitForPageToLoad(() ->
1159-
{
1160-
drt.clickHeaderButton("Delete");
1161-
assertAlert("Are you sure you want to delete the selected rows?");
1162-
});
1153+
testLuceneSearchUI(sessionId, trackId);
11631154
}
11641155

11651156
private void testOutputFileProcessing() throws Exception
@@ -1282,9 +1273,8 @@ private void testOutputFileProcessing() throws Exception
12821273
waitForElement(Locator.tagWithText("span", "fakeData.gff").withClass("MuiTypography-root"));
12831274
waitForElement(Locator.tagWithText("span", "fakeData.bed").withClass("MuiTypography-root"));
12841275

1285-
// TODO restore this
12861276
//Now test search
1287-
//testSearch(sessionId);
1277+
testSearch(sessionId);
12881278
}
12891279

12901280
private void testSearch(String sessionId) throws Exception
@@ -1523,8 +1513,10 @@ private void testVariantTableComparators() throws Exception {
15231513
waitAndClick(Locator.tagWithAttributeContaining("button", "aria-label", "Show filters"));
15241514
}
15251515

1526-
private void testLuceneSearchUI()
1516+
private void testLuceneSearchUI(String sessionId, String trackId)
15271517
{
1528-
//TODO: actually test the grid UI
1518+
beginAt("/" + getProjectName() + "/jbrowse-variantSearch.view?session=" + sessionId + "&trackId=" + trackId);
1519+
1520+
waitForElement(Locator.tagWithText("span", "0.029"));
15291521
}
15301522
}

0 commit comments

Comments
 (0)