@@ -151,8 +151,8 @@ beforeEach(async () => {
151151
152152 await saveFixtures ( con , User , usersFixture ) ;
153153 await saveFixtures ( con , Keyword , keywordsFixture ) ;
154- await saveFixtures ( con , Organization , organizationsFixture ) ;
155154 await saveFixtures ( con , DatasetLocation , datasetLocationsFixture ) ;
155+ await saveFixtures ( con , Organization , organizationsFixture ) ;
156156 await saveFixtures ( con , Opportunity , opportunitiesFixture ) ;
157157 await saveFixtures ( con , OpportunityLocation , opportunityLocationsFixture ) ;
158158 await saveFixtures ( con , QuestionScreening , opportunityQuestionsFixture ) ;
@@ -233,7 +233,11 @@ describe('query opportunityById', () => {
233233 image
234234 website
235235 description
236- location
236+ location {
237+ city
238+ country
239+ subdivision
240+ }
237241 customLinks {
238242 ...Link
239243 }
@@ -323,7 +327,11 @@ describe('query opportunityById', () => {
323327 image : 'https://example.com/logo.png' ,
324328 website : 'https://daily.dev' ,
325329 description : 'A platform for developers' ,
326- location : 'San Francisco' ,
330+ location : {
331+ city : 'San Francisco' ,
332+ country : 'USA' ,
333+ subdivision : 'CA' ,
334+ } ,
327335 customLinks : [
328336 {
329337 type : 'custom' ,
@@ -4343,7 +4351,10 @@ describe('mutation editOpportunity', () => {
43434351 description
43444352 perks
43454353 founded
4346- location
4354+ location {
4355+ city
4356+ country
4357+ }
43474358 category
43484359 size
43494360 stage
@@ -4361,7 +4372,7 @@ describe('mutation editOpportunity', () => {
43614372 description : 'Updated description' ,
43624373 perks : [ 'Remote work' , 'Flexible hours' ] ,
43634374 founded : 2021 ,
4364- location : 'Berlin, Germany ' ,
4375+ externalLocationId : 'norway-remote ' ,
43654376 category : 'Technology' ,
43664377 size : CompanySize . COMPANY_SIZE_51_200 ,
43674378 stage : CompanyStage . SERIES_B ,
@@ -4376,7 +4387,10 @@ describe('mutation editOpportunity', () => {
43764387 description : 'Updated description' ,
43774388 perks : [ 'Remote work' , 'Flexible hours' ] ,
43784389 founded : 2021 ,
4379- location : 'Berlin, Germany' ,
4390+ location : {
4391+ city : null ,
4392+ country : 'Norway' ,
4393+ } ,
43804394 category : 'Technology' ,
43814395 size : CompanySize . COMPANY_SIZE_51_200 ,
43824396 stage : CompanyStage . SERIES_B ,
@@ -4392,11 +4406,14 @@ describe('mutation editOpportunity', () => {
43924406 description : 'Updated description' ,
43934407 perks : [ 'Remote work' , 'Flexible hours' ] ,
43944408 founded : 2021 ,
4395- location : 'Berlin, Germany' ,
43964409 category : 'Technology' ,
43974410 size : CompanySize . COMPANY_SIZE_51_200 ,
43984411 stage : CompanyStage . SERIES_B ,
43994412 } ) ;
4413+ const location = await organization . location ;
4414+ expect ( location ) . toMatchObject ( {
4415+ country : 'Norway' ,
4416+ } ) ;
44004417 } ) ;
44014418
44024419 it ( 'should update recruiter title and bio' , async ( ) => {
@@ -4527,7 +4544,10 @@ describe('mutation editOpportunity', () => {
45274544 description
45284545 perks
45294546 founded
4530- location
4547+ location {
4548+ city
4549+ country
4550+ }
45314551 category
45324552 size
45334553 stage
@@ -4569,7 +4589,7 @@ describe('mutation editOpportunity', () => {
45694589 description : 'Updated description' ,
45704590 perks : [ 'Remote work' , 'Flexible hours' ] ,
45714591 founded : 2021 ,
4572- location : 'Berlin, Germany ' ,
4592+ externalLocationId : 'norway-remote ' ,
45734593 category : 'Technology' ,
45744594 size : CompanySize . COMPANY_SIZE_51_200 ,
45754595 stage : CompanyStage . SERIES_B ,
@@ -4585,7 +4605,10 @@ describe('mutation editOpportunity', () => {
45854605 description : 'Updated description' ,
45864606 perks : [ 'Remote work' , 'Flexible hours' ] ,
45874607 founded : 2021 ,
4588- location : 'Berlin, Germany' ,
4608+ location : {
4609+ city : null ,
4610+ country : 'Norway' ,
4611+ } ,
45894612 category : 'Technology' ,
45904613 size : CompanySize . COMPANY_SIZE_51_200 ,
45914614 stage : CompanyStage . SERIES_B ,
@@ -4602,11 +4625,14 @@ describe('mutation editOpportunity', () => {
46024625 description : 'Updated description' ,
46034626 perks : [ 'Remote work' , 'Flexible hours' ] ,
46044627 founded : 2021 ,
4605- location : 'Berlin, Germany' ,
46064628 category : 'Technology' ,
46074629 size : CompanySize . COMPANY_SIZE_51_200 ,
46084630 stage : CompanyStage . SERIES_B ,
46094631 } ) ;
4632+ const location = await organization . location ;
4633+ expect ( location ) . toMatchObject ( {
4634+ country : 'Norway' ,
4635+ } ) ;
46104636
46114637 const opportunityAfter = await con
46124638 . getRepository ( OpportunityJob )
0 commit comments