Skip to content

Commit

Permalink
Replace value in layer (#49)
Browse files Browse the repository at this point in the history
* Replace values on layer

* Bump version
  • Loading branch information
abdala authored Feb 3, 2025
1 parent b0ddc3e commit 20eb6e6
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion assert/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/assert",
"version": "0.15.0",
"version": "0.15.1",
"description": "Extra assert library",
"type": "module",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion dtc-aws-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/dtc-aws-plugin",
"version": "0.15.0",
"version": "0.15.1",
"description": "AWS plugin for Declarative TestCases",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion dtc-graphql-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/dtc-graphql-plugin",
"version": "0.15.0",
"version": "0.15.1",
"description": "GraphQl plugin for Declarative TestCases",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion dtc-mysql-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/dtc-mysql-plugin",
"version": "0.15.0",
"version": "0.15.1",
"description": "MySQL plugin for Declarative TestCases",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion dtc-playwright-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/dtc-playwright-plugin",
"version": "0.15.0",
"version": "0.15.1",
"description": "Playwright plugin for Declarative TestCases",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion dtc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/dtc",
"version": "0.15.0",
"version": "0.15.1",
"description": "Declarative TestCases",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion dtc/src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const resolveTestCaseExecutionParams = (testCaseExecution: TestCaseExecution, pa
...replacePlaceholders(testCaseExecution.testCase, resolvedParams),
name,
},
layers: loadedLayers,
layers: replacePlaceholders(loadedLayers, resolvedParams),
}
}

Expand Down
1 change: 1 addition & 0 deletions dtc/test/loader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ test('It replaces parameters placeholders defined in the layers', async () => {
nodeAssert.equal(`${__dirname}/./fixtures/t4.dtc.ts`, testCaseExecutions[0].filePath)
nodeAssert.equal('Test 4', testCaseExecutions[0].testCase.name)

nodeAssert.deepStrictEqual(testCaseExecutions[0].layers?.[0].parameters, {b: 'b', c: {d: 'e'}})
nodeAssert.deepStrictEqual(testCaseExecutions[0].testCase.act?.arguments, [{a: 'content b more b', b: 'b content', c: {d: 'e'}, d: 'e'}])
nodeAssert.deepStrictEqual(testCaseExecutions[0].testCase.assert, {a: 'content b more b'})
})
2 changes: 1 addition & 1 deletion nock-aws/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/nock-aws",
"version": "0.15.0",
"version": "0.15.1",
"description": "AWS Request mocker based on Nock",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion type-guard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/type-guard",
"version": "0.15.0",
"version": "0.15.1",
"description": "Typescript type guards",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion yaml/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cgauge/yaml",
"version": "0.15.0",
"version": "0.15.1",
"description": "YAML parser with extra tags",
"repository": {
"type": "git",
Expand Down

0 comments on commit 20eb6e6

Please sign in to comment.