diff --git a/misc/ext_bottom_line_test_data.py b/misc/ext_bottom_line_test_data.py index 628465fb25393f7b780187f1f51402d4b448c976..1a43094eb6719e2b7b2a6a4ab42d47fcc415d513 100755 --- a/misc/ext_bottom_line_test_data.py +++ b/misc/ext_bottom_line_test_data.py @@ -25,10 +25,10 @@ import os import caosdb import random -import wget filename = "small.webm" if not os.path.isfile(filename): + import wget #pylint: disable=E0401 filename = wget.download("http://techslides.com/demos/sample-videos/small.webm") caosdb.configure_connection(ssl_insecure=True) @@ -53,13 +53,16 @@ testdata = caosdb.Container() refrec = caosdb.Record("TestPreviewRecord-references").add_parent("TestPreviewRecordType") testdata.append(refrec) -video = caosdb.File(name="TestFile", file=filename, path="testfile.webm") +video = caosdb.File(name="TestFileVideo", file=filename, path="testfile.webm") +image = caosdb.File(name="TestFileImage", + file="../src/core/pics/map_tile_caosdb_logo.png", + path="testfile.png") for i in ["load-forever", "fall-back", "error", "success", "success-2"]: rec = caosdb.Record("TestPreviewRecord-{}".format(i)).add_parent("TestPreviewRecordType") testdata.append(rec) refrec.add_property("TestPreviewRecordType", rec) -#testdate.append(image) +testdata.append(image) testdata.append(video) diff --git a/test/core/js/modules/entity.xsl.js b/test/core/js/modules/entity.xsl.js index a853c36556c5482e0bd0b1f751755e88b871d25e..9b790a007435d05d1e9410774bc8c898fe287a16 100644 --- a/test/core/js/modules/entity.xsl.js +++ b/test/core/js/modules/entity.xsl.js @@ -113,27 +113,6 @@ QUnit.test("Property with Permissions tag and type='ExperimentSeries' is recogni assert.equal(link_e.getAttribute("href"), "/entitypath/129950", "href location"); }); -QUnit.test("File path is not converted to lower case.", function(assert) { - let xml_str = '<File path="UPPERCASE.JPG" id="1234"></File>'; - let xml = str2xml(xml_str); - let html = applyTemplates(xml, this.entityXSL, 'entities'); - - // inject an entrance rule - //var xsl_tmp = injectTemplate(this.entityXSL, '<xsl:template match="/"><xsl:apply-templates select="File" mode="top-level-data"/></xsl:template>'); - - - //var params = { - // entitypath: "/entitypath/", - // filesystempath: "/filesystempath/" - //}; - //var html = xslt(xml, xsl, params); - assert.ok(html, "html is ok."); - - var link_e = html.firstElementChild.getElementsByTagName("IMG")[0] - assert.ok(link_e, "<img> tag is there."); - assert.equal(link_e.getAttribute("src"), "/filesystempath/UPPERCASE.JPG", "src location is UPPERCASE.JPG"); -}); - QUnit.test("back references", function(assert) { // inject an entrance rule var xsl = injectTemplate(this.entityXSL, '<xsl:template match="/"><xsl:apply-templates select="*/@id" mode="backreference-link"/></xsl:template>');