From ae883fa4dc9dba2a922db2d1d849f6e272b91c5e Mon Sep 17 00:00:00 2001 From: Marty Pradere Date: Sun, 24 Aug 2025 20:45:42 -0700 Subject: [PATCH] file repo update and test --- .../resources/web/snprc_ehr/snprcReports.js | 4 +++- .../test/tests/snprc_ehr/SNPRC_EHRTest.java | 20 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/snprc_ehr/resources/web/snprc_ehr/snprcReports.js b/snprc_ehr/resources/web/snprc_ehr/snprcReports.js index c6db85146..da9e1bd33 100644 --- a/snprc_ehr/resources/web/snprc_ehr/snprcReports.js +++ b/snprc_ehr/resources/web/snprc_ehr/snprcReports.js @@ -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); } diff --git a/snprc_ehr/test/src/org/labkey/test/tests/snprc_ehr/SNPRC_EHRTest.java b/snprc_ehr/test/src/org/labkey/test/tests/snprc_ehr/SNPRC_EHRTest.java index 24210e098..3e0f5edc2 100644 --- a/snprc_ehr/test/src/org/labkey/test/tests/snprc_ehr/SNPRC_EHRTest.java +++ b/snprc_ehr/test/src/org/labkey/test/tests/snprc_ehr/SNPRC_EHRTest.java @@ -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"; @@ -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"}); } @@ -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() {