From d60a338ce7265c3b9fd96a01341fde8f77d920ed Mon Sep 17 00:00:00 2001 From: Josemi Date: Mon, 25 Sep 2023 17:16:49 +0200 Subject: [PATCH] test-app: fix version in info methods of api mock clients #TASK-5058 --- src/sites/test-app/clients/api-mock/DiseasePanel.js | 2 +- src/sites/test-app/clients/api-mock/Family.js | 2 +- src/sites/test-app/clients/api-mock/Individual.js | 2 +- src/sites/test-app/clients/api-mock/Sample.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sites/test-app/clients/api-mock/DiseasePanel.js b/src/sites/test-app/clients/api-mock/DiseasePanel.js index a315e76c26..8ad4642aa0 100644 --- a/src/sites/test-app/clients/api-mock/DiseasePanel.js +++ b/src/sites/test-app/clients/api-mock/DiseasePanel.js @@ -175,7 +175,7 @@ export default class DiseasePanel { info(panels, params) { // Mocked response for Sample update test if (panels === "Early_onset_dystonia-PanelAppId-192") { - return UtilsNew.importJSONFile(`./test-data/2.11/disease-panels-platinum.json`) + return UtilsNew.importJSONFile(`./test-data/${this._config.testDataVersion}/disease-panels-platinum.json`) .then(data => ({ responses: [{results: [data[0]]}] })); diff --git a/src/sites/test-app/clients/api-mock/Family.js b/src/sites/test-app/clients/api-mock/Family.js index decdf70b67..4a2f7fe302 100644 --- a/src/sites/test-app/clients/api-mock/Family.js +++ b/src/sites/test-app/clients/api-mock/Family.js @@ -204,7 +204,7 @@ export default class Family { info(families, params) { // Mocked response for Sample update test if (families === "899077") { - return UtilsNew.importJSONFile(`./test-data/2.11/families-platinum.json`) + return UtilsNew.importJSONFile(`./test-data/${this._config.testDataVersion}/families-platinum.json`) .then(data => ({ responses: [{results: [data[0]]}] })); diff --git a/src/sites/test-app/clients/api-mock/Individual.js b/src/sites/test-app/clients/api-mock/Individual.js index 44ec08dd56..9b4ab57cc6 100644 --- a/src/sites/test-app/clients/api-mock/Individual.js +++ b/src/sites/test-app/clients/api-mock/Individual.js @@ -229,7 +229,7 @@ export default class Individual { info(individuals, params) { // Mocked response for Individual update test if (individuals === "NA12889") { - return UtilsNew.importJSONFile(`./test-data/2.11/individuals-platinum.json`) + return UtilsNew.importJSONFile(`./test-data/${this._config.testDataVersion}/individuals-platinum.json`) .then(data => ({ responses: [{results: [data[0]]}] })); diff --git a/src/sites/test-app/clients/api-mock/Sample.js b/src/sites/test-app/clients/api-mock/Sample.js index 60f10ded40..388ed8fdda 100644 --- a/src/sites/test-app/clients/api-mock/Sample.js +++ b/src/sites/test-app/clients/api-mock/Sample.js @@ -272,7 +272,7 @@ export default class Sample { } // Mocked response for Sample update test if (samples === "NA12877") { - return UtilsNew.importJSONFile(`./test-data/2.11/samples-platinum.json`) + return UtilsNew.importJSONFile(`./test-data/${this._config.testDataVersion}/samples-platinum.json`) .then(data => ({ responses: [{results: [data[0]]}] }));