-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eaad32a
commit 0280431
Showing
40 changed files
with
153 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[test] | ||
coverage = true | ||
coverageReporter = ["text", "lcov"] | ||
coverageDir = "dist/reports/coverage" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
7 changes: 0 additions & 7 deletions
7
libs/pathway-design/creation/server/business/entities/pathway/README.md
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
libs/pathway-design/creation/server/business/entities/pathway/src/index.ts
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
libs/pathway-design/creation/server/business/entities/pathway/src/lib/pathway.ts
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
libs/pathway-design/creation/server/business/usecases/init-pathway/cucumber.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
libs/pathway-design/creation/server/business/usecases/init-pathway/src/index.ts
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
libs/pathway-design/creation/server/business/usecases/init-pathway/src/lib/index.feature
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
libs/pathway-design/creation/server/business/usecases/init-pathway/src/lib/index.step.ts
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
libs/pathway-design/creation/server/business/usecases/init-pathway/src/lib/index.usecase.ts
This file was deleted.
Oops, something went wrong.
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
libs/pathway-design/server/business/entities/pathway/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# pathway-design-server-business-entities-pathway | ||
|
||
This library was generated with [Nx](https://nx.dev). | ||
|
||
## Building | ||
|
||
Run `nx build pathway-design-server-business-entities-pathway` to build the library. |
4 changes: 2 additions & 2 deletions
4
...rver/business/entities/pathway/biome.json → ...rver/business/entities/pathway/biome.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...er/business/entities/pathway/package.json → ...er/business/entities/pathway/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
libs/pathway-design/server/business/entities/pathway/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export { | ||
PathwayDesignServerBusinessEntitiesPathway, | ||
PathwayDesignServerBusinessEntitiesPathwayInitDto, | ||
} from './lib/pathway'; |
17 changes: 17 additions & 0 deletions
17
libs/pathway-design/server/business/entities/pathway/src/lib/pathway.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export class PathwayDesignServerBusinessEntitiesPathway { | ||
name: string | undefined; | ||
description: string | undefined; | ||
field: string | undefined; | ||
|
||
init(data: PathwayDesignServerBusinessEntitiesPathwayInitDto) { | ||
this.name = data.name; | ||
this.description = data.description; | ||
this.field = data.field; | ||
} | ||
} | ||
|
||
export interface PathwayDesignServerBusinessEntitiesPathwayInitDto { | ||
name: string; | ||
description: string; | ||
field: string; | ||
} |
2 changes: 1 addition & 1 deletion
2
...r/business/entities/pathway/tsconfig.json → ...r/business/entities/pathway/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...siness/entities/pathway/tsconfig.lib.json → ...siness/entities/pathway/tsconfig.lib.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...business/usecases/init-pathway/biome.json → ...business/usecases/init-pathway/biome.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
libs/pathway-design/server/business/usecases/init-pathway/cucumber.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module.exports = { | ||
default: { | ||
paths: [ | ||
'libs/pathway-design/server/business/usecases/init-pathway/src/lib/**/*.feature', | ||
], | ||
requireModule: ['ts-node/register', 'tsconfig-paths/register'], | ||
require: [ | ||
'libs/pathway-design/server/business/usecases/init-pathway/src/lib/**/*.ts', | ||
], | ||
format: [ | ||
'json:dist/reports/libs/pathway-design/init-pathway/tests/index.json', | ||
'html:dist/reports/libs/pathway-design/init-pathway/test/index.html', | ||
], | ||
}, | ||
}; |
2 changes: 1 addition & 1 deletion
2
...siness/usecases/init-pathway/package.json → ...siness/usecases/init-pathway/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...siness/usecases/init-pathway/project.json → ...siness/usecases/init-pathway/project.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
libs/pathway-design/server/business/usecases/init-pathway/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { PathwayDesignServerBusinessUsecasesInitPathway } from './lib/index.usecase'; |
9 changes: 9 additions & 0 deletions
9
libs/pathway-design/server/business/usecases/init-pathway/src/lib/index.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Feature: Initiate a Pathway | ||
|
||
Scenario: I want to initiate a pathway | ||
When I want to initiate a pathway with these data | ||
| name | description | field | | ||
| My Pathway | A test pathway | biology | | ||
Then I should retrieve a pathway initiated with its data | ||
| name | description | field | | ||
| My Pathway | A test pathway | biology | |
35 changes: 35 additions & 0 deletions
35
libs/pathway-design/server/business/usecases/init-pathway/src/lib/index.step.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import type { | ||
PathwayDesignServerBusinessEntitiesPathway, | ||
PathwayDesignServerBusinessEntitiesPathwayInitDto, | ||
} from '@bewoak/pathway-design-server-business-entities-pathway'; | ||
import type { DataTable } from '@cucumber/cucumber'; | ||
import { binding, then, when } from 'cucumber-tsflow'; | ||
import { strict as assert } from 'node:assert'; | ||
import { PathwayDesignServerBusinessUsecasesInitPathway } from './index.usecase'; | ||
|
||
@binding() | ||
export default class ControllerSteps { | ||
private initPathwayUsecase: PathwayDesignServerBusinessUsecasesInitPathway = | ||
new PathwayDesignServerBusinessUsecasesInitPathway(); | ||
private pathway: PathwayDesignServerBusinessEntitiesPathway | undefined; | ||
|
||
@when('I want to initiate a pathway with these data') | ||
public whenIInitiateAPathway(dataTable: DataTable) { | ||
const data = | ||
dataTable.hashes()[0] as unknown as PathwayDesignServerBusinessEntitiesPathwayInitDto; | ||
this.pathway = this.initPathwayUsecase.execute({ | ||
name: data.name, | ||
description: data.description, | ||
field: data.field, | ||
}); | ||
} | ||
|
||
@then('I should retrieve a pathway initiated with its data') | ||
public thenIShouldSeeAPathwayInitiated(dataTable: DataTable) { | ||
const data = | ||
dataTable.hashes()[0] as unknown as PathwayDesignServerBusinessEntitiesPathwayInitDto; | ||
assert.equal(this.pathway?.name, data.name); | ||
assert.equal(this.pathway?.description, data.description); | ||
assert.equal(this.pathway?.field, data.field); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
libs/pathway-design/server/business/usecases/init-pathway/src/lib/index.usecase.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { | ||
PathwayDesignServerBusinessEntitiesPathway, | ||
type PathwayDesignServerBusinessEntitiesPathwayInitDto, | ||
} from '@bewoak/pathway-design-server-business-entities-pathway'; | ||
|
||
export class PathwayDesignServerBusinessUsecasesInitPathway { | ||
execute({ | ||
name, | ||
description, | ||
field, | ||
}: PathwayDesignServerBusinessEntitiesPathwayInitDto) { | ||
const pathway = new PathwayDesignServerBusinessEntitiesPathway(); | ||
pathway.init({ | ||
name, | ||
description, | ||
field, | ||
}); | ||
|
||
return pathway; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...iness/usecases/init-pathway/tsconfig.json → ...iness/usecases/init-pathway/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/usecases/init-pathway/tsconfig.lib.json → ...s/usecases/init-pathway/tsconfig.lib.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters