Skip to content

Commit

Permalink
replace QM with QMS in report naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocio De Santiago authored and Rocio De Santiago committed Dec 23, 2024
1 parent a3c7182 commit 6daefce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions services/app-api/handlers/reports/buildReport.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ describe("Test create report handler", () => {
const reportOptions = {
name: "report1",
} as ReportOptions;
const report = await buildReport(ReportType.QM, state, reportOptions, user);
const report = await buildReport(
ReportType.QMS,
state,
reportOptions,
user
);

expect(report.state).toBe("PA");
expect(report.type).toBe(ReportType.QM);
expect(report.type).toBe(ReportType.QMS);
expect(report.lastEditedBy).toBe("James Holden");
expect(report.lastEditedByEmail).toBe("james.holden@test.com");
expect(putMock).toHaveBeenCalled();
Expand Down
2 changes: 1 addition & 1 deletion services/app-api/handlers/reports/buildReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const buildReport = async (
report.status = ReportStatus.NOT_STARTED;
report.name = reportOptions["name"];

if (reportType == ReportType.QM) {
if (reportType == ReportType.QMS) {
/*
* Collect all measures, based on selected rules.
* TODO is measure order important? May need to sort.
Expand Down
2 changes: 1 addition & 1 deletion services/app-api/storage/reports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Report, ReportType } from "../types/reports";

const dynamoClient = createDynamoClient();
const reportTables: { [key in ReportType]: string } = {
QM: process.env.QM_REPORT_TABLE_NAME!,
QMS: process.env.QMS_REPORT_TABLE_NAME!,
};

export const putReport = async (report: Report) => {
Expand Down

0 comments on commit 6daefce

Please sign in to comment.