fix chat history panel selectors for selenium

Also includes other minor polish like `GButton` usage and disabling of delete button when no chats to delete.
This commit is contained in:
Ahmed Awan
2026-06-02 09:41:56 -05:00
parent 5e50f989b8
commit 3c2f266d25
4 changed files with 18 additions and 7 deletions
@@ -107,6 +107,7 @@ async function deleteSelected() {
</GButton>
<GButton
:color="selectionMode ? 'grey' : 'red'"
:disabled="chatHistory.length === 0"
outline
:title="selectionMode ? 'Cancel selection' : 'Select chats to delete'"
@click="toggleSelectionMode">
@@ -124,9 +125,14 @@ async function deleteSelected() {
<FontAwesomeIcon :icon="allSelected ? faCheckSquare : faSquare" fixed-width />
{{ allSelected ? "Deselect all" : "Select all" }}
</span>
<button class="btn btn-sm btn-danger" :disabled="selectedIds.size === 0" @click="deleteSelected">
<GButton
color="red"
data-description="delete selected chats"
:disabled="selectedIds.size === 0"
size="small"
@click="deleteSelected">
Delete {{ selectedIds.size > 0 ? selectedIds.size : "" }}
</button>
</GButton>
</div>
<ScrollList
@@ -236,7 +236,9 @@ watch(
<template v-if="!busy">
<slot v-if="allLoaded && items.length === 0" name="none-loaded-footer">
<div class="list-end">- No {{ props.namePlural }} found -</div>
<div class="list-end" data-description="no items found footer">
- No {{ props.namePlural }} found -
</div>
</slot>
<slot v-else-if="allLoaded" name="all-loaded-footer">
+4 -4
View File
@@ -1662,11 +1662,11 @@ galaxyai:
_: '.activity-panel[data-description="GalaxyAI"]'
toggle_selection_mode: 'button[title="Select chats to delete"]'
cancel_selection: 'button[title="Cancel selection"]'
history_item: '[data-description="sidebar item"]'
history_checkbox: '[data-description="sidebar item"] .history-checkbox'
delete_selected_button: '.selection-toolbar .btn-danger'
history_item: '.chat-history-item'
history_checkbox: '.chat-history-item .history-checkbox'
delete_selected_button: '.selection-toolbar [data-description="delete selected chats"]'
select_all_toggle: '.select-all-toggle'
empty_message: '[data-description="sidebar list empty"]'
empty_message: '[data-description="no items found footer"]'
galaxy_wizard:
selectors:
@@ -116,5 +116,8 @@ class TestGalaxyAI(SeleniumTestCase):
# Delete selected
history.delete_selected_button.wait_for_and_click()
# Confirm deletion
self.components.confirm_dialog.ok_button.wait_for_and_click()
# Verify all items were removed (panel should be empty)
history.empty_message.wait_for_visible()