Add test for hourly points in range with flow units#1576
Add test for hourly points in range with flow units#1576AndrewKam123 wants to merge 2 commits intoOpenEnergyDashboard:developmentfrom
Conversation
|
@AndrewKam123 Thank you for this contribution. I looked at the OED CLA records but do not see your GitHub ID as listed for having done the form. Could you either do the form (link above) or let me know if you think our records are off. Also, could you provide the GitHub IDs of anyone else who worked on this or let us know or let us know thathat you did this alone. Thanks and let me know if you need anything. |
|
@huss I have filled out the form as request. I worked on this with a few members from CodeDay. They are @opeadeyomoye and Pius Okobi. |
@AndrewKam123 Thanks. I see you did the CLA. I could not find entries for the other two people. Are you able to ask them to do it? |
|
Yes I am. I will send them the link to the form. |
huss
left a comment
There was a problem hiding this comment.
Thanks to @AndrewKam123, @opeadeyomoye & @januarysfinest for your first contribution to OED. I made a few comments for you to consider. Please let me know if anything is not clear or you need something.
| @@ -150,6 +150,70 @@ mocha.describe('readings API', () => { | |||
| }); | |||
|
|
|||
| // Add LR26 here | |||
There was a problem hiding this comment.
Can you please remove this comment as the test case is now done.
| const expected = await parseExpectedCsv('src/server/test/web/readingsData/expected_line_range_ri_15_mu_kW_gu_kW_st_2022-08-25%00#00#00_et_2022-10-24%00#00#00.csv'); | ||
|
|
||
| const res = await chai.request(app).get(`/api/unitReadings/line/meters/${METER_ID}`) | ||
| .query({ timeInterval: ETERNITY.toString(), graphicUnitId: unitId }); |
There was a problem hiding this comment.
I think the testing document defined the timeInterval to be 2022-08-25 00:00:00 to 2022-10-24 00:00:00 and not infinity.
|
|
||
| const unitId = await getUnitId('kW'); | ||
|
|
||
| const expected = await parseExpectedCsv('src/server/test/web/readingsData/expected_line_range_ri_15_mu_kW_gu_kW_st_2022-08-25%00#00#00_et_2022-10-24%00#00#00.csv'); |
There was a problem hiding this comment.
See the testing document about needing to add any new testing data file. The file specified for reading for the expected values needs to be added to the repository. When I tried to run the test it failed because the file was missing.
There was a problem hiding this comment.
Okay, generating a new data file. Will update when completed.
Add test case LR26 for hourly points in readings.
Fixing LR26: range should have hourly points for middle readings for 15 minute for a 60 day period and flow units & kW as kW
Partly Addresses #962
##Type of change
(Check the ones that apply by placing an "x" instead of the space in the [ ] so it becomes [x])
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.)
Limitations
None