-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added test BG14 #1352
base: development
Are you sure you want to change the base?
Added test BG14 #1352
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks to @Emily-D-2003 for their first pull request. First, my records do not indicate you signed the CLA. OED cannot accept your contribution without that. Second, I have made several comments to consider. I believe this is why the GitHub test failed for the new test case (it also failed locally on my machine).
//gets unit ID | ||
const unitId = await getUnitId('pound of CO₂'); | ||
//load data from mcsv file | ||
const expected = await parseExpectedCsv('src/server/test/web/readingsData/expected_bar_group_ri_15-20_mu_kWh_gu_lbsCO2_st_-inf_et_inf_bd_1.csv'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expected file needs to be downloaded from the Dev Docs and added in the appropriate place in the repository. Direction are here: https://github.com/OpenEnergyDashboard/DesignDocs/blob/main/testing/testing.md#documentation-on-how-testing-data-is-created-and-used.
@@ -207,8 +207,22 @@ mocha.describe('readings API', () => { | |||
|
|||
// Add BG13 here | |||
|
|||
// Add BG14 here | |||
mocha.it('BG14: 1 day bars for 15 + 20 minute reading intervals and quantity units with +-inf start/end time & kWh as lbs of CO2 & chained & reversed', async () =>{ | |||
//loads data into database |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description lists these units/conversions: u2, u10, u11, u12, u13, c11, c12, c13, c14. All but u2 need to be included in the test. Test B14 uses the same units and is completed.
await prepareTest(unitDatakWh, conversionDatakWh, meterDatakWhGroups, groupDatakWh); | ||
//gets unit ID | ||
const unitId = await getUnitId('pound of CO₂'); | ||
//load data from mcsv file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mcsv -> csv.
@Emily-D-2003 Do you need any help with this pull request? I was checking the status of the pull requests and wondered about this one. |
Description
Added tests BG14 from design document.
Partly addresses #962
Type of change
Checklist
(Note what you have done by placing an "x" instead of the space in the [ ] so it becomes [x]. It is hoped you do all of them.)