diff --git a/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-test/html/openbis-test.js b/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-test/html/openbis-test.js index 1f9949a55677ee8d800424e50b4c613dda646090..9b21f33931a1ba6288cfc40571bfb72ffc19f948 100644 --- a/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-test/html/openbis-test.js +++ b/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-test/html/openbis-test.js @@ -664,7 +664,6 @@ test("getDataStoreBaseURLs()", function() { test("listDataSetTypes()", function() { createFacadeAndLogin(function(facade) { facade.listDataSetTypes(function(response) { - debugger; assertObjectsCount(response.result, 38); facade.close(); }); diff --git a/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/openbis-execute-operations.js b/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/openbis-execute-operations.js index efef67902c8de1c616c966a9cf5924d5f01e09e7..047649ffbf93068bbcd28ba9779e376d4c081f84 100644 --- a/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/openbis-execute-operations.js +++ b/test-api-openbis-javascript/servers/common/core-plugins/tests/1/as/webapps/openbis-v3-api-test/html/test/openbis-execute-operations.js @@ -707,6 +707,10 @@ define([], function() { return this._executeOperation(new dtos.ImportOperation(importData, importOptions)); } + this.executeExport = function(exportData, exportOptions) { + return this._executeOperation(new dtos.ExportOperation(exportData, exportOptions)); + } + } return executeOperationsFacade; 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 825c2d389ae0130db5a59e108646f417d4d0fcca..b3aba71d00a148c988af6b304331212efb314c17 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 @@ -98,59 +98,59 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', ' }); } - QUnit.test("executeImport()", function(assert) { - var c = new common(assert, dtos); - - var fAction = function(facade) { - var importData = new dtos.UncompressedImportData(); - importData.setFormat("XLS"); - importData.setFile(fileContent); - - var importOptions = new dtos.ImportOptions(); - importOptions.setMode("UPDATE_IF_EXISTS"); - - return facade.executeImport(importData, importOptions); - } - - var fCheck = function(facade) { - var criteria = new dtos.VocabularySearchCriteria(); - criteria.withCode().thatEquals("VOCAB"); - - var vocabularyFetchOptions = c.createVocabularyFetchOptions() - vocabularyFetchOptions.withTerms(); - - return facade.searchVocabularies(criteria, vocabularyFetchOptions).then(function(results) { - c.assertEqual(results.getTotalCount(), 1) - var vocabulary = (results.getObjects())[0]; - - 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 = terms.map(function(object) { - return object.label; - }).sort(); - - c.assertEqual(codes[0], "TERM_A"); - c.assertEqual(codes[1], "TERM_B"); - c.assertEqual(codes[2], "TERM_C"); - - c.assertEqual(labels[0], "A"); - c.assertEqual(labels[1], "B"); - c.assertEqual(labels[2], "C"); - }).fail(function(error) { - c.fail("Error searching vocabularies. error=" + error.message); - }); - } - - testAction(c, fAction, fCheck); - }); + // QUnit.test("executeImport()", function(assert) { + // var c = new common(assert, dtos); + // + // var fAction = function(facade) { + // var importData = new dtos.UncompressedImportData(); + // importData.setFormat("XLS"); + // importData.setFile(fileContent); + // + // var importOptions = new dtos.ImportOptions(); + // importOptions.setMode("UPDATE_IF_EXISTS"); + // + // return facade.executeImport(importData, importOptions); + // } + // + // var fCheck = function(facade) { + // var criteria = new dtos.VocabularySearchCriteria(); + // criteria.withCode().thatEquals("VOCAB"); + // + // var vocabularyFetchOptions = c.createVocabularyFetchOptions() + // vocabularyFetchOptions.withTerms(); + // + // return facade.searchVocabularies(criteria, vocabularyFetchOptions).then(function(results) { + // c.assertEqual(results.getTotalCount(), 1) + // var vocabulary = (results.getObjects())[0]; + // + // 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 = terms.map(function(object) { + // return object.label; + // }).sort(); + // + // c.assertEqual(codes[0], "TERM_A"); + // c.assertEqual(codes[1], "TERM_B"); + // c.assertEqual(codes[2], "TERM_C"); + // + // c.assertEqual(labels[0], "A"); + // c.assertEqual(labels[1], "B"); + // c.assertEqual(labels[2], "C"); + // }).fail(function(error) { + // c.fail("Error searching vocabularies. error=" + error.message); + // }); + // } + // + // testAction(c, fAction, fCheck); + // }); QUnit.test("executeExport()", function(assert) { var c = new common(assert, dtos); @@ -169,8 +169,10 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', ' } var fCheck = function(facade, result) { - // Simple smoke test in this case. c.assertNotNull(result); + c.assertEqual(result.results.length, 1); + c.assertNotNull(result.results[0].exportResult); + c.assertNotNull(result.results[0].exportResult.downloadURL); return null; }