Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/src/components/Panels/ToolPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ initializePanel();
aria-labelledby="toolbox-heading"
class="toolbox-panel"
go-to-all-title="Discover Tools"
go-to-all-data-description="toolbox discover tools"
href="/tools/list">
<template v-slot:activity-panel-header-top>
<PanelViewMenu />
Expand Down
6 changes: 5 additions & 1 deletion client/src/components/ToolsList/ToolsListCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,11 @@ const {
</GLink>

<!-- eslint-disable-next-line vue/no-v-html -->
<div v-if="showHelp" class="mt-2" v-html="formattedToolHelp"></div>
<div
v-if="showHelp"
data-description="tools list tool help"
class="mt-2"
v-html="formattedToolHelp"></div>
</div>
</template>

Expand Down
11 changes: 11 additions & 0 deletions client/src/utils/navigation/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,18 @@ tool_panel:
views_button: '.tool-panel-dropdown'
views_menu_item: '[data-panel-id="${panel_id}"]'
panel_labels: '.tool-panel-label'
discover_tools_link: '[data-description="toolbox discover tools"]'

tools_list:
selectors:
_: '.tools-list'
search_input: '.tools-list [data-description="filter text input"]'
tool_card: '#g-card-content-${tool_id}'
version_button: '#tools-list-${tool_id}'
favorite_tool_button: '#g-card-action-favorite-tool-${tool_id}'
toggle_help: '#g-card-description-${tool_id} .g-link.g-unselectable'
tool_help: '#g-card-content-${tool_id} [data-description="tools list tool help"]'
open_tool_button: '#g-card-action-open-tool-${tool_id}'

multi_history_panel:
selectors:
Expand Down
96 changes: 96 additions & 0 deletions lib/galaxy_test/selenium/test_tool_discovery_view.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
from .framework import (
selenium_test,
SeleniumTestCase,
)


class TestToolDiscoveryViewAnonymous(SeleniumTestCase):
"""Test the Tool Discovery View (rich tools list).

This view provides advanced tool search and discovery features,
moving the advanced search from the tool panel sidebar to a
dedicated center panel view (PR #20747).

TODO: We should add tests for ontology filtering, section filtering,
advanced search, and list vs grid view toggling.
"""

@selenium_test
def test_tool_discovery_landing(self):
"""Test navigation to the tool discovery view."""
# Navigate to home page
self.home()

# Access the tool discovery view via the "Discover Tools" link
tool_panel = self.components.tool_panel
tool_panel.discover_tools_link.wait_for_and_click()

# Verify the tools list view is displayed
tools_list = self.components.tools_list
tools_list._.wait_for_visible()
self.screenshot("tools_list_landing")

tools_list.search_input.wait_for_and_send_keys("filter failed")

# Verify the filtered tool card appears
tools_list.tool_card(tool_id="__FILTER_FAILED_DATASETS__").wait_for_visible()
self.screenshot("tools_list_filtered")

# Click the version button to show version information
tools_list.version_button(tool_id="__FILTER_FAILED_DATASETS__").wait_for_and_click()
self.screenshot("tools_list_show_version")

# Verify favorite button is available (not showing login message)
button = tools_list.favorite_tool_button(tool_id="__FILTER_FAILED_DATASETS__").wait_for_visible()
# When logged in, the title should not be the login prompt
title = button.get_attribute("title")
assert title == "Login or Register to Favorite Tools"

# Verify help is initially hidden
tools_list.tool_help(tool_id="__FILTER_FAILED_DATASETS__").assert_absent()

# Toggle help to show it
tools_list.toggle_help(tool_id="__FILTER_FAILED_DATASETS__").wait_for_and_click()
tools_list.tool_help(tool_id="__FILTER_FAILED_DATASETS__").wait_for_visible()
self.screenshot("tools_list_show_help")

# Toggle help to hide it again
tools_list.toggle_help(tool_id="__FILTER_FAILED_DATASETS__").wait_for_and_click()
tools_list.tool_help(tool_id="__FILTER_FAILED_DATASETS__").wait_for_absent()

# Click the open tool button to navigate to the tool
tools_list.open_tool_button(tool_id="__FILTER_FAILED_DATASETS__").wait_for_and_click()

# Verify we've left the tools list view and the tool form is displayed
tools_list._.wait_for_absent()
self.screenshot("tools_list_navigated_to_tool")


class TestToolDiscoveryViewLoggedIn(SeleniumTestCase):
"""Test tool discovery view features that require login.

Current it just verifies that the favorite tool button does not tell you
to login unlike the anonymous case above. Actual exercise of the favorite
feature would be great.
"""

ensure_registered = True

@selenium_test
def test_favorite_tool_button_when_logged_in(self):
"""Test that the favorite tool button works for logged-in users."""
# Navigate to tool discovery view
self.home()
self.components.tool_panel.discover_tools_link.wait_for_and_click()

# Search for a tool
tools_list = self.components.tools_list
tools_list._.wait_for_visible()
tools_list.search_input.wait_for_and_send_keys("filter failed")
tools_list.tool_card(tool_id="__FILTER_FAILED_DATASETS__").wait_for_visible()

# Verify favorite button is available (not showing login message)
button = tools_list.favorite_tool_button(tool_id="__FILTER_FAILED_DATASETS__").wait_for_visible()
# When logged in, the title should not be the login prompt
title = button.get_attribute("title")
assert title != "Login or Register to Favorite Tools"
Loading