@@ -318,7 +318,7 @@ describe('intelliStory', () => {
318318 } ) ;
319319
320320 describe ( 'runGraphGeneration()' , ( ) => {
321- it ( 'starts the job and returns the graph payload on done' , async ( ) => {
321+ it ( 'starts the job and resolves once the graph is done' , async ( ) => {
322322 let log = mockLog ( ) ;
323323 let generate = jasmine . createSpy ( 'generateIntelliStoryGraph' ) ;
324324 let data = { affected_stories : [ 'src/A.stories.js' ] } ;
@@ -337,9 +337,10 @@ describe('intelliStory', () => {
337337 affectedFileLocations : { 0 : [ [ 3 , 3 ] , [ 6 , 7 ] ] }
338338 } ;
339339
340- let res = await runGraphGeneration ( percy , 'bld-1' , payload , log ) ;
340+ // selection is server-side now, so nothing is returned — it just
341+ // enqueues generation and resolves once the job reaches `done`.
342+ await runGraphGeneration ( percy , 'bld-1' , payload , log ) ;
341343
342- expect ( res ) . toBe ( data ) ;
343344 expect ( generate ) . toHaveBeenCalledWith ( 'bld-1' , payload ) ;
344345 } ) ;
345346
@@ -429,7 +430,7 @@ describe('intelliStory', () => {
429430 } ;
430431
431432 let p = runGraphGeneration ( percy , 'bld-1' , { files : [ ] , modules : [ ] , storybookPaths : [ ] , affectedNodes : [ ] } , log ) ;
432- await expectAsync ( drainPolls ( p ) ) . toBeResolvedTo ( data ) ;
433+ await expectAsync ( drainPolls ( p ) ) . toBeResolved ( ) ;
433434 } ) ;
434435
435436 it ( 'bails after the poll loop times out without reaching done' , async ( ) => {
0 commit comments