1
1
import type { CodeGenType , MutationSetProjectPreferencesInGlobalCacheArgs , NexusGenObjects , NexusGenUnions } from '@packages/graphql/src/gen/nxs.gen'
2
- import type { InitializeProjectOptions , FoundBrowser , FoundSpec , LaunchOpts , OpenProjectLaunchOptions , Preferences , TestingType , ReceivedCypressOptions , AddProject , FullConfig , AllowedState } from '@packages/types'
2
+ import type { InitializeProjectOptions , FoundBrowser , FoundSpec , LaunchOpts , OpenProjectLaunchOptions , Preferences , TestingType , ReceivedCypressOptions , AddProject , FullConfig , AllowedState , SpecWithRelativeRoot } from '@packages/types'
3
3
import type { EventEmitter } from 'events'
4
4
import execa from 'execa'
5
5
import path from 'path'
@@ -40,7 +40,7 @@ export interface ProjectApiShape {
40
40
setProjectPreferences ( stated : AllowedState ) : void
41
41
makeProjectSavedState ( projectRoot : string ) : void
42
42
getDevServer ( ) : {
43
- updateSpecs ( specs : FoundSpec [ ] ) : void
43
+ updateSpecs ( specs : SpecWithRelativeRoot [ ] ) : void
44
44
start ( options : { specs : Cypress . Spec [ ] , config : FullConfig } ) : Promise < { port : number } >
45
45
close ( ) : void
46
46
emitter : EventEmitter
@@ -313,7 +313,7 @@ export class ProjectActions {
313
313
this . api . setPromptShown ( slug )
314
314
}
315
315
316
- setSpecs ( specs : FoundSpec [ ] ) {
316
+ setSpecs ( specs : SpecWithRelativeRoot [ ] ) {
317
317
this . ctx . project . setSpecs ( specs )
318
318
this . refreshSpecs ( specs )
319
319
@@ -324,7 +324,7 @@ export class ProjectActions {
324
324
this . ctx . emitter . specsChange ( )
325
325
}
326
326
327
- refreshSpecs ( specs : FoundSpec [ ] ) {
327
+ refreshSpecs ( specs : SpecWithRelativeRoot [ ] ) {
328
328
this . ctx . lifecycleManager . git ?. setSpecs ( specs . map ( ( s ) => s . absolute ) )
329
329
}
330
330
0 commit comments