Skip to content
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
8 changes: 8 additions & 0 deletions backend/tests/test_app_startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ def _load_real_app_module(monkeypatch):
monkeypatch.setenv("HA_URL", "http://ha.local")
monkeypatch.delenv("HASSIO_TOKEN", raising=False)

# Real app.py's BESSController.__init__ calls time_utils.set_timezone()
# from the mocked HA config, permanently mutating the shared module-global
# TIMEZONE. Restore it on teardown so this file doesn't leak UTC into the
# rest of the test session (e.g. the historical-data dashboard tests).
import core.bess.time_utils as time_utils

monkeypatch.setattr(time_utils, "TIMEZONE", time_utils.TIMEZONE, raising=False)

app_path = os.path.join(backend_dir, "app.py")
spec = importlib.util.spec_from_file_location("real_backend_app", app_path)
module = importlib.util.module_from_spec(spec)
Expand Down
7 changes: 5 additions & 2 deletions e2e/tests/inverter-schedule-control-model.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,11 @@ test.describe('Inverter schedule display branches on controlModel', () => {
await expect(page.getByRole('columnheader', { name: 'Discharge %' })).toHaveCount(0);
await expect(page.getByRole('columnheader', { name: 'Grid Charge' })).toHaveCount(0);

// Signed percent value renders.
await expect(page.getByText('+35%')).toBeVisible();
// Signed percent value renders in the schedule table's VPP column. Scoped
// to a table cell because the Current Strategy card also shows the current
// group's percent (e.g. "+35% (Remote)") when the wall clock falls inside
// that group's time window — a strict getByText() then resolves to 2.
await expect(page.getByRole('cell', { name: '+35%' })).toBeVisible();
});

test('period_list install shows neither Mode nor VPP Power columns', async ({ page }) => {
Expand Down
Loading