Skip to content

Commit

Permalink
Merge pull request #1405 from Unknown31414652/cg3
Browse files Browse the repository at this point in the history
Added test case CG3
  • Loading branch information
huss authored Dec 8, 2024
2 parents edb2e8c + dd93f6e commit 6bd9c6b
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 @@ -53,7 +53,21 @@ mocha.describe('readings API', () => {
});

// Add CG3 here

mocha.it('CG3: 28 day shift end 2022-10-31 17:00:00 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 = [189951.689612281, 190855.90449004];
// 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-09 00:00:00',
curr_end: '2022-10-31 17:00:00',
shift: 'P28D',
graphicUnitId: unitId
});
expectCompareToEqualExpected(res, expected, GROUP_ID);
});
// Add CG4 here

// Add CG5 here
Expand Down

0 comments on commit 6bd9c6b

Please sign in to comment.