File tree Expand file tree Collapse file tree
apps/meteor/tests/end-to-end/api/livechat Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -484,10 +484,10 @@ describe('LIVECHAT - rooms', () => {
484484 } ) ;
485485
486486 after ( async ( ) => {
487- await updateSetting ( 'Livechat_Routing_Method' , 'Auto_Selection' ) ;
488- await updateSetting ( 'Livechat_allow_manual_on_hold' , false ) ;
489487 await closeOmnichannelRoom ( room . _id ) ;
490488 await closeOmnichannelRoom ( room2 . _id ) ;
489+ await updateSetting ( 'Livechat_allow_manual_on_hold' , false ) ;
490+ await updateSetting ( 'Livechat_Routing_Method' , 'Auto_Selection' ) ;
491491 } ) ;
492492
493493 it ( 'should not return on hold rooms along with queued rooms when `queued` is true and `onHold` is true' , async ( ) => {
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import {
1919 createLivechatRoom ,
2020 bulkCreateLivechatRooms ,
2121 startANewLivechatRoomAndTakeIt ,
22+ makeAgentAvailable ,
2223} from '../../../data/livechat/rooms' ;
2324import {
2425 addPermissions ,
@@ -294,6 +295,10 @@ import { generateRandomSLAData } from '../../../e2e/utils/omnichannel/sla';
294295 } ) ;
295296
296297 describe ( 'livechat/inquiry.setSLA' , ( ) => {
298+ before ( async ( ) => {
299+ await createAgent ( ) ;
300+ await makeAgentAvailable ( ) ;
301+ } ) ;
297302 it ( 'should return an "unauthorized error" when the user does not have the necessary permission' , async ( ) => {
298303 await removePermissions ( [ 'manage-livechat-sla' , 'view-l-room' , 'manage-livechat-priorities' ] ) ;
299304 const response = await request
@@ -349,7 +354,6 @@ import { generateRandomSLAData } from '../../../e2e/utils/omnichannel/sla';
349354 it ( 'should fail if sla is not valid' , async ( ) => {
350355 const visitor = await createVisitor ( ) ;
351356 const room = await createLivechatRoom ( visitor . token ) ;
352- await createAgent ( ) ;
353357
354358 const response = await request
355359 . put ( api ( 'livechat/inquiry.setSLA' ) )
You can’t perform that action at this time.
0 commit comments