diff --git a/server-application-server/source/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/FileServerUtils.java b/server-application-server/source/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/FileServerUtils.java index 4321114f5b109a7ef16ac900a0399f5ddd1be07a..32160bd9de0a396a03be4b4d471dfbcb514a3d24 100644 --- a/server-application-server/source/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/FileServerUtils.java +++ b/server-application-server/source/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/FileServerUtils.java @@ -12,16 +12,28 @@ public class FileServerUtils { private static Path getFilePath(String filePath) throws IOException { - String repositoryPathAsString = CommonServiceProvider.tryToGetProperty( - FileServiceServlet.REPO_PATH_KEY); - String repositoryFilePathAsString = repositoryPathAsString + filePath; - Path repositoryPath = Path.of(new File(repositoryPathAsString).getCanonicalPath()); - Path repositoryFilePath = Path.of(new File(repositoryFilePathAsString).getCanonicalPath()); - //Security Test that repositoryFilePath is indeed inside repositoryPath - if(!repositoryFilePath.startsWith(repositoryPath)) { - throw new IllegalArgumentException("File Path is not inside the Repository Path"); + if (CommonServiceProvider.getApplicationContext() != null) + { + // Runtime mode. + String repositoryPathAsString = CommonServiceProvider.tryToGetProperty( + FileServiceServlet.REPO_PATH_KEY); + String repositoryFilePathAsString = repositoryPathAsString + filePath; + Path repositoryPath = Path.of(new File(repositoryPathAsString).getCanonicalPath()); + Path repositoryFilePath = Path.of(new File(repositoryFilePathAsString).getCanonicalPath()); + //Security Test that repositoryFilePath is indeed inside repositoryPath + if (!repositoryFilePath.startsWith(repositoryPath)) + { + throw new IllegalArgumentException("File Path is not inside the Repository Path"); + } + + return repositoryFilePath; + } else + { + // Testing mode. + + // Return some default testing path. + return Path.of(new File("./sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/" + filePath).getCanonicalPath()); } - return repositoryFilePath; } public static byte[] read(String filePath) throws IOException diff --git a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/export/SampleCellWithImageReferencesExpectations.java b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/export/SampleCellWithImageReferencesExpectations.java new file mode 100644 index 0000000000000000000000000000000000000000..3641c49cac816330be63efcfdf76e11ee7eda1c9 --- /dev/null +++ b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/export/SampleCellWithImageReferencesExpectations.java @@ -0,0 +1,235 @@ +/* + * Copyright ETH 2022 - 2024 Zürich, Scientific IT Services + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package ch.ethz.sis.openbis.generic.server.xls.export; + +import java.util.Arrays; +import java.util.Calendar; +import java.util.Date; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + +import org.jmock.Expectations; +import org.jmock.api.Invocation; +import org.jmock.lib.action.CustomAction; + +import ch.ethz.sis.openbis.generic.asapi.v3.IApplicationServerApi; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.entitytype.EntityKind; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.entitytype.id.EntityTypePermId; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.Experiment; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.experiment.id.ExperimentIdentifier; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.person.Person; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.project.Project; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.project.id.ProjectIdentifier; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.property.DataType; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.property.PropertyAssignment; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.property.PropertyType; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.property.fetchoptions.PropertyAssignmentFetchOptions; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.Sample; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.SampleType; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.fetchoptions.SampleFetchOptions; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.id.SampleIdentifier; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.sample.id.SamplePermId; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.space.Space; +import ch.ethz.sis.openbis.generic.asapi.v3.dto.space.id.SpacePermId; +import ch.systemsx.cisd.openbis.generic.server.business.bo.CollectionMatcher; + +class SampleCellWithImageReferencesExpectations extends Expectations +{ + + public SampleCellWithImageReferencesExpectations(final IApplicationServerApi api, final boolean exportReferred) + { + if (exportReferred) + { + allowing(api).getSamples(with(XLSExportTest.SESSION_TOKEN), + with(new CollectionMatcher<>(List.of(new SamplePermId("200001010000000-0001")))), + with(any(SampleFetchOptions.class))); + } + allowing(api).getSamples(with(XLSExportTest.SESSION_TOKEN), with(new CollectionMatcher<>( + List.of(new SamplePermId("200001010000000-0001")))), with(any(SampleFetchOptions.class)) + ); + + will(new CustomAction("getting samples") + { + + @Override + public Object invoke(final Invocation invocation) throws Throwable + { + final SampleFetchOptions fetchOptions = (SampleFetchOptions) invocation.getParameter(2); + final PropertyAssignment namePropertyAssignment = getNamePropertyAssignment(); + final PropertyAssignment experimentalDescriptionPropertyAssignment = getExperimentalDescriptionPropertyAssignment(); + final PropertyAssignment experimentalGoalsPropertyAssignment = getExperimentalGoalsPropertyAssignment(); + + final SampleType sampleType = new SampleType(); + sampleType.setCode("STORAGE"); + sampleType.setPermId(new EntityTypePermId("STORAGE", EntityKind.SAMPLE)); + sampleType.setFetchOptions(fetchOptions.withType()); + sampleType.setPropertyAssignments(List.of(namePropertyAssignment, experimentalDescriptionPropertyAssignment, + experimentalGoalsPropertyAssignment)); + + final Space space = new Space(); + space.setCode("ELN_SETTINGS"); + space.setPermId(new SpacePermId("ELN_SETTINGS")); + + final Project project = new Project(); + project.setCode("STORAGES"); + project.setIdentifier(new ProjectIdentifier("/ELN_SETTINGS/STORAGES")); + + final Experiment experiment = new Experiment(); + experiment.setCode("STORAGES_COLLECTION"); + experiment.setIdentifier(new ExperimentIdentifier("/ELN_SETTINGS/STORAGES/STORAGES_COLLECTION")); + + final Experiment defaultExperiment = new Experiment(); + defaultExperiment.setCode("DEFAULT"); + defaultExperiment.setIdentifier(new ExperimentIdentifier("/DEFAULT/DEFAULT/DEFAULT")); + + final Calendar calendar = Calendar.getInstance(); + calendar.set(2023, Calendar.MARCH, 10, 17, 23, 44); + final Date registrationDate = calendar.getTime(); + + calendar.set(2023, Calendar.MARCH, 11, 17, 23, 44); + final Date modificationDate = calendar.getTime(); + + final Person registrator = new Person(); + registrator.setUserId("system"); + + final Person modifier = new Person(); + modifier.setUserId("test"); + + final Sample[] samples = new Sample[1]; + + samples[0] = new Sample(); + samples[0].setType(sampleType); + samples[0].setFetchOptions(fetchOptions); + samples[0].setPermId(new SamplePermId("200001010000000-0001")); + samples[0].setCode("BENCH"); + samples[0].setIdentifier(new SampleIdentifier(space.getCode(), project.getCode(), null, "BENCH")); + samples[0].setSpace(space); + samples[0].setProject(project); + samples[0].setExperiment(experiment); + samples[0].setProperty("$NAME", "<p>This is some text.</p>" + + "<figure class=\"image\">" + + "<img src=\"/openbis/openbis/file-service/eln-lims/7b/77/90/7b77903f-e685-4700-974a-5a5d7e109638/" + + "7b77903f-e685-4700-974a-5a5d7e109638.jpg\">" + + "</figure>" + + "<p>Then we have more text between images.</p>" + + "<figure class=\"image\">" + + "<img src=\"/openbis/openbis/file-service/eln-lims/08/b2/96/08b2968c-1685-4fa8-bef2-f5a80a8210ba/" + + "08b2968c-1685-4fa8-bef2-f5a80a8210ba.jpg\">" + + "</figure>" + + "<p>And some text at the end.</p>"); + samples[0].setProperty("EXPERIMENTAL_STEP.EXPERIMENTAL_DESCRIPTION", "<p>This is some text.</p>" + + "<figure class=\"image\">" + + "<img src=\"/openbis/openbis/file-service/eln-lims/c1/b2/91/" + + "c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.jpg\">" + + "</figure>" + + "<p>Then we have more text between images.</p>" + + "<figure class=\"image\"><img src=\"/openbis/openbis/file-service/eln-lims/46/63/05/" + + "466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.jpg\">" + + "</figure>" + + "<p>And some text at the end.</p>"); + samples[0].setProperty("EXPERIMENTAL_STEP.EXPERIMENTAL_GOALS", "<p>This is some text.</p><figure class=\"image\">" + + "<img src=\"/openbis/openbis/file-service/eln-lims/c0/1b/2e/c01b2e1f-8212-4562-ae8a-9072bf92e687/" + + "c01b2e1f-8212-4562-ae8a-9072bf92e687.jpg\">" + + "</figure>" + + "<p>Then we have more text between images.</p>" + + "<figure class=\"image\">" + + "<img src=\"/openbis/openbis/file-service/eln-lims/f3/e4/0c/f3e40c2e-109c-4191-bed0-2cf931de185a/" + + "f3e40c2e-109c-4191-bed0-2cf931de185a.jpg\">" + + "</figure>" + + "<p>And some text at the end.</p>"); + samples[0].setRegistrator(registrator); + samples[0].setModifier(modifier); + samples[0].setRegistrationDate(registrationDate); + samples[0].setModificationDate(modificationDate); + + return Arrays.stream(samples).collect(Collectors.toMap(Sample::getPermId, Function.identity(), + (sample1, sample2) -> sample2, LinkedHashMap::new)); + } + + private PropertyAssignment getExperimentalDescriptionPropertyAssignment() + { + final PropertyType propertyType = new PropertyType(); + propertyType.setCode("EXPERIMENTAL_STEP.EXPERIMENTAL_DESCRIPTION"); + propertyType.setLabel("Experimental description"); + propertyType.setDescription("Experimental description"); + propertyType.setDataType(DataType.MULTILINE_VARCHAR); + propertyType.setManagedInternally(false); + propertyType.setMetaData(Map.of("custom_widget", "Word Processor")); + + final PropertyAssignment propertyAssignment = new PropertyAssignment(); + propertyAssignment.setFetchOptions(getPropertyAssignmentFetchOptions()); + propertyAssignment.setPropertyType(propertyType); + propertyAssignment.setMandatory(false); + propertyAssignment.setShowInEditView(true); + propertyAssignment.setSection("General info"); + + return propertyAssignment; + } + + private PropertyAssignment getExperimentalGoalsPropertyAssignment() + { + final PropertyType propertyType = new PropertyType(); + propertyType.setCode("EXPERIMENTAL_STEP.EXPERIMENTAL_GOALS"); + propertyType.setLabel("Experimental goals"); + propertyType.setDescription("Experimental goals"); + propertyType.setDataType(DataType.MULTILINE_VARCHAR); + propertyType.setManagedInternally(false); + propertyType.setMetaData(Map.of("custom_widget", "")); // No "Word Processor" for this one. + + final PropertyAssignment propertyAssignment = new PropertyAssignment(); + propertyAssignment.setFetchOptions(getPropertyAssignmentFetchOptions()); + propertyAssignment.setPropertyType(propertyType); + propertyAssignment.setMandatory(false); + propertyAssignment.setShowInEditView(true); + propertyAssignment.setSection("General info"); + + return propertyAssignment; + } + + private PropertyAssignment getNamePropertyAssignment() + { + final PropertyType propertyType = new PropertyType(); + propertyType.setCode("$NAME"); + propertyType.setLabel("Name"); + propertyType.setDescription("Name"); + propertyType.setDataType(DataType.VARCHAR); + propertyType.setManagedInternally(true); + + final PropertyAssignment propertyAssignment = new PropertyAssignment(); + propertyAssignment.setFetchOptions(getPropertyAssignmentFetchOptions()); + propertyAssignment.setPropertyType(propertyType); + propertyAssignment.setMandatory(false); + propertyAssignment.setShowInEditView(true); + propertyAssignment.setSection("General info"); + + return propertyAssignment; + } + + private PropertyAssignmentFetchOptions getPropertyAssignmentFetchOptions() + { + final PropertyAssignmentFetchOptions fetchOptions = new PropertyAssignmentFetchOptions(); + fetchOptions.withPropertyType(); + return fetchOptions; + } + + }); + } + +} diff --git a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/export/XLSExportTest.java b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/export/XLSExportTest.java index e7e215a9ab755c01e38949c70b8d0f92665b6272..1902171de4d52df00ea6a23bd892672f84b9f923 100644 --- a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/export/XLSExportTest.java +++ b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/export/XLSExportTest.java @@ -27,6 +27,7 @@ import static ch.ethz.sis.openbis.generic.server.xls.export.ExportableKind.SPACE import static ch.ethz.sis.openbis.generic.server.xls.export.ExportableKind.VOCABULARY_TYPE; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import static org.testng.Assert.fail; @@ -315,6 +316,45 @@ public class XLSExportTest assertTrue(entry.getValue().length() > Short.MAX_VALUE); } + /** + * Tests export of cells that contain references to images. + */ + @Test + public void testImageReferencesExport() throws IOException + { + final Expectations expectations = new SampleCellWithImageReferencesExpectations(api, false); + mockery.checking(expectations); + + final XLSExport.PrepareWorkbookResult actualResult = XLSExport.prepareWorkbook( + api, SESSION_TOKEN, List.of(new ExportablePermId(SAMPLE, new SpacePermId("200001010000000-0001"))), + false, null, XLSExport.TextFormatting.RICH, false); + assertTrue(actualResult.getScripts().isEmpty()); + assertTrue(actualResult.getWarnings().isEmpty()); + + final InputStream stream = getClass().getClassLoader().getResourceAsStream( + "ch/ethz/sis/openbis/generic/server/xls/export/resources/export-sample-cell-with-images.xlsx"); + if (stream == null) + { + throw new IllegalArgumentException("File not found."); + } + final Workbook expectedResult = new XSSFWorkbook(stream); + + assertWorkbooksEqual(actualResult.getWorkbook(), expectedResult); + + final Map<String, byte[]> miscellaneousFiles = actualResult.getMiscellaneousFiles(); + assertEquals(miscellaneousFiles.size(), 2); + + final byte[] bytes1 = miscellaneousFiles.get( + "/eln-lims/c1/b2/91/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.jpg"); + assertNotNull(bytes1); + assertTrue(bytes1.length > 0); + + final byte[] bytes2 = miscellaneousFiles.get( + "/eln-lims/46/63/05/466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.jpg"); + assertNotNull(bytes2); + assertTrue(bytes2.length > 0); + } + public static void assertWorkbooksEqual(final Workbook actual, final Workbook expected) { final int sheetsCount = expected.getNumberOfSheets(); diff --git a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/export/resources/export-sample-cell-with-images.xlsx b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/export/resources/export-sample-cell-with-images.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..f00d88847ff9b6315a45860ac3041e5ed538b45b Binary files /dev/null and b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/export/resources/export-sample-cell-with-images.xlsx differ diff --git a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/08/b2/96/08b2968c-1685-4fa8-bef2-f5a80a8210ba/08b2968c-1685-4fa8-bef2-f5a80a8210ba.jpg b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/08/b2/96/08b2968c-1685-4fa8-bef2-f5a80a8210ba/08b2968c-1685-4fa8-bef2-f5a80a8210ba.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6d8ec8295aa19b98e988b78fe80589f074093c0b Binary files /dev/null and b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/08/b2/96/08b2968c-1685-4fa8-bef2-f5a80a8210ba/08b2968c-1685-4fa8-bef2-f5a80a8210ba.jpg differ diff --git a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/46/63/05/466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.jpg b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/46/63/05/466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8aa05a903eb514b3ff15360224fa08eb1572c382 Binary files /dev/null and b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/46/63/05/466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.jpg differ diff --git a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/7b/77/90/7b77903f-e685-4700-974a-5a5d7e109638/7b77903f-e685-4700-974a-5a5d7e109638.jpg b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/7b/77/90/7b77903f-e685-4700-974a-5a5d7e109638/7b77903f-e685-4700-974a-5a5d7e109638.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7a5fc4fea3bf3674bbb03899d0543a6435136481 Binary files /dev/null and b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/7b/77/90/7b77903f-e685-4700-974a-5a5d7e109638/7b77903f-e685-4700-974a-5a5d7e109638.jpg differ diff --git a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/c0/1b/2e/c01b2e1f-8212-4562-ae8a-9072bf92e687/c01b2e1f-8212-4562-ae8a-9072bf92e687.jpg b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/c0/1b/2e/c01b2e1f-8212-4562-ae8a-9072bf92e687/c01b2e1f-8212-4562-ae8a-9072bf92e687.jpg new file mode 100644 index 0000000000000000000000000000000000000000..84982a7f5ad33f8007d0c4d0c717a74f83f40e99 Binary files /dev/null and b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/c0/1b/2e/c01b2e1f-8212-4562-ae8a-9072bf92e687/c01b2e1f-8212-4562-ae8a-9072bf92e687.jpg differ diff --git a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/c1/b2/91/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.jpg b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/c1/b2/91/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3aa5eb678b062528ca65fb5ec36d7a0a03cc8d84 Binary files /dev/null and b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/c1/b2/91/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.jpg differ diff --git a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/f3/e4/0c/f3e40c2e-109c-4191-bed0-2cf931de185a/f3e40c2e-109c-4191-bed0-2cf931de185a.jpg b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/f3/e4/0c/f3e40c2e-109c-4191-bed0-2cf931de185a/f3e40c2e-109c-4191-bed0-2cf931de185a.jpg new file mode 100644 index 0000000000000000000000000000000000000000..edebcbbb14886824e27097008c6f35e88cf593df Binary files /dev/null and b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/generic/server/xls/importer/utils/eln-lims/f3/e4/0c/f3e40c2e-109c-4191-bed0-2cf931de185a/f3e40c2e-109c-4191-bed0-2cf931de185a.jpg differ diff --git a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/ExportTest.java b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/ExportTest.java index 49597cd9290cdfc878efb4c99b9267841c6e2bf7..a12126bfed96481d4e29044b8da124f76a6ac302 100644 --- a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/ExportTest.java +++ b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/ExportTest.java @@ -287,11 +287,11 @@ public class ExportTest extends AbstractTest bigCellSampleCreation.setProperty(RICH_TEXT_PROPERTY_NAME, "<p>This is some text.</p>" + "<figure class=\"image\">" + "<img src=\"/openbis/openbis/file-service/eln-lims/c1/b2/91/" - + "c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.png\">" + + "c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.jpg\">" + "</figure>" + "<p>Then we have more text between images.</p>" + "<figure class=\"image\"><img src=\"/openbis/openbis/file-service/eln-lims/46/63/05/" - + "466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.png\">" + + "466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.jpg\">" + "</figure>" + "<p>And some text at the end.</p>"); diff --git a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/test_files/export/export-cell-with-images.zip b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/test_files/export/export-cell-with-images.zip index 6cb9fbed15349b09af8aba94ef553532e2a58efc..f14a259218760bf6e30670d7f2f0b8aadd3ef48b 100644 Binary files a/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/test_files/export/export-cell-with-images.zip and b/server-application-server/sourceTest/java/ch/ethz/sis/openbis/systemtest/asapi/v3/test_files/export/export-cell-with-images.zip differ diff --git a/server-application-server/sourceTest/java/eln-lims/46/63/05/466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.jpg b/server-application-server/sourceTest/java/eln-lims/46/63/05/466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8aa05a903eb514b3ff15360224fa08eb1572c382 Binary files /dev/null and b/server-application-server/sourceTest/java/eln-lims/46/63/05/466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.jpg differ diff --git a/server-application-server/sourceTest/java/eln-lims/46/63/05/466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.png b/server-application-server/sourceTest/java/eln-lims/46/63/05/466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.png deleted file mode 100644 index edefc6e57f2b19773b8150526d29d2af0e0a2996..0000000000000000000000000000000000000000 Binary files a/server-application-server/sourceTest/java/eln-lims/46/63/05/466305f0-4842-441f-b21c-777ea82079b4/466305f0-4842-441f-b21c-777ea82079b4.png and /dev/null differ diff --git a/server-application-server/sourceTest/java/eln-lims/c1/b2/91/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.jpg b/server-application-server/sourceTest/java/eln-lims/c1/b2/91/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3aa5eb678b062528ca65fb5ec36d7a0a03cc8d84 Binary files /dev/null and b/server-application-server/sourceTest/java/eln-lims/c1/b2/91/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.jpg differ diff --git a/server-application-server/sourceTest/java/eln-lims/c1/b2/91/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.png b/server-application-server/sourceTest/java/eln-lims/c1/b2/91/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.png deleted file mode 100644 index edefc6e57f2b19773b8150526d29d2af0e0a2996..0000000000000000000000000000000000000000 Binary files a/server-application-server/sourceTest/java/eln-lims/c1/b2/91/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c/c1b2912a-2ed6-40d6-8d9f-8c3ec2b29c5c.png and /dev/null differ