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
4 changes: 3 additions & 1 deletion snprc_ehr/resources/web/snprc_ehr/snprcReports.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,9 @@ EHR.reports.FileRepository = function(panel,tab) {
partName: 'Files',
renderTo: 'filesDiv-body',
containerPath: containerPath,
partConfig: {path: location},
partConfig: {
fileRoot: `@files/${location}`
},
success: function () {
panel.setHeight(450);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public class SNPRC_EHRTest extends AbstractGenericEHRTest implements SqlserverOn
private static final File ANIMAL_GROUP_CATEGORIES_TSV = TestFileUtils.getSampleData("snprc/animal_group_categories.tsv");
private static final File SPECIES_TSV = TestFileUtils.getSampleData("snprc/species.tsv");
private static final String PROJECT_NAME = "SNPRC";
private static final String FILEREPOSITORY = "FileRepository";
private static final String COREFACILITIES = "Core Facilities";
private static final String GENETICSFOLDER = "Genetics";
private static final String FOLDER_NAME = "SNPRC";
Expand Down Expand Up @@ -130,6 +131,7 @@ public String getContainerPath()
protected void createProjectAndFolders(String type)
{
_containerHelper.createProject(getProjectName(), type);
_containerHelper.createSubfolder(getProjectName(), getProjectName(), FILEREPOSITORY, "File Sharing", null);
_containerHelper.createSubfolder(getProjectName(), getProjectName(), COREFACILITIES, "Collaboration", null);
_containerHelper.createSubfolder(getProjectName(), COREFACILITIES, GENETICSFOLDER, "Laboratory Folder", new String[]{"SNPRC_Genetics"});
}
Expand Down Expand Up @@ -423,6 +425,24 @@ public void preTest()
waitForElement(Locator.linkWithText("Browse All"));
}

@Test
public void testFileRepository()
{
goToAnimalHistory();

SNPRCAnimalHistoryPage historyPage = new SNPRCAnimalHistoryPage(getDriver());
historyPage.searchSingleAnimal("TEST3621582");
historyPage.clickCategoryTab("General");
historyPage.clickReportTab("File Repository");

waitForText("No directory found for this animal. To upload files, you must create the folders first.");
waitForElement(Ext4Helper.Locators.ext4Button("Create Folders"));
click(Ext4Helper.Locators.ext4Button("Create Folders"));

waitForText("Anesthesia Reports", "Cardiology Docs", "Dental Records", "Images", "Lab Reports", "Misc Docs", "Pathology Reports", "Procurement Docs", "Radiology Reports", "Surgery Sheets");

}

@Test
public void testAnimalSearch()
{
Expand Down