refactor: define electric BI metric semantics
This commit is contained in:
@@ -7,7 +7,7 @@ test('returns the published mileage metric contract', async () => {
|
||||
const payload = await response.json();
|
||||
|
||||
assert.equal(response.status, 200);
|
||||
assert.equal(payload.catalogVersion, 2);
|
||||
assert.equal(payload.catalogVersion, 3);
|
||||
assert.deepEqual(payload.domains, ['mileage']);
|
||||
assert.ok(payload.metrics.some((metric: { id: string }) => metric.id === 'mileage.assessment_completion_rate'));
|
||||
});
|
||||
@@ -22,6 +22,17 @@ test('returns the published hydrogen metric contract', async () => {
|
||||
assert.ok(payload.metrics.some((metric: { id: string }) => metric.id === 'hydrogen.customer_order_gross_profit'));
|
||||
});
|
||||
|
||||
test('returns the published electric metric contract', async () => {
|
||||
const response = await app.request('/metrics?domain=electric');
|
||||
const payload = await response.json();
|
||||
|
||||
assert.equal(response.status, 200);
|
||||
assert.equal(payload.catalogVersion, 3);
|
||||
assert.deepEqual(payload.domains, ['electric']);
|
||||
assert.ok(payload.metrics.some((metric: { id: string }) => metric.id === 'electric.charge_total_fee'));
|
||||
assert.ok(payload.metrics.some((metric: { id: string }) => metric.id === 'electric.blended_cost_intensity'));
|
||||
});
|
||||
|
||||
test('rejects unpublished metric domains', async () => {
|
||||
const response = await app.request('/metrics?domain=energy');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user