Public, read-only page over the ned-collector energy schema: latest-hour mix and per-source utilization, generation vs consumption with CO2 intensity (day/week/month/12 months/all years), NED forecast, gas storage by year and per site, and gas-fired power share vs storage fill. Incomplete hours (sources not summing to the NED total) are left out and partial days/months/years are marked.
18 lines
798 B
TypeScript
18 lines
798 B
TypeScript
import { expect, test } from '@playwright/test';
|
|
|
|
test('energy tracker renders its charts and is listed under trackers', async ({ page }) => {
|
|
await page.goto('/projects/energy');
|
|
await expect(page.getByRole('heading', { level: 1, name: 'Energy' })).toBeVisible();
|
|
await expect(page.getByRole('heading', { name: 'Generation and consumption' })).toBeVisible();
|
|
await expect(page.locator('canvas').first()).toBeVisible();
|
|
for (const range of ['day', 'month', '12 months', 'all years']) {
|
|
await page.getByRole('tab', { name: range, exact: true }).click();
|
|
await expect(page.getByRole('tab', { name: range, exact: true })).toHaveAttribute(
|
|
'data-state',
|
|
'active'
|
|
);
|
|
}
|
|
await page.goto('/trackers');
|
|
await expect(page.locator('a[href="/projects/energy"]').first()).toBeVisible();
|
|
});
|