Skip to content
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

New test case placeholders & simple fixes #1422

Merged
merged 5 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/client/app/components/BarChartComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function BarChartComponent() {
// The Plotly toolbar is displayed if displayModeBar is set to true (not for bar charts)

if (raw) {
return <h1><b>${translate('bar.raw')}</b></h1>;
return <h1><b>{translate('bar.raw')}</b></h1>;
}
// At least one viable dataset.
const enoughData = datasets.find(dataset => dataset.x!.length >= 1);
Expand Down
16 changes: 14 additions & 2 deletions src/server/test/web/readingsBarGroupFlow.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mocha.describe('readings API', () => {
mocha.describe('readings test, test if data returned by API is as expected', () => {
mocha.describe('for bar charts', () => {
mocha.describe('for flow groups', () => {
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 () =>{
mocha.it('BG15: 13 day bars for 15 + 20 minute reading intervals and flow units with +-inf start/end time & kW as kW', async () =>{
const unitDatakW = [
{
// u4
Expand Down Expand Up @@ -112,7 +112,7 @@ mocha.describe('readings API', () => {
expectReadingToEqualExpected(res, expected, GROUP_ID);
});

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 () => {
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 () => {
const unitDataThing = [
{
// u14
Expand Down Expand Up @@ -202,6 +202,18 @@ mocha.describe('readings API', () => {
// Check that the API reading is equal to what it is expected to equal
expectReadingToEqualExpected(res, expected, GROUP_ID);
});

// Add BG17 here

// Add BG18 here

// Add BG19 here

// Add BG20 here

// Add BG21 here

// Add BG22 here
});
});
});
Expand Down
1 change: 0 additions & 1 deletion src/server/test/web/readingsBarGroupQuantity.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ mocha.describe('readings API', () => {

});

// Add BG9 here
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 () => {

const unitData = unitDatakWh.concat([
Expand Down
18 changes: 15 additions & 3 deletions src/server/test/web/readingsBarMeterFlow.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mocha.describe('readings API', () => {
mocha.describe('for bar charts', () => {
mocha.describe('for flow meters', () => {

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

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 () => {
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 () => {
const unitData = [
{
// u14
Expand Down Expand Up @@ -162,7 +162,19 @@ mocha.describe('readings API', () => {
});
// Check that the API reading is equal to what it is expected to equal
expectReadingToEqualExpected(res, expected);
});

// Add B17 here

// Add B18 here

// Add B19 here

// Add B20 here

// Add B21 here

// Add B22 here
});
});
});
});
Expand Down
1 change: 0 additions & 1 deletion src/server/test/web/readingsBarMeterQuantity.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ mocha.describe('readings API', () => {
expectReadingToEqualExpected(res, expected);
});

// Add B10 here
mocha.it('B10: 1 day bars for 15 minute reading intervals and quantity units with +-inf start/end time & kWh as BTU', async () => {
// Load the data into the database
const unitData = unitDatakWh.concat([
Expand Down
10 changes: 9 additions & 1 deletion src/server/test/web/readingsCompareGroupFlow.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,15 @@ mocha.describe('readings API', () => {
});
expectCompareToEqualExpected(res, expected, GROUP_ID);
});

// Add CG17 here

// Add CG18 here

// Add CG19 here

// Add CG20 here
});
});
});
});
});
8 changes: 8 additions & 0 deletions src/server/test/web/readingsCompareMeterFlow.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ mocha.describe('readings API', () => {
// Check that the API reading is equal to what it is expected to equal
expectCompareToEqualExpected(res, expected, METER_ID);
})

// Add C17 here

// Add C18 here

// Add C19 here

// Add C20 here
});
});
});
Expand Down
2 changes: 2 additions & 0 deletions src/server/test/web/readingsLineGroupFlow.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ mocha.describe('readings API', () => {
expectReadingToEqualExpected(res, expected, GROUP_ID);
}
);

// Add LG26 here
});
});
});
Expand Down
1 change: 0 additions & 1 deletion src/server/test/web/readingsLineGroupQuantity.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@ mocha.describe('readings API', () => {
expectReadingToEqualExpected(res, expected, GROUP_ID);
});

// Add LG20 here
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 () => {
const unitData = [
//Add units u2, u10, u11, u12, u13
Expand Down
4 changes: 4 additions & 0 deletions src/server/test/web/readingsLineMeterFlow.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ mocha.describe('readings API', () => {
.query({ timeInterval: ETERNITY.toString(), graphicUnitId: unitId });
expectReadingToEqualExpected(res, expected)
});

// Add L26 here

// Add L27 here
});
});
});
Expand Down
Loading