11import { Conversation } from '@/chat/types/chat' ;
22import dialTest from '@/src/core/dialFixtures' ;
33import { API , Attachment } from '@/src/testData' ;
4- import { Button } from '@/src/ui/webElements' ;
54import { GeneratorUtil , ModelsUtil } from '@/src/utils' ;
65
76dialTest (
87 'Generated in response picture appears in Manage attachments' ,
98 async ( {
109 dialHomePage,
10+ filesManagerPage,
1111 setTestIds,
12- chatBar ,
12+ navigationPanel ,
1313 conversationData,
1414 localStorageManager,
1515 dataInjector,
1616 fileApiHelper,
17- filesManagerModalFoldersTree,
18- filesManagerModalGrid,
19- filesManagerModalGridAssertion,
20- filesManagerModal,
17+ filesManagerFoldersTree,
18+ filesManagerGrid,
19+ filesManagerGridAssertion,
2120 chatHeader,
2221 chat,
2322 talkToAgentDialog,
@@ -34,7 +33,6 @@ dialTest(
3433 const secondImagePath = API . modelFilePath ( updatedModel . id ) ;
3534 const secondImagePathSegments = secondImagePath . split ( '/' ) ;
3635 const requestContent = 'request' ;
37- let closeButton : Button ;
3836
3937 await dialTest . step (
4038 'Create conversation with attachment in the response' ,
@@ -57,46 +55,44 @@ dialTest(
5755 ) ;
5856
5957 await dialTest . step (
60- 'Open "Manage attachments" modal and verify image is placed inside nested folders' ,
58+ 'Open "Files manager" page and verify image is placed inside nested folders' ,
6159 async ( ) => {
62- await dialHomePage . openHomePage ( ) ;
63- await dialHomePage . waitForPageLoaded ( ) ;
64- await conversations . selectEntity ( responseImageConversation . name ) ;
65- await chatBar . openManageAttachmentsModal ( ) ;
66- await filesManagerModalFoldersTree . expandFolders ( ...imagePathSegments ) ;
67- await filesManagerModalGridAssertion . assertElementState (
68- filesManagerModalGrid . gridRowByNameCell ( Attachment . sunImageName ) ,
60+ await filesManagerPage . openFilesManagerPage ( ) ;
61+ await filesManagerPage . waitForPageLoaded ( ) ;
62+ await filesManagerFoldersTree . expandFolders ( ...imagePathSegments ) ;
63+ await filesManagerGridAssertion . assertGridRowByNameState (
64+ Attachment . sunImageName ,
6965 'visible' ,
7066 ) ;
71- closeButton = filesManagerModal . getCloseButton ( ) ;
72- await closeButton . click ( ) ;
7367 } ,
7468 ) ;
7569
7670 await dialTest . step (
77- 'Generate one more picture for the same conversation and verify it is visible on "Manage attachments" modal ' ,
71+ 'Generate one more picture for the same conversation and verify it is visible on "Files manager" ' ,
7872 async ( ) => {
73+ await navigationPanel . backToChat ( ) ;
7974 await dialHomePage . mockChatImageResponse (
8075 defaultModel . id ,
8176 Attachment . cloudImageName ,
8277 ) ;
78+ await conversations . selectEntity ( responseImageConversation . name ) ;
8379 await chat . sendRequestWithButton ( requestContent ) ;
8480 await fileApiHelper . putFile ( Attachment . cloudImageName , {
8581 parentPath : imagePath ,
8682 } ) ;
8783
88- await chatBar . openManageAttachmentsModal ( ) ;
89- await filesManagerModalFoldersTree . expandFolders ( ...imagePathSegments ) ;
90- await filesManagerModalGridAssertion . assertElementState (
91- filesManagerModalGrid . gridRowByNameCell ( Attachment . cloudImageName ) ,
84+ await navigationPanel . goToFilesManager ( ) ;
85+ await filesManagerFoldersTree . expandFolders ( ...imagePathSegments ) ;
86+ await filesManagerGridAssertion . assertElementState (
87+ filesManagerGrid . gridRowByNameCell ( Attachment . cloudImageName ) ,
9288 'visible' ,
9389 ) ;
94- await closeButton . click ( ) ;
90+ await navigationPanel . backToChat ( ) ;
9591 } ,
9692 ) ;
9793
9894 await dialTest . step (
99- 'Change conversation model, generate one more picture and verify it is visible on "Manage attachments" modal under new model folder' ,
95+ 'Change conversation model, generate one more picture and verify it is visible on "Files manager" under new model folder' ,
10096 async ( ) => {
10197 await chatHeader . chatAgent . click ( ) ;
10298 await talkToAgentDialog . selectAgent ( updatedModel ) ;
@@ -110,12 +106,10 @@ dialTest(
110106 parentPath : secondImagePath ,
111107 } ) ;
112108
113- await chatBar . openManageAttachmentsModal ( ) ;
114- await filesManagerModalFoldersTree . expandFolders (
115- ...secondImagePathSegments ,
116- ) ;
117- await filesManagerModalGridAssertion . assertElementState (
118- filesManagerModalGrid . gridRowByNameCell ( Attachment . flowerImageName ) ,
109+ await navigationPanel . goToFilesManager ( ) ;
110+ await filesManagerFoldersTree . expandFolders ( ...secondImagePathSegments ) ;
111+ await filesManagerGridAssertion . assertElementState (
112+ filesManagerGrid . gridRowByNameCell ( Attachment . flowerImageName ) ,
119113 'visible' ,
120114 ) ;
121115 } ,
0 commit comments