@@ -16,6 +16,26 @@ jest.mock('../cookies', () => ({
1616
1717const addShare = jest . fn ( async ( ) => ( { addShare : null } ) ) ;
1818const getConnectionByIndex = jest . fn ( async ( ) => ( { connection : null } ) ) ;
19+ const createDesignerProject = jest . fn ( async ( ) => ( {
20+ createDesignerProject : 'id' ,
21+ } ) ) ;
22+ const deleteDesignerProject = jest . fn ( async ( ) => ( {
23+ deleteDesignerProject : 'id' ,
24+ } ) ) ;
25+ const getDesignerProject = jest . fn ( async ( ) => {
26+ return {
27+ getDesignerProject : {
28+ id : 'id' ,
29+ name : 'name' ,
30+ content : 'content' ,
31+ created_at : 'created_at' ,
32+ updated_at : 'updated_at' ,
33+ owner : { id : 'id' , username : 'username' } ,
34+ roles : [ ] ,
35+ } ,
36+ } ;
37+ } ) ;
38+ const getDesignerProjects = jest . fn ( async ( ) => ( { getDesignerProjects : [ ] } ) ) ;
1939const getVoiceboxConversation = jest . fn ( async ( ) => ( {
2040 getVoiceboxConversation : null ,
2141} ) ) ;
@@ -25,18 +45,30 @@ const listVoiceboxConversations = jest.fn(async () => ({
2545 voiceboxConversationCount : null ,
2646} ) ) ;
2747const profile = jest . fn ( async ( ) => ( { profile : null } ) ) ;
48+ const renameDesignerProject = jest . fn ( async ( ) => ( {
49+ renameDesignerProject : 'id' ,
50+ } ) ) ;
2851const trackEvent = jest . fn ( async ( ) => ( { trackEvent : null } ) ) ;
52+ const updateDesignerProject = jest . fn ( async ( ) => ( {
53+ updateDesignerProject : 'id' ,
54+ } ) ) ;
2955
3056describe ( 'getPortalSdk' , ( ) => {
3157 beforeEach ( ( ) => {
3258 jest . spyOn ( portalSdkImport , 'getSdk' ) . mockReturnValue ( {
3359 addShare,
3460 getConnectionByIndex,
61+ createDesignerProject,
62+ deleteDesignerProject,
63+ getDesignerProject,
64+ getDesignerProjects,
3565 getVoiceboxConversation,
3666 listConnections,
3767 listVoiceboxConversations,
3868 profile,
69+ renameDesignerProject,
3970 trackEvent,
71+ updateDesignerProject,
4072 } ) ;
4173 } ) ;
4274
0 commit comments