Skip to content

Commit

Permalink
Merge pull request #9816 from IQSS/9803-basic-search-broken
Browse files Browse the repository at this point in the history
fixes broken basic search (#9803)
  • Loading branch information
kcondon authored Aug 23, 2023
2 parents d14a54c + 8c259b5 commit bf04fda
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public String searchRedirect(String dataverseRedirectPage, Dataverse dataverseIn
qParam = "&q=" + query;
}

return widgetWrapper.wrapURL(dataverseRedirectPage + "?faces-redirect=true&q=" + qParam + optionalDataverseScope);
return widgetWrapper.wrapURL(dataverseRedirectPage + "?faces-redirect=true" + qParam + optionalDataverseScope);

}

Expand Down
12 changes: 7 additions & 5 deletions src/test/java/edu/harvard/iq/dataverse/api/FilesIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -1399,8 +1399,8 @@ public void testGetFileInfo() {
createUser = UtilIT.createRandomUser();
String apiTokenRegular = UtilIT.getApiTokenFromResponse(createUser);

msg("Add tabular file");
String pathToFile = "scripts/search/data/tabular/stata13-auto-withstrls.dta";
msg("Add a non-tabular file");
String pathToFile = "scripts/search/data/binary/trees.png";
Response addResponse = UtilIT.uploadFileViaNative(datasetId.toString(), pathToFile, apiToken);

String dataFileId = addResponse.getBody().jsonPath().getString("data.files[0].dataFile.id");
Expand All @@ -1412,10 +1412,12 @@ public void testGetFileInfo() {

getFileDataResponse.prettyPrint();
getFileDataResponse.then().assertThat()
.body("data.label", equalTo("stata13-auto-withstrls.dta"))
.body("data.dataFile.filename", equalTo("stata13-auto-withstrls.dta"))
.body("data.label", equalTo("trees.png"))
.body("data.dataFile.filename", equalTo("trees.png"))
.body("data.dataFile.contentType", equalTo("image/png"))
.body("data.dataFile.filesize", equalTo(8361))
.statusCode(OK.getStatusCode());

getFileDataResponse = UtilIT.getFileData(dataFileId, apiTokenRegular);
getFileDataResponse.then().assertThat()
.statusCode(BAD_REQUEST.getStatusCode());
Expand Down

0 comments on commit bf04fda

Please sign in to comment.