feature/IO-2769-Job-Totals-Testing

This commit is contained in:
Dave Richer
2025-04-08 11:42:27 -04:00
parent 5f66488410
commit a18ce18d72
12 changed files with 295 additions and 53 deletions

View File

@@ -1,7 +1,6 @@
const Dinero = require("dinero.js");
const queries = require("../graphql-client/queries");
const logger = require("../utils/logger");
const { captureFixture } = require("./utils/seralizeHelper");
//****************************************************** */
//****************************************************** */
@@ -31,16 +30,8 @@ exports.totalsSsu = async function (req, res) {
id: id
});
// Extract the job data (the input for TotalsServerSide)
const inputForTotals = job.jobs_by_pk;
// Capture the output of TotalsServerSide
const newTotals = await TotalsServerSide({ body: { job: inputForTotals, client: client } }, res, true);
// Capture fixture data (input and output), using job.id for the filename.
if (process.env?.SAVE_TOTALS_DATA === "true") {
captureFixture(inputForTotals, newTotals);
}
const newTotals = await TotalsServerSide({ body: { job: job.jobs_by_pk, client: client } }, res, true);
const result = await client.setHeaders({ Authorization: BearerToken }).request(queries.UPDATE_JOB, {
jobId: id,