diff --git a/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/index.html b/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/index.html index 89e5b14b6d5d5db13d82ce87ebe604fe9d205ce5..6e0e0f5b7fba84c272cc9f55c1ea11679f81cd34 100644 --- a/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/index.html +++ b/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/index.html @@ -15,7 +15,7 @@ require.paths["test/qunit-report"] = testPath + "/lib/qunit/js/qunit-reporter-junit"; require.paths["test/naturalsort"] = testPath + "/lib/naturalsort/js/naturalSort"; - require.urlArgs = 'now=' + Date.now(); + // require.urlArgs = 'now=' + Date.now(); require.shim["test/qunit-report"] = { deps : [ 'test/qunit' ] diff --git a/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js b/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js index c891ce30216f07ce34dff42bda13a588c4cb9639..718a7a2ee53aa4ffe68aa3bde5aa715a9d389ac1 100644 --- a/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js +++ b/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/common.js @@ -220,6 +220,9 @@ define([ 'jquery', 'openbis', 'underscore', 'test/dtos' ], function($, defaultOp this.PluginUpdate = dtos.PluginUpdate; this.WebAppSettings = dtos.WebAppSettings; + this.VocabularyDeletionOptions = dtos.VocabularyDeletionOptions; + this.VocabularyTermDeletionOptions = dtos.VocabularyTermDeletionOptions; + // operations this.GetSessionInformationOperation = dtos.GetSessionInformationOperation; diff --git a/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-import-export.js b/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-import-export.js index 8b090721d0137fdb00013fbffd680fa6adee0bca..2c046b792f214b4ed9378c1895bf5c9938dccec5 100644 --- a/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-import-export.js +++ b/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/test-import-export.js @@ -110,15 +110,22 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', ' var fCheck = function(facade) { var criteria = new c.VocabularySearchCriteria(); criteria.withCode().thatEquals("VOCAB"); - facade.searchVocabularies(criteria, c.createVocabularyFetchOptions()).then(function(results) { - c.assertEqual(results.getTotalCount(), 3) - var objects = results.getObjects(); + criteria.withTerms(); + return facade.searchVocabularies(criteria, c.createVocabularyFetchOptions()).then(function(results) { + c.assertEqual(results.getTotalCount(), 1) + var vocabulary = (results.getObjects())[0]; - var codes = objects.map(function(object) { + c.assertEqual(vocabulary.code, "VOCAB"); + + var terms = vocabulary.getTerms(); + + c.assertEqual(terms.length, 3) + + var codes = terms.map(function(object) { return object.code; }).sort(); - var labels = objects.map(function(object) { + var labels = terms.map(function(object) { return object.label; }).sort(); @@ -129,6 +136,14 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', ' c.assertEqual(labels[0], "A"); c.assertEqual(labels[1], "B"); c.assertEqual(labels[2], "C"); + + // var options = new c.VocabularyTermDeletionOptions(); + // options.setReason("test reason"); + // facade.deleteVocabularyTerms([ "TERM_A", "TERM_B", "TERM_C" ], options); + // + // var options = new c.VocabularyDeletionOptions(); + // options.setReason("test reason"); + // facade.deleteVocabularies([ "VOCAB" ], options); }).fail(function(error) { c.fail("Error searching vocabularies. error=" + error.message); });