Skip to content

Commit

Permalink
Merge pull request #1411 from mRosenthal937/team
Browse files Browse the repository at this point in the history
Issue #962, Test Case CG5
  • Loading branch information
huss authored Dec 23, 2024
2 parents a37216d + d768110 commit 65f5b3f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/server/test/web/readingsCompareGroupQuantity.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,21 @@ mocha.describe('readings API', () => {
expectCompareToEqualExpected(res, expected, GROUP_ID);
});

// Add CG5 here
mocha.it('CG5: 7 day shift end 2022-11-01 15:00:00 (beyond data) for 15 minute reading intervals and quantity units & kWh as kWh ', async () => {
await prepareTest(unitDatakWh, conversionDatakWh, meterDatakWhGroups, groupDatakWh);
// Get the unit ID since the DB could use any value.
const unitId = await getUnitId('kWh');
const expected = [16171.5504445167, 23010.8509932843];
// for compare, need the unitID, currentStart, currentEnd, shift
const res = await chai.request(app).get(`/api/compareReadings/groups/${GROUP_ID}`)
.query({
curr_start: '2022-10-30 00:00:00',
curr_end: '2022-11-01 15:00:00',
shift: 'P7D',
graphicUnitId: unitId
});
expectCompareToEqualExpected(res, expected, GROUP_ID);
});

// Add CG6 here

Expand Down

0 comments on commit 65f5b3f

Please sign in to comment.