Skip to content

Commit

Permalink
Merge pull request #1412 from laurarian/vansh
Browse files Browse the repository at this point in the history
Issue #962, Test Case CG6
  • Loading branch information
huss authored Dec 23, 2024
2 parents 65f5b3f + 3c081d7 commit 419a296
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ services:
"${install_args:-}"
]
# Use this if you are using a docker-compose that is earlier than version 2 and comment out the one above.
# command: ["bash", "./src/scripts/installOED.sh"]
# command: ["bash", "./src/scripts/installOED.sh"]
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion src/server/test/web/readingsCompareGroupQuantity.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,23 @@ mocha.describe('readings API', () => {
expectCompareToEqualExpected(res, expected, GROUP_ID);
});

// Add CG6 here
mocha.it('CG6: 28 day shift end 2022-10-31 17:12:34 (partial hour) for 15 minute reading intervals and quantity units & kWh as kWh', async () => { //test description
await prepareTest(unitDatakWh, conversionDatakWh, meterDatakWhGroups, groupDatakWh); // prepare test environment
// Get the unit ID since the DB could use any value.
const unitId = await getUnitId('kWh');
const expected = [189951.689612281, 190855.90449004]; // expected results
// 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:12:34',
shift: 'P28D', // 28-day shift
graphicUnitId: unitId // Unit ID for kWh
});

expectCompareToEqualExpected(res, expected, GROUP_ID); // confirm the results match with expected results
});


// Add CG8 here

Expand Down

0 comments on commit 419a296

Please sign in to comment.