diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/test/UserTests.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/test/UserTests.js index 225a541296e23d0bbcc65477616808fd52c0b2ba..190787216b1dcd5825e324316bd581a7d38d5be0 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/test/UserTests.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/test/UserTests.js @@ -10,6 +10,8 @@ var UserTests = new function() { .then(() => this.creationSampleForm()) //7. Sample Form - Edit: Add a Photo and Parents/Children .then(() => this.editSampleForm()) + // 8. Sample Hierarchy as Graph + .then(() => this.sampleHierarchyAsGraph()) //13. Inventory Table - Imports for Create - Automatic Codes .then(() => this.importsAutomaticCodes()) //14. Inventory Table - Imports for Create - Given Codes @@ -174,6 +176,23 @@ var UserTests = new function() { }); } + this.sampleHierarchyAsGraph = function() { + return new Promise(function executor(resolve, reject) { + var e = EventUtil; + Promise.resolve().then(() => e.waitForId("options-menu-btn-sample-view-bacteria")) + .then(() => e.click("options-menu-btn-sample-view-bacteria")) + // show Hierarchy Graph + .then(() => e.waitForId("hierarchy-graph")) + .then(() => e.click("hierarchy-graph")) + // check parents and children + .then(() => e.waitForId("bac1")) + .then(() => e.waitForId("bac2")) + .then(() => e.waitForId("bac3")) + .then(() => e.waitForId("bac4")) + .then(() => resolve()); + }); + } + this.importsAutomaticCodes = function() { var baseURL = location.protocol + '//' + location.host + location.pathname; var pathToResource = "js/test/resources/bacteria_for_test_without_identifier.tsv"; diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js index f9cd29ef8287f469006da8acd8132a87ef68f358..1164bdab6e635982875147063a716b757e70e1c0 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js @@ -312,8 +312,9 @@ function SampleHierarchy(serverFacade, views, profile, sample) { })); var nameLabel = Util.getDisplayNameForEntity(sample); + var id = sample.code.toLowerCase(); - var $sampleLink = $('<a>', { 'href' : "javascript:mainController.changeView('showViewSamplePageFromPermId', '" + sample.permId + "')"}).text(nameLabel); + var $sampleLink = $('<a>', { 'id' : id, 'href' : "javascript:mainController.changeView('showViewSamplePageFromPermId', '" + sample.permId + "')"}).text(nameLabel); if(sample.showLabel || (sample.permId === rootPermId)) {