mirror of
https://github.com/AppFlowy-IO/AppFlowy-Web.git
synced 2025-11-30 11:27:55 +08:00
chore: selector
This commit is contained in:
@@ -81,6 +81,19 @@ export const SpaceSelectors = {
|
||||
|
||||
// Get more actions button for spaces
|
||||
moreActionsButton: () => cy.get(byTestId('inline-more-actions')),
|
||||
|
||||
// New space creation controls
|
||||
createNewSpaceButton: () => cy.get(byTestId('create-new-space-button')),
|
||||
createSpaceModal: () => cy.get(byTestId('create-space-modal')),
|
||||
spaceNameInput: () => cy.get(byTestId('space-name-input')),
|
||||
};
|
||||
|
||||
/**
|
||||
* Breadcrumb selectors
|
||||
*/
|
||||
export const BreadcrumbSelectors = {
|
||||
navigation: () => cy.get(byTestId('breadcrumb-navigation')),
|
||||
items: () => cy.get(byTestIdContains('breadcrumb-item-')),
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -124,6 +137,13 @@ export const ModalSelectors = {
|
||||
|
||||
// Get space item in modal
|
||||
spaceItemInModal: () => cy.get(byTestId('space-item')),
|
||||
|
||||
// Generic modal accept/ok button
|
||||
okButton: () => cy.get(byTestId('modal-ok-button')),
|
||||
|
||||
// Rename modal inputs
|
||||
renameInput: () => cy.get(byTestId('rename-modal-input')),
|
||||
renameSaveButton: () => cy.get(byTestId('rename-modal-save')),
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -154,6 +174,10 @@ export const ShareSelectors = {
|
||||
// Publish URL input
|
||||
publishUrlInput: () => cy.get(byTestId('publish-url-input')),
|
||||
|
||||
// Publish namespace and name inputs
|
||||
publishNamespace: () => cy.get(byTestId('publish-namespace')),
|
||||
publishNameInput: () => cy.get(byTestId('publish-name-input')),
|
||||
|
||||
// Page settings button
|
||||
pageSettingsButton: () => cy.get(byTestId('page-settings-button')),
|
||||
|
||||
@@ -201,6 +225,17 @@ export const SidebarSelectors = {
|
||||
pageHeader: () => cy.get(byTestId('sidebar-page-header')),
|
||||
};
|
||||
|
||||
/**
|
||||
* Trash view selectors
|
||||
*/
|
||||
export const TrashSelectors = {
|
||||
sidebarTrashButton: () => cy.get(byTestId('sidebar-trash-button')),
|
||||
table: () => cy.get(byTestId('trash-table')),
|
||||
rows: () => cy.get(byTestId('trash-table-row')),
|
||||
restoreButton: () => cy.get(byTestId('trash-restore-button')),
|
||||
deleteButton: () => cy.get(byTestId('trash-delete-button')),
|
||||
};
|
||||
|
||||
/**
|
||||
* Chat Model Selector-related selectors
|
||||
* Used for testing AI model selection in chat interface
|
||||
@@ -222,6 +257,19 @@ export const ModelSelectorSelectors = {
|
||||
selectedOption: () => cy.get('[data-testid^="model-option-"]').filter('.bg-fill-content-select'),
|
||||
};
|
||||
|
||||
/**
|
||||
* Chat UI selectors
|
||||
*/
|
||||
export const ChatSelectors = {
|
||||
aiChatContainer: () => cy.get(byTestId('ai-chat-container')),
|
||||
formatToggle: () => cy.get(byTestId('chat-input-format-toggle')),
|
||||
formatGroup: () => cy.get(byTestId('chat-format-group')),
|
||||
browsePromptsButton: () => cy.get(byTestId('chat-input-browse-prompts')),
|
||||
relatedViewsButton: () => cy.get(byTestId('chat-input-related-views')),
|
||||
relatedViewsPopover: () => cy.get(byTestId('chat-related-views-popover')),
|
||||
sendButton: () => cy.get(byTestId('chat-input-send')),
|
||||
};
|
||||
|
||||
/**
|
||||
* Database Grid-related selectors
|
||||
*/
|
||||
@@ -445,6 +493,27 @@ export const AuthSelectors = {
|
||||
logoutConfirmButton: () => cy.get(byTestId('logout-confirm-button')),
|
||||
};
|
||||
|
||||
/**
|
||||
* Account settings selectors
|
||||
*/
|
||||
export const AccountSelectors = {
|
||||
settingsButton: () => cy.get(byTestId('account-settings-button')),
|
||||
settingsDialog: () => cy.get(byTestId('account-settings-dialog')),
|
||||
dateFormatDropdown: () => cy.get(byTestId('date-format-dropdown')),
|
||||
dateFormatOptionYearMonthDay: () => cy.get(byTestId('date-format-1')),
|
||||
timeFormatDropdown: () => cy.get(byTestId('time-format-dropdown')),
|
||||
timeFormatOption24: () => cy.get(byTestId('time-format-1')),
|
||||
startWeekDropdown: () => cy.get(byTestId('start-week-on-dropdown')),
|
||||
startWeekMonday: () => cy.get(byTestId('start-week-1')),
|
||||
};
|
||||
|
||||
/**
|
||||
* Avatar display selectors
|
||||
*/
|
||||
export const AvatarUiSelectors = {
|
||||
image: () => cy.get(byTestId('avatar-image')),
|
||||
};
|
||||
|
||||
export function waitForReactUpdate(ms: number = 500) {
|
||||
return cy.wait(ms);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user