11import { PartnersClient } from './partners-client.js'
22import { CreateAppQuery } from '../../api/graphql/create_app.js'
33import { AppInterface , WebType } from '../../models/app/app.js'
4- import { Organization , OrganizationStore } from '../../models/organization.js'
4+ import { Organization , OrganizationSource , OrganizationStore } from '../../models/organization.js'
55import {
66 testPartnersUserSession ,
77 testApp ,
@@ -32,11 +32,13 @@ const LOCAL_APP: AppInterface = testApp({
3232 name : 'my-app' ,
3333} )
3434
35- const ORG1 : Organization = {
35+ type OrganizationInPartnersResponse = Omit < Organization , 'source' >
36+
37+ const ORG1 : OrganizationInPartnersResponse = {
3638 id : '1' ,
3739 businessName : 'org1' ,
3840}
39- const ORG2 : Organization = {
41+ const ORG2 : OrganizationInPartnersResponse = {
4042 id : '2' ,
4143 businessName : 'org2' ,
4244}
@@ -88,7 +90,7 @@ describe('createApp', () => {
8890 }
8991
9092 // When
91- const got = await partnersClient . createApp ( ORG1 , localApp . name , {
93+ const got = await partnersClient . createApp ( { ... ORG1 , source : OrganizationSource . Partners } , localApp . name , {
9294 scopesArray : [ 'write_products' ] ,
9395 isLaunchable : true ,
9496 } )
@@ -113,7 +115,7 @@ describe('createApp', () => {
113115 }
114116
115117 // When
116- const got = await partnersClient . createApp ( ORG1 , LOCAL_APP . name , {
118+ const got = await partnersClient . createApp ( { ... ORG1 , source : OrganizationSource . Partners } , LOCAL_APP . name , {
117119 isLaunchable : false ,
118120 scopesArray : [ 'write_products' ] ,
119121 } )
@@ -132,7 +134,7 @@ describe('createApp', () => {
132134 } )
133135
134136 // When
135- const got = partnersClient . createApp ( ORG2 , LOCAL_APP . name )
137+ const got = partnersClient . createApp ( { ... ORG2 , source : OrganizationSource . Partners } , LOCAL_APP . name )
136138
137139 // Then
138140 await expect ( got ) . rejects . toThrow ( `some-error` )
0 commit comments