chore: fix chat model select and add test

This commit is contained in:
nathan
2025-09-11 00:29:39 +08:00
parent 2bc21feba6
commit c3a6ea7972
5 changed files with 319 additions and 43 deletions

View File

@@ -184,6 +184,27 @@ export const SidebarSelectors = {
pageHeader: () => cy.get(byTestId('sidebar-page-header')),
};
/**
* Chat Model Selector-related selectors
* Used for testing AI model selection in chat interface
*/
export const ModelSelectorSelectors = {
// Model selector button
button: () => cy.get(byTestId('model-selector-button')),
// Model search input
searchInput: () => cy.get(byTestId('model-search-input')),
// Get all model options
options: () => cy.get('[data-testid^="model-option-"]'),
// Get specific model option by name
optionByName: (modelName: string) => cy.get(byTestId(`model-option-${modelName}`)),
// Get selected model option (has the selected class)
selectedOption: () => cy.get('[data-testid^="model-option-"]').filter('.bg-fill-content-select'),
};
/**
* Database Grid-related selectors
*/