Skip to content

Commit

Permalink
fix seleniums and minor bug fixes for FilterMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Oct 12, 2023
1 parent 7cae1a6 commit 1c37fa9
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Common/FilterMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ watch(
@onToggle="onToggle" />
<b-button
v-if="props.menuType == 'separate' && props.showAdvanced"
v-b-tooltip.hover.noninteractive
v-b-tooltip.hover.bottom.noninteractive
class="w-100"
aria-haspopup="true"
size="sm"
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Common/FilterMenuMultiTags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { computed, type PropType, ref, watch } from "vue";
import { ValidFilter } from "@/utils/filtering";
import StatelessTags from "../Tags/StatelessTags.vue";
import StatelessTags from "@/components/TagsMultiselect/StatelessTags.vue";
const props = defineProps({
name: { type: String, required: true },
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Page/PageList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</b-row>
<b-table v-model="pageItemsModel" v-bind="{ ...defaultTableAttrs, ...indexTableAttrs }">
<template v-slot:empty>
<loading-span v-if="loading" message="Loading pages" />
<LoadingSpan v-if="loading" message="Loading pages" />
<b-alert v-else id="no-pages" variant="info" show>
<div v-if="filterText !== ''">
No matching entries found for: <span class="font-weight-bold">{{ filterText }}</span
Expand Down Expand Up @@ -249,7 +249,7 @@ export default {
computed: {
dataProviderParameters() {
const extraParams = {
search: this.effectiveFilter,
search: this.searchQuery,
show_published: false,
show_shared: true,
};
Expand Down
1 change: 1 addition & 0 deletions client/src/utils/navigation/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ workflows:
advanced_search_toggle: '.workflows-list [data-description="toggle advanced search"]'
advanced_search_name_input: '#workflows-advanced-filter-name'
advanced_search_tag_input: '#workflows-advanced-filter-tag .stateless-tags'
advanced_search_submit: '#workflows-advanced-filter-submit'
workflow_table: "#workflow-table"
workflow_rows: "#workflow-table > tbody > tr:not(.b-table-empty-row, [style*='display: none'])"
external_link: '.workflow-external-link'
Expand Down
9 changes: 0 additions & 9 deletions lib/galaxy/selenium/navigates_galaxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
Any,
cast,
Dict,
List,
NamedTuple,
Optional,
Union,
Expand Down Expand Up @@ -1396,14 +1395,6 @@ def workflow_index_search_for(self, search_term=None):
escape_to_clear=True,
)

def workflow_index_add_advanced_tag_filter(self, tags: List[str]):
for tag in tags:
tag_display = self.components.workflows.advanced_search_tag_input
if tag_display.is_absent:
self.components.workflows.advanced_search_toggle.wait_for_and_click()
tag_display.wait_for_and_click()
self.tagging_add([tag])

def workflow_index_click_import(self):
return self.components.workflows.import_button.wait_for_and_click()

Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy_test/selenium/test_history_related_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ def test_history_related_filter(self):
).wait_for_and_click()
initial_value = filter_element.get_attribute("value")
assert initial_value == f"related:{CURRENT_HID}", initial_value
self.history_element("clear filters").wait_for_and_click()
self.history_element(attribute_value="reset query", scope=".content-operations-filters").wait_for_and_click()
filter_element.send_keys(f"related:{UNRELATED_HID}")
current_hda.wait_for_absent()
8 changes: 6 additions & 2 deletions lib/galaxy_test/selenium/test_workflow_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ def test_index_advanced_search(self):
self.components.workflows.advanced_search_toggle.wait_for_and_click()
# search by tag and name
self.components.workflows.advanced_search_name_input.wait_for_and_send_keys("searchforthis")
self.workflow_index_add_advanced_tag_filter(["mytag"])
self.components.workflows.advanced_search_tag_input.wait_for_and_click()
self.tagging_add(["mytag"])
self.components.workflows.advanced_search_submit.wait_for_and_click()
self._assert_showing_n_workflows(1)
curr_value = self.workflow_index_get_current_filter()
assert curr_value == "name:searchforthis tag:mytag", curr_value
Expand All @@ -204,7 +206,9 @@ def test_index_advanced_search(self):

self.components.workflows.advanced_search_toggle.wait_for_and_click()
# search by 2 tags, one of which is not present
self.workflow_index_add_advanced_tag_filter(["mytag", "DNEtag"])
self.components.workflows.advanced_search_tag_input.wait_for_and_click()
self.tagging_add(["mytag", "DNEtag"])
self.components.workflows.advanced_search_submit.wait_for_and_click()
curr_value = self.workflow_index_get_current_filter()
assert curr_value == "tag:mytag tag:DNEtag", curr_value
self._assert_showing_n_workflows(0)
Expand Down

0 comments on commit 1c37fa9

Please sign in to comment.