@@ -321,15 +321,14 @@ describe('CLI Integration Tests', () => {
321321 test ( 'template command works with --template mode' , async ( ) => {
322322 const fixtureDir = path . resolve ( __dirname , '../test_fixtures/template' ) ;
323323 const testModelPath = path . join ( fixtureDir , 'model/document-system.json' ) ;
324- const localDirectory = path . join ( fixtureDir , 'model/url-to-file-directory.json' ) ;
325324 const templatePath = path . join ( fixtureDir , 'self-provided/single-template.hbs' ) ;
326325 const expectedOutputPath = path . join ( fixtureDir , 'expected-output/single-template-output.md' ) ;
327326 const outputDir = path . join ( tempDir , 'output-single-template' ) ;
328327 const outputFile = path . join ( outputDir , 'simple-template-output.md' ) ;
329328
330329 await run (
331330 calm (
332- `template --input ${ testModelPath } --template ${ templatePath } --output ${ outputFile } --url-to-local-file-mapping ${ localDirectory } `
331+ `template --input ${ testModelPath } --template ${ templatePath } --output ${ outputFile } `
333332 )
334333 ) ;
335334
@@ -342,14 +341,13 @@ describe('CLI Integration Tests', () => {
342341 test ( 'template command works with --template-dir mode' , async ( ) => {
343342 const fixtureDir = path . resolve ( __dirname , '../test_fixtures/template' ) ;
344343 const testModelPath = path . join ( fixtureDir , 'model/document-system.json' ) ;
345- const localDirectory = path . join ( fixtureDir , 'model/url-to-file-directory.json' ) ;
346344 const templateDirPath = path . join ( fixtureDir , 'self-provided/template-dir' ) ;
347345 const expectedOutputDir = path . join ( fixtureDir , 'expected-output/template-dir' ) ;
348346 const actualOutputDir = path . join ( tempDir , 'output-template-dir' ) ;
349347
350348 await run (
351349 calm (
352- `template --input ${ testModelPath } --template-dir ${ templateDirPath } --output ${ actualOutputDir } --url-to-local-file-mapping ${ localDirectory } `
350+ `template --input ${ testModelPath } --template-dir ${ templateDirPath } --output ${ actualOutputDir } `
353351 )
354352 ) ;
355353
@@ -472,84 +470,51 @@ describe('CLI Integration Tests', () => {
472470 await expectDirectoryMatch ( expectedOutputDocifyWebsite , outputWebsite ) ;
473471
474472 //STEP 3: Add flow to architecture-document
475- const flowsDir = path . resolve ( tempDir , 'flows' ) ;
476- const flowFile = path . resolve ( flowsDir , 'conference-signup.flow.json' ) ;
477473 const flowUrl = 'https://calm.finos.org/getting-started/flows/conference-signup.flow.json' ;
478- fs . mkdirSync ( flowsDir , { recursive : true } ) ;
479-
480- /* eslint-disable quotes */
481- writeJson ( flowFile , {
482- $schema : 'https://calm.finos.org/release/1.0-rc2/meta/flow.json' ,
483- $id : flowUrl ,
484- 'unique-id' : 'flow-conference-signup' ,
485- name : 'Conference Signup Flow' ,
486- description :
487- 'Flow for registering a user through the conference website and storing their details in the attendee database.' ,
488- transitions : [
489- {
490- 'relationship-unique-id' :
491- 'conference-website-load-balancer' ,
492- 'sequence-number' : 1 ,
493- description :
494- 'User submits sign-up form via Conference Website to Load Balancer' ,
495- } ,
496- {
497- 'relationship-unique-id' : 'load-balancer-attendees' ,
498- 'sequence-number' : 2 ,
499- description :
500- 'Load Balancer forwards request to Attendees Service' ,
501- } ,
502- {
503- 'relationship-unique-id' : 'attendees-attendees-store' ,
504- 'sequence-number' : 3 ,
505- description :
506- 'Attendees Service stores attendee info in the Attendees Store' ,
507- } ,
508- ] ,
509- } ) ;
510474
511- await expectFilesMatch (
512- path . resolve (
513- GETTING_STARTED_TEST_FIXTURES_DIR ,
514- 'STEP-3/flows/conference-signup.flow.json'
515- ) ,
516- flowFile
517- ) ;
518-
519- const directory = path . resolve ( tempDir , 'directory.json' ) ;
520- writeJson ( directory , {
521- 'https://calm.finos.org/getting-started/flows/conference-signup.flow.json' :
522- 'flows/conference-signup-with-flow.arch.json' ,
523- } ) ; //since the flow document is not published
524475
525476 patchJson ( outputArchitecture , ( arch ) => {
526- arch [ 'flows' ] = arch [ 'flows' ] || [ ] ;
527- if ( ! arch [ 'flows' ] . includes ( flowUrl ) ) arch [ 'flows' ] . push ( flowUrl ) ;
477+ arch [ 'flows' ] = [
478+ {
479+ $schema : 'https://calm.finos.org/release/1.0-rc2/meta/flow.json' ,
480+ $id : flowUrl ,
481+ 'unique-id' : 'flow-conference-signup' ,
482+ name : 'Conference Signup Flow' ,
483+ description : 'Flow for registering a user through the conference website and storing their details in the attendee database.' ,
484+ transitions : [
485+ {
486+ 'relationship-unique-id' : 'conference-website-load-balancer' ,
487+ 'sequence-number' : 1 ,
488+ description : 'User submits sign-up form via Conference Website to Load Balancer' ,
489+ } ,
490+ {
491+ 'relationship-unique-id' : 'load-balancer-attendees' ,
492+ 'sequence-number' : 2 ,
493+ description : 'Load Balancer forwards request to Attendees Service' ,
494+ } ,
495+ {
496+ 'relationship-unique-id' : 'attendees-attendees-store' ,
497+ 'sequence-number' : 3 ,
498+ description : 'Attendees Service stores attendee info in the Attendees Store' ,
499+ } ,
500+ ] ,
501+ } ,
502+ ] ;
528503 } ) ;
504+
529505 await expectFilesMatch (
530506 path . resolve ( GETTING_STARTED_TEST_FIXTURES_DIR , 'STEP-3/conference-signup-with-flow.arch.json' ) ,
531507 outputArchitecture
532508 ) ;
533509
534- // Patch directory.json to map the URL → local path
535- patchJson ( directory , ( dir ) => {
536- dir [ flowUrl ] = 'flows/conference-signup.flow.json' ;
537- } ) ;
538- await expectFilesMatch (
539- path . resolve (
540- GETTING_STARTED_TEST_FIXTURES_DIR ,
541- 'STEP-3/directory.json'
542- ) ,
543- directory
544- ) ;
545510
546511 const outputWebsiteWithFlow = path . resolve (
547512 tempDir ,
548513 'website-with-flow'
549514 ) ;
550515 await run (
551516 calm (
552- `docify --input ${ outputArchitecture } --output ${ outputWebsiteWithFlow } --url-to-local-file-mapping ${ directory } `
517+ `docify --input ${ outputArchitecture } --output ${ outputWebsiteWithFlow } `
553518 )
554519 ) ;
555520
0 commit comments