@@ -163,7 +163,7 @@ describe('Amazon Q Test Generation', function () {
163163 for ( const { language, filePath } of testFiles ) {
164164 describe ( `${ language } file` , ( ) => {
165165 beforeEach ( async ( ) => {
166- await waitUntil ( async ( ) => await setupTestDocument ( filePath , language ) , { } )
166+ await setupTestDocument ( filePath , language )
167167
168168 tab . addChatMessage ( { command : '/test' } )
169169 await tab . waitForChatFinishesLoading ( )
@@ -186,31 +186,31 @@ describe('Amazon Q Test Generation', function () {
186186 } )
187187 } )
188188
189- describe ( 'Accept code' , async ( ) => {
190- it ( 'Clicks on accept ' , async ( ) => {
189+ describe ( 'Reject code' , async ( ) => {
190+ it ( 'Clicks on reject ' , async ( ) => {
191191 await tab . waitForButtons ( [ FollowUpTypes . AcceptCode , FollowUpTypes . RejectCode ] )
192- tab . clickButton ( FollowUpTypes . AcceptCode )
192+ tab . clickButton ( FollowUpTypes . RejectCode )
193193 await tab . waitForChatFinishesLoading ( )
194194
195195 await waitForChatItems ( 7 )
196- const acceptedMessage = tab . getChatItems ( ) [ 7 ]
196+ const rejectedMessage = tab . getChatItems ( ) [ 7 ]
197197
198- assert . deepStrictEqual ( acceptedMessage ?. type , 'answer-part' )
199- assert . deepStrictEqual ( acceptedMessage ?. followUp ?. options ?. [ 0 ] . pillText , 'Accepted ' )
198+ assert . deepStrictEqual ( rejectedMessage ?. type , 'answer-part' )
199+ assert . deepStrictEqual ( rejectedMessage ?. followUp ?. options ?. [ 0 ] . pillText , 'Rejected ' )
200200 } )
201201 } )
202202
203- describe ( 'Reject code' , async ( ) => {
204- it ( 'Clicks on reject ' , async ( ) => {
203+ describe ( 'Accept code' , async ( ) => {
204+ it ( 'Clicks on accept ' , async ( ) => {
205205 await tab . waitForButtons ( [ FollowUpTypes . AcceptCode , FollowUpTypes . RejectCode ] )
206- tab . clickButton ( FollowUpTypes . RejectCode )
206+ tab . clickButton ( FollowUpTypes . AcceptCode )
207207 await tab . waitForChatFinishesLoading ( )
208208
209209 await waitForChatItems ( 7 )
210- const rejectedMessage = tab . getChatItems ( ) [ 7 ]
210+ const acceptedMessage = tab . getChatItems ( ) [ 7 ]
211211
212- assert . deepStrictEqual ( rejectedMessage ?. type , 'answer-part' )
213- assert . deepStrictEqual ( rejectedMessage ?. followUp ?. options ?. [ 0 ] . pillText , 'Rejected ' )
212+ assert . deepStrictEqual ( acceptedMessage ?. type , 'answer-part' )
213+ assert . deepStrictEqual ( acceptedMessage ?. followUp ?. options ?. [ 0 ] . pillText , 'Accepted ' )
214214 } )
215215 } )
216216 } )
0 commit comments