Skip to content
Snippets Groups Projects
Commit b96097a0 authored by vkovtun's avatar vkovtun
Browse files

SSDM-13926: Fixing the failing JS test.

parent f2d7a7b3
No related branches found
No related tags found
1 merge request!40SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
...@@ -17,7 +17,9 @@ ...@@ -17,7 +17,9 @@
define(["stjs", "as/dto/common/operation/IOperation"], define(["stjs", "as/dto/common/operation/IOperation"],
function (stjs, IOperation) { function (stjs, IOperation) {
var ImportOperation = function() { var ImportOperation = function(importData, importOptions) {
this.importData = importData;
this.importOptions = importOptions;
} }
stjs.extend( stjs.extend(
...@@ -39,17 +41,9 @@ define(["stjs", "as/dto/common/operation/IOperation"], ...@@ -39,17 +41,9 @@ define(["stjs", "as/dto/common/operation/IOperation"],
return this.importData; return this.importData;
}; };
prototype.setImportData = function(importData) {
this.importData = importData;
};
prototype.getImportOptions = function() { prototype.getImportOptions = function() {
return this.importOptions; return this.importOptions;
}; };
prototype.setImportOptions = function(importOptions) {
this.importOptions = importOptions;
};
}, },
{ {
importData: "IImportData", importData: "IImportData",
......
...@@ -124,7 +124,8 @@ public class ImportExecutor implements IImportExecutor ...@@ -124,7 +124,8 @@ public class ImportExecutor implements IImportExecutor
} }
} else } else
{ {
throw UserFailureException.fromTemplate("Unknown instance of import data '%s'.", importData.getClass().getName()); throw UserFailureException.fromTemplate("Unknown instance of import data '%s'.",
importData != null ? importData.getClass().getName() : null);
} }
} catch (final IOException e) } catch (final IOException e)
{ {
......
...@@ -102,8 +102,13 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', ' ...@@ -102,8 +102,13 @@ define([ 'jquery', 'underscore', 'openbis', 'test/openbis-execute-operations', '
var c = new common(assert, openbis); var c = new common(assert, openbis);
var fAction = function(facade) { var fAction = function(facade) {
var importData = new c.UncompressedImportData("XLS", fileContent, null); var importData = new c.UncompressedImportData();
var importOptions = new c.ImportOptions("UPDATE_IF_EXISTS"); importData.setFormat("XLS");
importData.setFile(fileContent);
var importOptions = new c.ImportOptions();
importOptions.setMode("UPDATE_IF_EXISTS");
return facade.executeImport(importData, importOptions); return facade.executeImport(importData, importOptions);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment