diff --git a/apps/chat-e2e/src/tests/publishConversation.test.ts b/apps/chat-e2e/src/tests/publishConversation.test.ts index 1e62b37c6..2016d7012 100644 --- a/apps/chat-e2e/src/tests/publishConversation.test.ts +++ b/apps/chat-e2e/src/tests/publishConversation.test.ts @@ -62,6 +62,7 @@ dialAdminTest( adminTooltipAssertion, baseAssertion, setTestIds, + header, }) => { dialAdminTest.slow(); setTestIds( diff --git a/apps/chat-e2e/src/ui/selectors/sideBarSelectors.ts b/apps/chat-e2e/src/ui/selectors/sideBarSelectors.ts index 6852b2dc6..6d9d44f0a 100644 --- a/apps/chat-e2e/src/ui/selectors/sideBarSelectors.ts +++ b/apps/chat-e2e/src/ui/selectors/sideBarSelectors.ts @@ -11,7 +11,6 @@ export const SideBarSelectors = { newFolder: '[data-qa="create-folder"]', resizeIcon: '[data-qa="resize-icon"]', bottomPanel: '[data-qa="bottom-panel"]', - newEntity: '[data-qa="new-entity"]', arrowAdditionalIcon: '[data-qa="arrow-icon"]', search: '[data-qa="search"]', searchInput: '[data-qa="search-input"]', @@ -55,6 +54,7 @@ export const PromptBarSelectors = { approveRequiredPrompts: () => `${PromptBarSelectors.promptFolders} > ${SideBarSelectors.approveRequiredContainer}`, leftResizeIcon: '[data-qa="left-resize-icon"]', + newEntity: '[data-qa="new-entity"]', }; export const EntitySelectors = { diff --git a/apps/chat-e2e/src/ui/webElements/promptBar.ts b/apps/chat-e2e/src/ui/webElements/promptBar.ts index d48e39ac0..aa4fe6586 100644 --- a/apps/chat-e2e/src/ui/webElements/promptBar.ts +++ b/apps/chat-e2e/src/ui/webElements/promptBar.ts @@ -1,5 +1,6 @@ -import { SideBarSelectors } from '../selectors'; +import { PromptBarSelectors, SideBarSelectors } from '../selectors'; +import { Styles, removeAlpha } from '@/src/ui/domData'; import { FolderPrompts, PromptsTree, @@ -56,11 +57,31 @@ export class PromptBar extends SideBar { return this.sharedFolderPrompts; } + public newEntityButton = this.getChildElementBySelector( + PromptBarSelectors.newEntity, + ); + public async createNewPrompt() { await this.newEntityButton.waitForState(); await this.newEntityButton.click(); } + public async hoverOverNewEntity() { + await this.newEntityButton.waitForState(); + await this.newEntityButton.hoverOver(); + } + + public async getNewEntityBackgroundColor() { + const backgroundColor = await this.newEntityButton.getComputedStyleProperty( + Styles.backgroundColor, + ); + return removeAlpha(backgroundColor[0]); + } + + public async getNewEntityCursor() { + return this.newEntityButton.getComputedStyleProperty(Styles.cursor); + } + public async dragAndDropPromptFromFolder( folderName: string, promptName: string, diff --git a/apps/chat-e2e/src/ui/webElements/sideBar.ts b/apps/chat-e2e/src/ui/webElements/sideBar.ts index 8d04ec336..e68ddca7e 100644 --- a/apps/chat-e2e/src/ui/webElements/sideBar.ts +++ b/apps/chat-e2e/src/ui/webElements/sideBar.ts @@ -29,9 +29,6 @@ export class SideBar extends BaseElement { return this.chatLoader; } - public newEntityButton = this.getChildElementBySelector( - SideBarSelectors.newEntity, - ); public newFolderButton = this.getChildElementBySelector( SideBarSelectors.newFolder, ); @@ -64,22 +61,6 @@ export class SideBar extends BaseElement { SideBarSelectors.pinnedEntities, ).getChildElementBySelector(SideBarSelectors.folderSeparator); - public async hoverOverNewEntity() { - await this.newEntityButton.waitForState(); - await this.newEntityButton.hoverOver(); - } - - public async getNewEntityBackgroundColor() { - const backgroundColor = await this.newEntityButton.getComputedStyleProperty( - Styles.backgroundColor, - ); - return removeAlpha(backgroundColor[0]); - } - - public async getNewEntityCursor() { - return this.newEntityButton.getComputedStyleProperty(Styles.cursor); - } - public async createNewFolder() { await this.newFolderButton.click(); }