• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FlexMeasures / flexmeasures / 33491755628
88%

Build:
DEFAULT BRANCH: main
Ran 01 Sep 2026 09:32AM UTC
Jobs 1
Files 177
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Sep 2026 09:20AM UTC coverage: 84.132%. Remained the same
33491755628

push

github

web-flow
Test the UI's JavaScript, without adding a Node.js toolchain (#2435)

* ui/tests: run the JavaScript modules in a browser, from pytest

Context:
- The modules under ui/static/js had no tests, and the only way we had
  checked them was by hand. They are plain ES modules, so they can be
  exercised directly, but ES imports do not work over file://.
- A Node.js toolchain would be a heavy addition for ~5k lines of
  JavaScript, and would need its own CI job.

Change:
- Add a fixture that serves the modules over HTTP and runs a page of
  assertions in headless Chrome, reporting the results through pytest.
  Tests pass a snippet of JavaScript and assert on the checks it records.
- Allow a test to place the browser in a chosen timezone, so that
  behaviour around daylight saving is not tied to the machine.
- Add selenium to the test dependency group, which the runtime image does
  not install. The tests skip when selenium or Chrome is missing.

Signed-off-by: F.N. Claessen <felix@seita.nl>

* ui/tests: cover the date, data and chart-data helpers

Change:
- Test toIsoStringWithOffset, subtract and countDSTTransitions, the last
  under two fixed timezones, one with daylight saving and one without.
- Test getUniqueValues and convertToCSV.
- Test decompressChartData, including the pass-through of data already in
  the old format and the conversion of seconds-valued sensors to dates.

Signed-off-by: F.N. Claessen <felix@seita.nl>

* ui/static: fix two bugs the new JavaScript tests found

Context:
- toIsoStringWithOffset appended the local UTC offset to date.toISOString(),
  which is UTC, without moving the clock time. The result named an instant
  wrong by exactly that offset. Its only caller sends the KPI window to the
  API, so KPIs could cover the wrong days, by a whole day west of UTC.
- getUniqueValues ended its loop at the first falsy entry, and tested for
  values already seen with `in`, which consults the prototype chain, so a
  source named "constructor"... (continued)

17427 of 20714 relevant lines covered (84.13%)

0.84 hits per line

Jobs
ID Job ID Ran Files Coverage
1 33491755628.1 01 Sep 2026 09:32AM UTC 177
84.13
GitHub Action Run
Source Files on build 33491755628
  • Tree
  • List 177
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33491755628
  • 18761774 on github
  • Prev Build on main (#33489811388)
  • Next Build on main (#33524992793)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc