Skip to content

Commit 3f49ebc

Browse files
authored
Merge pull request #1422 from huss/simpleFixes
New test case placeholders & simple fixes
2 parents 5e5c1d2 + d74f5e7 commit 3f49ebc

10 files changed

+53
-10
lines changed

src/client/app/components/BarChartComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default function BarChartComponent() {
7373
// The Plotly toolbar is displayed if displayModeBar is set to true (not for bar charts)
7474

7575
if (raw) {
76-
return <h1><b>${translate('bar.raw')}</b></h1>;
76+
return <h1><b>{translate('bar.raw')}</b></h1>;
7777
}
7878
// At least one viable dataset.
7979
const enoughData = datasets.find(dataset => dataset.x!.length >= 1);

src/server/test/web/readingsBarGroupFlow.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mocha.describe('readings API', () => {
2121
mocha.describe('readings test, test if data returned by API is as expected', () => {
2222
mocha.describe('for bar charts', () => {
2323
mocha.describe('for flow groups', () => {
24-
mocha.it('BG15: should have daily points for 15 + 20 minute reading intervals and flow units with +-inf start/end time & kW as kW', async () =>{
24+
mocha.it('BG15: 13 day bars for 15 + 20 minute reading intervals and flow units with +-inf start/end time & kW as kW', async () =>{
2525
const unitDatakW = [
2626
{
2727
// u4
@@ -112,7 +112,7 @@ mocha.describe('readings API', () => {
112112
expectReadingToEqualExpected(res, expected, GROUP_ID);
113113
});
114114

115-
mocha.it('BG16: should have daily points for 15 + 20 minute reading intervals and flow units with +-inf start/end time & thing as thing where rate is 36', async () => {
115+
mocha.it('BG16: 13 day bars for 15 + 20 minute reading intervals and flow units with +-inf start/end time & thing as thing where rate is 36', async () => {
116116
const unitDataThing = [
117117
{
118118
// u14
@@ -202,6 +202,18 @@ mocha.describe('readings API', () => {
202202
// Check that the API reading is equal to what it is expected to equal
203203
expectReadingToEqualExpected(res, expected, GROUP_ID);
204204
});
205+
206+
// Add BG17 here
207+
208+
// Add BG18 here
209+
210+
// Add BG19 here
211+
212+
// Add BG20 here
213+
214+
// Add BG21 here
215+
216+
// Add BG22 here
205217
});
206218
});
207219
});

src/server/test/web/readingsBarGroupQuantity.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ mocha.describe('readings API', () => {
201201

202202
});
203203

204-
// Add BG9 here
205204
mocha.it('BG9: 1 day bars for 15 + 20 minute reading intervals and quantity units with +-inf start/end time & kWh as MJ reverse conversion', async () => {
206205

207206
const unitData = unitDatakWh.concat([

src/server/test/web/readingsBarMeterFlow.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ mocha.describe('readings API', () => {
2626
mocha.describe('for bar charts', () => {
2727
mocha.describe('for flow meters', () => {
2828

29-
mocha.it('B15: should have daily points for 15 minute reading intervals and flow units with +-inf start/end time & kW as kW', async () => {
29+
mocha.it('B15: 13 day bars for 15 minute reading intervals and flow units with +-inf start/end time & kW as kW', async () => {
3030
const unitData = [
3131
{
3232
// u4
@@ -95,7 +95,7 @@ mocha.describe('readings API', () => {
9595
expectReadingToEqualExpected(res, expected);
9696
});
9797

98-
mocha.it('B16: should have daily points for 15 minute reading intervals and flow units with +-inf start/end time & thing as thing where rate is 36', async () => {
98+
mocha.it('B16: 13 day bars for 15 minute reading intervals and flow units with +-inf start/end time & thing as thing where rate is 36', async () => {
9999
const unitData = [
100100
{
101101
// u14
@@ -162,7 +162,19 @@ mocha.describe('readings API', () => {
162162
});
163163
// Check that the API reading is equal to what it is expected to equal
164164
expectReadingToEqualExpected(res, expected);
165-
});
165+
166+
// Add B17 here
167+
168+
// Add B18 here
169+
170+
// Add B19 here
171+
172+
// Add B20 here
173+
174+
// Add B21 here
175+
176+
// Add B22 here
177+
});
166178
});
167179
});
168180
});

src/server/test/web/readingsBarMeterQuantity.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ mocha.describe('readings API', () => {
261261
expectReadingToEqualExpected(res, expected);
262262
});
263263

264-
// Add B10 here
265264
mocha.it('B10: 1 day bars for 15 minute reading intervals and quantity units with +-inf start/end time & kWh as BTU', async () => {
266265
// Load the data into the database
267266
const unitData = unitDatakWh.concat([

src/server/test/web/readingsCompareGroupFlow.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,15 @@ mocha.describe('readings API', () => {
212212
});
213213
expectCompareToEqualExpected(res, expected, GROUP_ID);
214214
});
215+
216+
// Add CG17 here
217+
218+
// Add CG18 here
219+
220+
// Add CG19 here
221+
222+
// Add CG20 here
215223
});
216224
});
217225
});
218-
});
226+
});

src/server/test/web/readingsCompareMeterFlow.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,14 @@ mocha.describe('readings API', () => {
163163
// Check that the API reading is equal to what it is expected to equal
164164
expectCompareToEqualExpected(res, expected, METER_ID);
165165
})
166+
167+
// Add C17 here
168+
169+
// Add C18 here
170+
171+
// Add C19 here
172+
173+
// Add C20 here
166174
});
167175
});
168176
});

src/server/test/web/readingsLineGroupFlow.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ mocha.describe('readings API', () => {
207207
expectReadingToEqualExpected(res, expected, GROUP_ID);
208208
}
209209
);
210+
211+
// Add LG26 here
210212
});
211213
});
212214
});

src/server/test/web/readingsLineGroupQuantity.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,6 @@ mocha.describe('readings API', () => {
600600
expectReadingToEqualExpected(res, expected, GROUP_ID);
601601
});
602602

603-
// Add LG20 here
604603
mocha.it('LG20: should have daily points for 15 + 20 minute reading intervals and quantity units with +-inf start/end time & kWh as lbs of CO2 & chained & reversed', async () => {
605604
const unitData = [
606605
//Add units u2, u10, u11, u12, u13

src/server/test/web/readingsLineMeterFlow.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ mocha.describe('readings API', () => {
146146
.query({ timeInterval: ETERNITY.toString(), graphicUnitId: unitId });
147147
expectReadingToEqualExpected(res, expected)
148148
});
149+
150+
// Add L26 here
151+
152+
// Add L27 here
149153
});
150154
});
151155
});

0 commit comments

Comments
 (0)