Commit 068c3368 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

type included in header is properly assigned

parent 76740d17
Pipeline #14032 passed with stage
in 12 minutes and 42 seconds
......@@ -21,6 +21,8 @@ minerva (14.0.0~beta.2) unstable; urgency=low
create data overlay (#939)
* Bug fix: export to CD could misalign reaction lines that were imported from
format that didn't require reaction line to be attached to the species (#933)
* Bug fix: problem with uploading data_overlays with type included in header
(#936)
-- Piotr Gawron <piotr.gawron@uni.lu> Mon, 16 Sep 2019 21:00:00 +0200
......
......@@ -164,6 +164,7 @@ AddOverlayDialog.prototype.processFile = function (file) {
}
if (overlay.getType() !== undefined) {
var typeSelect = $("[name='overlay-type']", self.getElement())[0];
if ($("option[value='" + overlay.getType() + "']", typeSelect).length === 0) {
GuiConnector.warn("Invalid type: " + overlay.getType());
}
......
......@@ -76,6 +76,19 @@ describe('AddOverlayDialog', function () {
assert.equal("GENERIC", dialog.getType());
});
});
it('set type from header', function () {
var dialog;
return ServerConnector.getProject().then(function (project) {
dialog = createDialog(project);
return dialog.init();
}).then(function () {
return helper.stringToBlob("#TYPE=GENETIC_VARIANT\ns1\n");
}).then(function (file) {
return dialog.processFile(file);
}).then(function () {
assert.equal("GENETIC_VARIANT", dialog.getType());
});
});
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment