Skip to content

Commit 83964f6

Browse files
File repo perf improvement (#846)
* Set file root * Add file repo test
1 parent c289f3a commit 83964f6

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

snprc_ehr/resources/web/snprc_ehr/snprcReports.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,9 @@ EHR.reports.FileRepository = function(panel,tab) {
324324
partName: 'Files',
325325
renderTo: 'filesDiv-body',
326326
containerPath: containerPath,
327-
partConfig: {path: location},
327+
partConfig: {
328+
fileRoot: `@files/${location}`
329+
},
328330
success: function () {
329331
panel.setHeight(450);
330332
}

snprc_ehr/test/src/org/labkey/test/tests/snprc_ehr/SNPRC_EHRTest.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public class SNPRC_EHRTest extends AbstractGenericEHRTest implements SqlserverOn
9393
private static final File ANIMAL_GROUP_CATEGORIES_TSV = TestFileUtils.getSampleData("snprc/animal_group_categories.tsv");
9494
private static final File SPECIES_TSV = TestFileUtils.getSampleData("snprc/species.tsv");
9595
private static final String PROJECT_NAME = "SNPRC";
96+
private static final String FILEREPOSITORY = "FileRepository";
9697
private static final String COREFACILITIES = "Core Facilities";
9798
private static final String GENETICSFOLDER = "Genetics";
9899
private static final String FOLDER_NAME = "SNPRC";
@@ -130,6 +131,7 @@ public String getContainerPath()
130131
protected void createProjectAndFolders(String type)
131132
{
132133
_containerHelper.createProject(getProjectName(), type);
134+
_containerHelper.createSubfolder(getProjectName(), getProjectName(), FILEREPOSITORY, "File Sharing", null);
133135
_containerHelper.createSubfolder(getProjectName(), getProjectName(), COREFACILITIES, "Collaboration", null);
134136
_containerHelper.createSubfolder(getProjectName(), COREFACILITIES, GENETICSFOLDER, "Laboratory Folder", new String[]{"SNPRC_Genetics"});
135137
}
@@ -423,6 +425,24 @@ public void preTest()
423425
waitForElement(Locator.linkWithText("Browse All"));
424426
}
425427

428+
@Test
429+
public void testFileRepository()
430+
{
431+
goToAnimalHistory();
432+
433+
SNPRCAnimalHistoryPage historyPage = new SNPRCAnimalHistoryPage(getDriver());
434+
historyPage.searchSingleAnimal("TEST3621582");
435+
historyPage.clickCategoryTab("General");
436+
historyPage.clickReportTab("File Repository");
437+
438+
waitForText("No directory found for this animal. To upload files, you must create the folders first.");
439+
waitForElement(Ext4Helper.Locators.ext4Button("Create Folders"));
440+
click(Ext4Helper.Locators.ext4Button("Create Folders"));
441+
442+
waitForText("Anesthesia Reports", "Cardiology Docs", "Dental Records", "Images", "Lab Reports", "Misc Docs", "Pathology Reports", "Procurement Docs", "Radiology Reports", "Surgery Sheets");
443+
444+
}
445+
426446
@Test
427447
public void testAnimalSearch()
428448
{

0 commit comments

Comments
 (0)