mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #5080 from martenson/lib-to-colllection
Libraries to collections
This commit is contained in:
@@ -176,7 +176,7 @@ var GalaxyLibrary = Backbone.View.extend({
|
||||
mod_toastr.info("You must select at least one dataset to download");
|
||||
Galaxy.libraries.library_router.navigate(`folders/${folder_id}`, { trigger: true, replace: true });
|
||||
} else {
|
||||
Galaxy.libraries.folderToolbarView.download(folder_id, format);
|
||||
Galaxy.libraries.folderToolbarView.download(format);
|
||||
Galaxy.libraries.library_router.navigate(`folders/${folder_id}`, { trigger: false, replace: true });
|
||||
}
|
||||
});
|
||||
|
||||
@@ -278,8 +278,8 @@ var ListCollectionCreator = Backbone.View.extend(BASE_MVC.LoggableMixin)
|
||||
|
||||
/** describe what is wrong with a particular element if anything */
|
||||
_isElementInvalid: function(element) {
|
||||
if (element.history_content_type !== "dataset") {
|
||||
return _l("is not a dataset");
|
||||
if (element.history_content_type === "dataset_collection") {
|
||||
return _l("is a collection, this is not allowed");
|
||||
}
|
||||
var validState = element.state === STATES.OK || _.contains(STATES.NOT_READY_STATES, element.state);
|
||||
if (!validState) {
|
||||
|
||||
@@ -1796,7 +1796,8 @@ var pairedCollectionCreatorModal = function _pairedCollectionCreatorModal(datase
|
||||
oncreate: function(creator, response) {
|
||||
Galaxy.modal.hide();
|
||||
deferred.resolve(response);
|
||||
}
|
||||
},
|
||||
title: _l("Create a collection of paired datasets")
|
||||
});
|
||||
|
||||
if (!window.Galaxy || !Galaxy.modal) {
|
||||
@@ -1805,7 +1806,7 @@ var pairedCollectionCreatorModal = function _pairedCollectionCreatorModal(datase
|
||||
|
||||
creator = new PairedCollectionCreator(options);
|
||||
Galaxy.modal.show({
|
||||
title: _l("Create a collection of paired datasets"),
|
||||
title: options.title,
|
||||
body: creator.$el,
|
||||
width: "80%",
|
||||
height: "800px",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -39,17 +39,16 @@ export var View = Backbone.View.extend({
|
||||
if (!this.visible) {
|
||||
this.visible = true;
|
||||
this.$el.fadeIn("fast");
|
||||
if (this.options.closing_events) {
|
||||
var self = this;
|
||||
$(document).on("keyup.ui-modal", e => {
|
||||
if (e.keyCode == 27) {
|
||||
self.hide(true);
|
||||
}
|
||||
});
|
||||
this.$backdrop.on("click", () => {
|
||||
self.hide(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (this.options.closing_events) {
|
||||
$(document).on("keyup.ui-modal", e => {
|
||||
if (e.keyCode == 27) {
|
||||
this.hide(true);
|
||||
}
|
||||
});
|
||||
this.$backdrop.on("click", () => {
|
||||
this.hide(true);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ th.button_heading{
|
||||
margin-right: 0.2em;
|
||||
}
|
||||
.toolbar-item{
|
||||
margin-left: 1em;
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
}
|
||||
#libraries_element, #folder_items_element{
|
||||
@@ -112,7 +112,7 @@ th.button_heading{
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
}
|
||||
.help-button{
|
||||
.right-float{
|
||||
float: right;
|
||||
}
|
||||
.pagination-sm{
|
||||
@@ -128,11 +128,6 @@ th.button_heading{
|
||||
.libimport-select-all{
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
.library-modal-item{
|
||||
width:90%;
|
||||
margin-left: 1em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
.paginator-bottom{
|
||||
width: 27em;
|
||||
margin-left: auto;
|
||||
@@ -143,60 +138,26 @@ th.button_heading{
|
||||
}
|
||||
|
||||
// Extra style for Galaxy modal
|
||||
.modal-content #selected_history_content{
|
||||
ul{
|
||||
list-style-type: none;
|
||||
.modal-content{
|
||||
.library_selected_history_content{
|
||||
ul{
|
||||
list-style-type: none;
|
||||
}
|
||||
}
|
||||
.library-collection-type-select, .library-collection-history-select{
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
width:200px;
|
||||
min-width:200px;
|
||||
}
|
||||
.library-modal-item{
|
||||
width:90%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
// Follows the style for the deprecated admin libraries interface
|
||||
#library-grid{
|
||||
ul{
|
||||
list-style: none;
|
||||
}
|
||||
span.expandLink{
|
||||
padding-left: 12px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
background: url(../images/silk/resultset_next.png) no-repeat;
|
||||
}
|
||||
.folderRow.expanded span.expandLink{
|
||||
background: url(../images/silk/resultset_bottom.png) no-repeat;
|
||||
}
|
||||
.folderRow span.rowIcon{
|
||||
float: left;
|
||||
margin-right: 5px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
background: url(../images/silk/folder.png);
|
||||
}
|
||||
.libraryItem-error{
|
||||
margin-right: 2px;
|
||||
padding: 0 2px 0 2px;
|
||||
border: 1px solid @state-danger-border;
|
||||
background: @state-danger-bg;
|
||||
}
|
||||
.libraryItem-queued{
|
||||
margin-right: 2px;
|
||||
padding: 0 2px 0 2px;
|
||||
border: 1px solid @state-default-border;
|
||||
background: @state-default-bg;
|
||||
}
|
||||
.libraryItem-running{
|
||||
margin-right: 2px;
|
||||
padding: 0 2px 0 2px;
|
||||
border: 1px solid @state-running-border;
|
||||
background: @state-running-bg;
|
||||
}
|
||||
.libraryItem-upload{
|
||||
margin-right: 2px;
|
||||
padding: 0 2px 0 2px;
|
||||
border: 1px solid @state-upload-border;
|
||||
background: @state-upload-bg;
|
||||
}
|
||||
}
|
||||
.libraryTitle{
|
||||
th{
|
||||
text-align: left;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
define("mvc/ui/ui-modal",["exports"],function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=t.View=Backbone.View.extend({className:"ui-modal",optionsDefault:{container:"body",title:"ui-modal",cls:"ui-modal",body:"",backdrop:!0,height:null,width:null,closing_events:!1,closing_callback:null,title_separator:!0},buttonList:{},initialize:function(t){this.options=_.defaults(t||{},this.optionsDefault),$(this.options.container).prepend(this.el),t&&this.render()},show:function(t){if(t&&(this.options=_.defaults(t,this.optionsDefault),this.render()),!this.visible&&(this.visible=!0,this.$el.fadeIn("fast"),this.options.closing_events)){var i=this;$(document).on("keyup.ui-modal",function(t){27==t.keyCode&&i.hide(!0)}),this.$backdrop.on("click",function(){i.hide(!0)})}},hide:function(t){this.visible=!1,this.$el.fadeOut("fast"),this.options.closing_callback&&this.options.closing_callback(t),$(document).off("keyup.ui-modal"),this.$backdrop.off("click")},render:function(){var t=this;if(this.$el.html(this._template()),this.$header=this.$(".modal-header"),this.$dialog=this.$(".modal-dialog"),this.$body=this.$(".modal-body"),this.$footer=this.$(".modal-footer"),this.$backdrop=this.$(".modal-backdrop"),this.$buttons=this.$(".buttons"),"progress"==this.options.body&&(this.options.body=$('<div class="progress progress-striped active"><div class="progress-bar progress-bar-info" style="width:100%"/></div>')),this.$el.removeClass().addClass("modal").addClass(this.options.cls),this.$header.find(".title").html(this.options.title),this.$body.html(this.options.body),this.$buttons.empty(),this.buttonList={},this.options.buttons){var i=0;$.each(this.options.buttons,function(s,o){var e=$("<button/>").attr("id","button-"+i++).text(s).click(o);t.$buttons.append(e).append(" "),t.buttonList[s]=e})}else this.$footer.hide();this.$backdrop[this.options.backdrop&&"addClass"||"removeClass"]("in"),this.$header[!this.options.title_separator&&"addClass"||"removeClass"]("no-separator"),this.$body.removeAttr("style"),this.options.height?(this.$body.css("height",this.options.height),this.$body.css("overflow","hidden")):this.$body.css("max-height",$(window).height()/2),this.options.width&&this.$dialog.css("width",this.options.width)},getButton:function(t){return this.buttonList[t]},enableButton:function(t){this.getButton(t).prop("disabled",!1)},disableButton:function(t){this.getButton(t).prop("disabled",!0)},showButton:function(t){this.getButton(t).show()},hideButton:function(t){this.getButton(t).hide()},scrollTop:function(){return this.$body.scrollTop()},_template:function(){return'<div class="modal-backdrop fade"/><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h4 class="title"/></div><div class="modal-body"/><div class="modal-footer"><div class="buttons"/></div></div></div>'}});t.default={View:i}});
|
||||
define("mvc/ui/ui-modal",["exports"],function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=t.View=Backbone.View.extend({className:"ui-modal",optionsDefault:{container:"body",title:"ui-modal",cls:"ui-modal",body:"",backdrop:!0,height:null,width:null,closing_events:!1,closing_callback:null,title_separator:!0},buttonList:{},initialize:function(t){this.options=_.defaults(t||{},this.optionsDefault),$(this.options.container).prepend(this.el),t&&this.render()},show:function(t){var i=this;t&&(this.options=_.defaults(t,this.optionsDefault),this.render()),this.visible||(this.visible=!0,this.$el.fadeIn("fast")),this.options.closing_events&&($(document).on("keyup.ui-modal",function(t){27==t.keyCode&&i.hide(!0)}),this.$backdrop.on("click",function(){i.hide(!0)}))},hide:function(t){this.visible=!1,this.$el.fadeOut("fast"),this.options.closing_callback&&this.options.closing_callback(t),$(document).off("keyup.ui-modal"),this.$backdrop.off("click")},render:function(){var t=this;if(this.$el.html(this._template()),this.$header=this.$(".modal-header"),this.$dialog=this.$(".modal-dialog"),this.$body=this.$(".modal-body"),this.$footer=this.$(".modal-footer"),this.$backdrop=this.$(".modal-backdrop"),this.$buttons=this.$(".buttons"),"progress"==this.options.body&&(this.options.body=$('<div class="progress progress-striped active"><div class="progress-bar progress-bar-info" style="width:100%"/></div>')),this.$el.removeClass().addClass("modal").addClass(this.options.cls),this.$header.find(".title").html(this.options.title),this.$body.html(this.options.body),this.$buttons.empty(),this.buttonList={},this.options.buttons){var i=0;$.each(this.options.buttons,function(s,o){var e=$("<button/>").attr("id","button-"+i++).text(s).click(o);t.$buttons.append(e).append(" "),t.buttonList[s]=e})}else this.$footer.hide();this.$backdrop[this.options.backdrop&&"addClass"||"removeClass"]("in"),this.$header[!this.options.title_separator&&"addClass"||"removeClass"]("no-separator"),this.$body.removeAttr("style"),this.options.height?(this.$body.css("height",this.options.height),this.$body.css("overflow","hidden")):this.$body.css("max-height",$(window).height()/2),this.options.width&&this.$dialog.css("width",this.options.width)},getButton:function(t){return this.buttonList[t]},enableButton:function(t){this.getButton(t).prop("disabled",!1)},disableButton:function(t){this.getButton(t).prop("disabled",!0)},showButton:function(t){this.getButton(t).show()},hideButton:function(t){this.getButton(t).hide()},scrollTop:function(){return this.$body.scrollTop()},_template:function(){return'<div class="modal-backdrop fade"/><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><h4 class="title"/></div><div class="modal-body"/><div class="modal-footer"><div class="buttons"/></div></div></div>'}});t.default={View:i}});
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
a{text-decoration:underline}label{font-weight:normal}.library_style_container{width:95%;margin:auto;margin-top:2em;overflow:auto !important}.library_style_container .fa{font-size:12px}.library_style_container .fa-globe,.library_style_container .fa-shield,.library_style_container .fa-key,.library_style_container .fa-ban{font-size:initial;margin-left:.6em}.library_style_container .libraryRow{background-color:#ebd9b2}.library_style_container .datasetHighlighted{background-color:#f9f9f9}.library_style_container .libraryItemDeleted-True{font-style:italic}.library_style_container div.libraryItemBody{padding:4px 4px 2px 4px}.library_style_container li.folderRow,.library_style_container li.datasetRow{border-top:solid 1px #c6bfa8}.library_style_container li.folderRow:hover,.library_style_container li.datasetRow:hover{background-color:#f9f9f9}.library_style_container td.right-center{vertical-align:middle !important;text-align:right}.library_style_container .library-genome-select{max-width:350px}.library_style_container .library-extension-select{max-width:140px}.library_style_container .library_table td{border-top:1px solid #5f6990 !important}.library_style_container .library_table th{border-bottom:2px solid #5f6990 !important}.library_style_container .library_table a{color:#0A143D}.library_style_container .library_table a:hover{color:maroon}.library_style_container tr.light td{background-color:white;color:black}.library_style_container tr.light:hover td{background-color:#f5e8cc}.library_style_container tr.dark td{background-color:#d6b161;color:white}.library_style_container tr.dark:hover td{background-color:#ebd4a4;color:white}.library_style_container a.dark{color:white}.library_style_container .dataset_table tr,.library_style_container .dataset_table th,.library_style_container .dataset_table td{border:none}.library_style_container .dataset_table .dataset-first-column{width:30%}.library_style_container th.button_heading{width:2em}.library_style_container .bigdrop.select2-container .select2-results{max-height:300px}.library_style_container .bigdrop .select2-results{max-height:300px}.library_style_container .select2-container-multi{width:100%}.library_style_container .roles-selection{width:66%}.library_style_container #library_toolbar{margin-bottom:.5em}.library_style_container #library_toolbar span{margin-right:.2em}.library_style_container #library_toolbar .toolbar-item{margin-left:1em}.library_style_container #libraries_element button,.library_style_container #folder_items_element button{margin-left:.5em}.library_style_container .help-button{float:right}.library_style_container .pagination-sm{height:15px}.library_style_container .library-paginator{margin-left:2em}.library_style_container .import-type-switch{text-decoration:underline}.library_style_container .libimport-select-none,.library_style_container .libimport-select-all{margin-left:.5em}.library_style_container .library-modal-item{width:90%;margin-left:1em;margin-right:1em}.library_style_container .paginator-bottom{width:27em;margin-left:auto;margin-right:auto;margin-top:2em;margin-bottom:2em}.modal-content #selected_history_content ul{list-style-type:none}#library-grid ul{list-style:none}#library-grid span.expandLink{padding-left:12px;display:inline-block;vertical-align:middle;background:url(../images/silk/resultset_next.png) no-repeat}#library-grid .folderRow.expanded span.expandLink{background:url(../images/silk/resultset_bottom.png) no-repeat}#library-grid .folderRow span.rowIcon{float:left;margin-right:5px;width:16px;height:16px;display:inline-block;vertical-align:middle;background:url(../images/silk/folder.png)}#library-grid .libraryItem-error{margin-right:2px;padding:0 2px 0 2px;border:1px solid #dd1b15;background:#f9c7c5}#library-grid .libraryItem-queued{margin-right:2px;padding:0 2px 0 2px;border:1px solid #bfbfbf;background:#eee}#library-grid .libraryItem-running{margin-right:2px;padding:0 2px 0 2px;border:1px solid #AAAA66;background:#FFFFCC}#library-grid .libraryItem-upload{margin-right:2px;padding:0 2px 0 2px;border:1px solid #119ac2;background:#a8e5f7}.libraryTitle th{text-align:left}.libraryTitle .rowTitle{padding:2px}
|
||||
a{text-decoration:underline}label{font-weight:normal}.library_style_container{width:95%;margin:auto;margin-top:2em;overflow:auto !important}.library_style_container .fa{font-size:12px}.library_style_container .fa-globe,.library_style_container .fa-shield,.library_style_container .fa-key,.library_style_container .fa-ban{font-size:initial;margin-left:.6em}.library_style_container .libraryRow{background-color:#ebd9b2}.library_style_container .datasetHighlighted{background-color:#f9f9f9}.library_style_container .libraryItemDeleted-True{font-style:italic}.library_style_container div.libraryItemBody{padding:4px 4px 2px 4px}.library_style_container li.folderRow,.library_style_container li.datasetRow{border-top:solid 1px #c6bfa8}.library_style_container li.folderRow:hover,.library_style_container li.datasetRow:hover{background-color:#f9f9f9}.library_style_container td.right-center{vertical-align:middle !important;text-align:right}.library_style_container .library-genome-select{max-width:350px}.library_style_container .library-extension-select{max-width:140px}.library_style_container .library_table td{border-top:1px solid #5f6990 !important}.library_style_container .library_table th{border-bottom:2px solid #5f6990 !important}.library_style_container .library_table a{color:#0A143D}.library_style_container .library_table a:hover{color:maroon}.library_style_container tr.light td{background-color:white;color:black}.library_style_container tr.light:hover td{background-color:#f5e8cc}.library_style_container tr.dark td{background-color:#d6b161;color:white}.library_style_container tr.dark:hover td{background-color:#ebd4a4;color:white}.library_style_container a.dark{color:white}.library_style_container .dataset_table tr,.library_style_container .dataset_table th,.library_style_container .dataset_table td{border:none}.library_style_container .dataset_table .dataset-first-column{width:30%}.library_style_container th.button_heading{width:2em}.library_style_container .bigdrop.select2-container .select2-results{max-height:300px}.library_style_container .bigdrop .select2-results{max-height:300px}.library_style_container .select2-container-multi{width:100%}.library_style_container .roles-selection{width:66%}.library_style_container #library_toolbar{margin-bottom:.5em}.library_style_container #library_toolbar span{margin-right:.2em}.library_style_container #library_toolbar .toolbar-item{margin-left:.5em}.library_style_container #libraries_element button,.library_style_container #folder_items_element button{margin-left:.5em}.library_style_container .right-float{float:right}.library_style_container .pagination-sm{height:15px}.library_style_container .library-paginator{margin-left:2em}.library_style_container .import-type-switch{text-decoration:underline}.library_style_container .libimport-select-none,.library_style_container .libimport-select-all{margin-left:.5em}.library_style_container .paginator-bottom{width:27em;margin-left:auto;margin-right:auto;margin-top:2em;margin-bottom:2em}.modal-content .library_selected_history_content ul{list-style-type:none}.modal-content .library-collection-type-select,.modal-content .library-collection-history-select{margin-left:auto;margin-right:auto;width:200px;min-width:200px}.modal-content .library-modal-item{width:90%;margin-left:auto;margin-right:auto;margin-top:1.5em}.libraryTitle th{text-align:left}.libraryTitle .rowTitle{padding:2px}
|
||||
@@ -612,6 +612,11 @@ class NavigatesGalaxy(HasDriver):
|
||||
self.components.masthead.libraries.wait_for_and_click()
|
||||
self.components.libraries.selector.wait_for_visible()
|
||||
|
||||
def libraries_open_with_name(self, name):
|
||||
self.libraries_open()
|
||||
self.libraries_index_search_for(name)
|
||||
self.libraries_index_table_elements()[0].find_element_by_css_selector("td a").click()
|
||||
|
||||
@retry_during_transitions
|
||||
def libraries_index_table_elements(self):
|
||||
container = self.wait_for_selector_visible(".library_container")
|
||||
@@ -657,8 +662,7 @@ class NavigatesGalaxy(HasDriver):
|
||||
self.driver.execute_script("$(arguments[0]).keyup();", search_box)
|
||||
|
||||
def libraries_folder_create(self, name):
|
||||
create_folder_button = self.wait_for_selector_clickable("#toolbtn_create_folder")
|
||||
create_folder_button.click()
|
||||
self.components.libraries.folder.add_folder.wait_for_and_click()
|
||||
|
||||
name_text_box = self.wait_for_selector_clickable("input[name='Name']")
|
||||
name_text_box.send_keys(name)
|
||||
@@ -681,6 +685,26 @@ class NavigatesGalaxy(HasDriver):
|
||||
self.wait_for_visible(self.navigation.libraries.folder.selectors.add_items_menu)
|
||||
self.wait_for_and_click(self.navigation.libraries.folder.labels.from_path)
|
||||
|
||||
def libraries_dataset_import_from_history_select(self, to_select_items):
|
||||
self.wait_for_visible(self.navigation.libraries.folder.selectors.import_history_content)
|
||||
history_elements = self.find_elements(self.navigation.libraries.folder.selectors.import_history_contents_items)
|
||||
for to_select_item in to_select_items:
|
||||
found = False
|
||||
for history_element in history_elements:
|
||||
if to_select_item in history_element.text:
|
||||
history_element.find_element_by_css_selector("input").click()
|
||||
found = True
|
||||
break
|
||||
|
||||
if not found:
|
||||
raise Exception("Failed to find history item [%s] to select" % to_select_item)
|
||||
|
||||
def libraries_dataset_import_from_history_click_ok(self, wait=True):
|
||||
self.wait_for_and_click(self.navigation.libraries.folder.selectors.import_datasets_ok_button)
|
||||
if wait:
|
||||
# Let the progress bar disappear...
|
||||
self.wait_for_absent_or_hidden(self.navigation.libraries.folder.selectors.import_progress_bar)
|
||||
|
||||
def libraries_table_elements(self):
|
||||
tbody_element = self.wait_for_selector_visible("#folder_list_body")
|
||||
return tbody_element.find_elements_by_css_selector("tr")[1:]
|
||||
|
||||
@@ -30,8 +30,8 @@ masthead:
|
||||
user:
|
||||
type: xpath
|
||||
selector: '//ul[@id="user"]'
|
||||
|
||||
workflow:
|
||||
|
||||
workflow:
|
||||
type: xpath
|
||||
selector: '//ul[@id="workflow"]'
|
||||
|
||||
@@ -123,7 +123,7 @@ history_panel:
|
||||
name: '.title .name'
|
||||
name_edit_input: '.name input'
|
||||
contents: '#current-history-panel .list-items div.history-content'
|
||||
|
||||
|
||||
empty_message: '.empty-message'
|
||||
size: '.history-size'
|
||||
tag_icon: '.actions .history-tag-btn'
|
||||
@@ -236,22 +236,25 @@ libraries:
|
||||
|
||||
folder:
|
||||
selectors:
|
||||
# There needs to a different class or ID on the dataset button, this isn't
|
||||
# a good selector for that button since .add-library-items also applies to
|
||||
# folder (but it is a button.add-library-items instead).
|
||||
add_items_button: 'div.add-library-items'
|
||||
add_items_menu: 'div.add-library-items .dropdown-menu'
|
||||
add_items_options: 'div.add-library-items .dropdown-menu li a'
|
||||
add_items_button: '.add-library-items-datasets'
|
||||
add_items_menu: '.add-library-items-datasets .dropdown-menu'
|
||||
add_items_options: '.add-library-items-datasets .dropdown-menu li a'
|
||||
|
||||
# TODO: Most of these are very good selectors but the same DOM elements
|
||||
add_folder: '.add-library-items-folder'
|
||||
|
||||
add_to_history: '.add-to-history'
|
||||
add_to_history_datasets: '.add-to-history-datasets'
|
||||
add_to_history_collection: '.add-to-history-collection'
|
||||
# TODO: Most of these aren't very good selectors but the same DOM elements
|
||||
# are reused without adding specific classes, IDs, or roles to anything.
|
||||
import_modal: '.modal'
|
||||
import_datasets_ok_button: '.modal-footer .buttons #button-0'
|
||||
import_datasets_cancel_button: '.modal-footer .buttons #button-1'
|
||||
import_progress_bar: '.progress-bar-import'
|
||||
import_history_content: '#selected_history_content'
|
||||
import_history_contents_items: '#selected_history_content ul li'
|
||||
import_history_content: '.library_selected_history_content'
|
||||
import_history_contents_items: '.library_selected_history_content ul li'
|
||||
import_from_path_textarea: '#import_paths'
|
||||
select_all: '#select-all-checkboxes'
|
||||
|
||||
labels:
|
||||
from_history: 'from History'
|
||||
|
||||
@@ -31,16 +31,11 @@ class LibraryContentsTestCase(SeleniumTestCase):
|
||||
self.wait_for_absent_or_hidden(self.navigation.libraries.folder.selectors.import_modal)
|
||||
|
||||
self.libraries_dataset_import_from_history()
|
||||
self.wait_for_visible(self.navigation.libraries.folder.selectors.import_history_content)
|
||||
history_elements = self.find_elements(self.navigation.libraries.folder.selectors.import_history_contents_items)
|
||||
assert "1.txt" in history_elements[0].text
|
||||
history_elements[0].find_element_by_css_selector("input").click()
|
||||
self.libraries_dataset_import_from_history_select(["1.txt"])
|
||||
# Add
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.screenshot("libraries_dataset_import")
|
||||
self.wait_for_and_click(self.navigation.libraries.folder.selectors.import_datasets_ok_button)
|
||||
# Let the progress bar disappear...
|
||||
self.wait_for_absent_or_hidden(self.navigation.libraries.folder.selectors.import_progress_bar)
|
||||
self.libraries_dataset_import_from_history_click_ok()
|
||||
self._assert_num_displayed_items_is(1)
|
||||
|
||||
# Fine test locally but the upload doesn't work in Docker compose. I'd think
|
||||
@@ -103,6 +98,4 @@ class LibraryContentsTestCase(SeleniumTestCase):
|
||||
self.libraries_open()
|
||||
self.name = self._get_random_name(prefix="testcontents")
|
||||
self.libraries_index_create(self.name)
|
||||
self.wait_for_overlays_cleared()
|
||||
self.libraries_index_search_for(self.name)
|
||||
self.libraries_index_table_elements()[0].find_element_by_css_selector("td a").click()
|
||||
self.libraries_open_with_name(self.name)
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
from .framework import (
|
||||
selenium_test,
|
||||
SharedStateSeleniumTestCase,
|
||||
)
|
||||
|
||||
|
||||
class LibraryToCollectionsTestCase(SharedStateSeleniumTestCase):
|
||||
|
||||
requires_admin = True
|
||||
|
||||
@selenium_test
|
||||
def test_list_creation(self):
|
||||
self.admin_login()
|
||||
self.history_panel_create_new_with_name("new_history_for_library_list")
|
||||
self.libraries_open_with_name(self.name)
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.components.libraries.folder.select_all.wait_for_and_click()
|
||||
self.components.libraries.folder.add_to_history.wait_for_and_click()
|
||||
self.screenshot("libraries_add_to_history_menu")
|
||||
self.components.libraries.folder.add_to_history_collection.wait_for_and_click()
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.screenshot("libraries_to_collection_landing")
|
||||
self.components.libraries.folder.import_datasets_ok_button.wait_for_and_click()
|
||||
|
||||
self.collection_builder_set_name("my cool list")
|
||||
self.collection_builder_create()
|
||||
self.home()
|
||||
self.history_panel_wait_for_hid_ok(3)
|
||||
|
||||
def setup_shared_state(self):
|
||||
self.admin_login()
|
||||
self.perform_upload(self.get_filename("1.bed"))
|
||||
self.wait_for_history()
|
||||
self.perform_upload(self.get_filename("2.bed"))
|
||||
self.wait_for_history()
|
||||
|
||||
self.name = self._get_random_name(prefix="testcontents")
|
||||
|
||||
self.libraries_open()
|
||||
self.libraries_index_create(self.name)
|
||||
self.libraries_open_with_name(self.name)
|
||||
|
||||
self.libraries_dataset_import_from_history()
|
||||
self.libraries_dataset_import_from_history_select(["1.bed", "2.bed"])
|
||||
self.sleep_for(self.wait_types.UX_RENDER)
|
||||
self.libraries_dataset_import_from_history_click_ok()
|
||||
Reference in New Issue
Block a user