Skip to content

Commit

Permalink
Merge branch 'release_23.2' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Jan 17, 2024
2 parents 2e6bb19 + 8118f07 commit 274a154
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ function listCollectionCreatorModal(elements, options) {
*/
function createListCollection(contents, defaultHideSourceItems = true) {
const elements = contents.toJSON();
let copyElements;
const promise = listCollectionCreatorModal(elements, {
defaultHideSourceItems: defaultHideSourceItems,
creationFn: function (elements, name, hideSourceItems) {
Expand All @@ -39,8 +38,7 @@ function createListCollection(contents, defaultHideSourceItems = true) {
//TODO: this allows for list:list even if the filter above does not - reconcile
src: element.src || (element.history_content_type == "dataset" ? "hda" : "hdca"),
}));
copyElements = !hideSourceItems;
return contents.createHDCA(elements, "list", name, hideSourceItems, copyElements);
return contents.createHDCA(elements, "list", name, hideSourceItems);
},
});
return promise;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,14 @@ function pairCollectionCreatorModal(elements, options) {
}
function createPairCollection(contents, defaultHideSourceItems = true) {
var elements = contents.toJSON();
var copyElements;
var promise = pairCollectionCreatorModal(elements, {
defaultHideSourceItems: defaultHideSourceItems,
creationFn: function (elements, name, hideSourceItems) {
elements = [
{ name: "forward", src: elements[0].src || "hda", id: elements[0].id },
{ name: "reverse", src: elements[1].src || "hda", id: elements[1].id },
];
copyElements = !hideSourceItems;
return contents.createHDCA(elements, "paired", name, hideSourceItems, copyElements);
return contents.createHDCA(elements, "paired", name, hideSourceItems);
},
});
return promise;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ function pairedListCollectionCreatorModal(elements, options) {
*/
function createPairedListCollection(contents, defaultHideSourceItems) {
const elements = contents.toJSON();
var copyElements;
const promise = pairedListCollectionCreatorModal(elements, {
defaultHideSourceItems: defaultHideSourceItems,
creationFn: function (elements, name, hideSourceItems) {
Expand All @@ -50,8 +49,7 @@ function createPairedListCollection(contents, defaultHideSourceItems) {
},
],
}));
copyElements = !hideSourceItems;
return contents.createHDCA(elements, "list:paired", name, hideSourceItems, copyElements);
return contents.createHDCA(elements, "list:paired", name, hideSourceItems);
},
});
return promise;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ function createCollectionViaRules(selection, defaultHideSourceItems = true) {
let elementsType;
let importType;
const selectionType = selection.selectionType;
const copyElements = !defaultHideSourceItems;
if (!selectionType) {
// Have HDAs from the history panel.
elements = selection.toJSON();
Expand Down Expand Up @@ -82,7 +81,7 @@ function createCollectionViaRules(selection, defaultHideSourceItems = true) {
ftpUploadSite: selection.ftpUploadSite,
defaultHideSourceItems: defaultHideSourceItems,
creationFn: function (elements, collectionType, name, hideSourceItems) {
return selection.createHDCA(elements, collectionType, name, hideSourceItems, copyElements);
return selection.createHDCA(elements, collectionType, name, hideSourceItems);
},
});
return promise;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,11 @@ const createBackboneContent = (historyId, selection) => {
toJSON: () => selectionJson,
// result must be a $.Deferred object instead of a promise because
// that's the kind of deprecated data format that backbone likes to use.
createHDCA(element_identifiers, collection_type, name, hide_source_items, copy_elements, options = {}) {
createHDCA(element_identifiers, collection_type, name, hide_source_items, options = {}) {
const def = jQuery.Deferred();
return def.resolve(null, {
collection_type,
name,
copy_elements,
hide_source_items,
element_identifiers,
options,
Expand Down
12 changes: 7 additions & 5 deletions lib/galaxy_test/selenium/test_collection_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_build_list_simple_hidden(self):
self.collection_builder_set_name("my cool list")
self.screenshot("collection_builder_list")
self.collection_builder_create()
self._wait_for_hid_visible(2)
self._wait_for_hid_visible(3)

@selenium_test
@managed_history
Expand All @@ -30,7 +30,6 @@ def test_build_list_and_show_items(self):
self.collection_builder_hide_originals()
self.collection_builder_set_name("my cool list")
self.collection_builder_create()
self.home() # this shouldn't be necessary, and it isn't with a real browser.
self._wait_for_hid_visible(3)

@selenium_test
Expand All @@ -43,7 +42,7 @@ def test_build_pair_simple_hidden(self):
self.collection_builder_set_name("my awesome pair")
self.screenshot("collection_builder_pair")
self.collection_builder_create()
self._wait_for_hid_visible(3)
self._wait_for_hid_visible(5)

@selenium_test
@managed_history
Expand All @@ -58,11 +57,13 @@ def test_build_paired_list_simple(self):
self.collection_builder_set_name("my awesome paired list")
self.screenshot("collection_builder_paired_list")
self.collection_builder_create()
self._wait_for_hid_visible(3)
self._wait_for_hid_visible(5)
# switch to hidden filters to see the hidden datasets appear
self._show_hidden_content()
self._wait_for_hid_visible(1)
self._wait_for_hid_visible(2)
self._wait_for_hid_visible(3)
self._wait_for_hid_visible(4)

@selenium_test
@managed_history
Expand Down Expand Up @@ -98,9 +99,10 @@ def test_build_simple_list_via_rules_hidden(self):
self.collection_builder_set_name("my cool list")
self.screenshot("collection_builder_rules_list")
self.collection_builder_create()
self._wait_for_hid_visible(2)
self._wait_for_hid_visible(3)
self._show_hidden_content()
self._wait_for_hid_visible(1)
self._wait_for_hid_visible(2)

def _wait_for_hid_visible(self, hid, state="ok"):
# takes a little while for these things to upload and end up in the history
Expand Down
6 changes: 3 additions & 3 deletions lib/galaxy_test/selenium/test_collection_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_change_dbkey_simple_list(self):
self.check_current_data_value(dataValue)
dataNew = "hg17"
self.change_dbkey_value_and_click_submit(dataValue, dataNew)
self.history_panel_wait_for_hid_ok(4)
self.history_panel_wait_for_hid_ok(5)
self.open_collection_edit_view()
self.navigate_to_database_tab()
self.check_current_data_value(dataNew)
Expand All @@ -42,7 +42,7 @@ def test_change_datatype_simple_list(self):
self.change_datatype_value_and_click_submit(dataValue, dataNew)
self.check_current_data_value(dataNew)
self.wait_for_history()
self.history_panel_expand_collection(2)
self.history_panel_expand_collection(3)
self.history_panel_ensure_showing_item_details(1)
item = self.history_panel_item_component(hid=1)
item.datatype.wait_for_visible()
Expand All @@ -56,7 +56,7 @@ def _create_simple_list_collection(self, filename, ext):

self.collection_builder_set_name("my cool list")
self.collection_builder_create()
self._wait_for_hid_visible(2)
self._wait_for_hid_visible(3)

def open_collection_edit_view(self):
self.components.history_panel.collection_menu_edit_attributes.wait_for_and_click()
Expand Down
16 changes: 10 additions & 6 deletions lib/galaxy_test/selenium/test_uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,27 +118,29 @@ def test_upload_deferred(self):
@selenium_test
def test_upload_list(self):
self.upload_list([self.get_filename("1.tabular")], name="Test List")
self.history_panel_wait_for_hid_ok(2)
self.history_panel_wait_for_hid_ok(3)
# Make sure modals disappeared - both List creator (TODO: upload).
self.wait_for_selector_absent_or_hidden(".collection-creator")

self.assert_item_name(2, "Test List")
self.assert_item_name(3, "Test List")

# Make sure source item is hidden when the collection is created.
self.history_panel_wait_for_hid_hidden(1)

@selenium_test
def test_upload_pair(self):
self.upload_list([self.get_filename("1.tabular"), self.get_filename("2.tabular")], name="Test Pair")
self.history_panel_wait_for_hid_ok(3)
self.history_panel_wait_for_hid_ok(5)
# Make sure modals disappeared - both collection creator (TODO: upload).
self.wait_for_selector_absent_or_hidden(".collection-creator")

self.assert_item_name(3, "Test Pair")
self.assert_item_name(5, "Test Pair")

# Make sure source items are hidden when the collection is created.
self.history_panel_wait_for_hid_hidden(1)
self.history_panel_wait_for_hid_hidden(2)
self.history_panel_wait_for_hid_hidden(3)
self.history_panel_wait_for_hid_hidden(4)

@selenium_test
def test_upload_pair_specify_extension(self):
Expand All @@ -161,14 +163,16 @@ def test_upload_paired_list(self):
self.upload_paired_list(
[self.get_filename("1.tabular"), self.get_filename("2.tabular")], name="Test Paired List"
)
self.history_panel_wait_for_hid_ok(3)
self.history_panel_wait_for_hid_ok(5)
# Make sure modals disappeared - both collection creator (TODO: upload).
self.wait_for_selector_absent_or_hidden(".collection-creator")
self.assert_item_name(3, "Test Paired List")
self.assert_item_name(5, "Test Paired List")

# Make sure source items are hidden when the collection is created.
self.history_panel_wait_for_hid_hidden(1)
self.history_panel_wait_for_hid_hidden(2)
self.history_panel_wait_for_hid_hidden(3)
self.history_panel_wait_for_hid_hidden(4)

@selenium_test
@pytest.mark.gtn_screenshot
Expand Down

0 comments on commit 274a154

Please sign in to comment.