Skip to content

Tests: add local DXF viewer regression coverage and build verification #3

Description

@EriArk

Problem

The current package.json has build/start/dist scripts but no test script, and the repository has no GitHub Actions workflow under .github/workflows.

For a viewer that depends on DXF parsing/rendering, measurement state, Standard/Plus edition branching, recent-file/folder logic, and an Electron IPC boundary, relying only on manual launches makes regressions easy to ship.

Goal

Add a small, fast locally runnable automated test suite and build checks that validates the app's important non-visual behavior plus the renderer bundle/build.

First useful coverage

  • path/recent-file/folder helpers
  • Standard vs Plus feature gating
  • DXF open/load state transitions
  • unit conversion / ruler / measurement calculations
  • guide snapping math where it can be isolated from WebGL
  • IPC contract tests for main/preload (including the restricted-path work from the security issue)
  • malformed/empty DXF handling
  • a few known DXF fixture files from DXF Sketcher and external/common CAD sources

Local verification

GitHub Actions is disabled by maintainer decision (6 October 2026). Provide repeatable local commands for:

  1. npm ci
  2. the regression suite
  3. npm run build:renderer
  4. generated bundle freshness where the bundle remains tracked

Full Electron UI/WebGL screenshots do not need to be the first step. Start with deterministic unit/integration checks and include actual local results in PRs. Enabling hosted automation is outside scope.

Cross-project compatibility

Include a tiny fixture set exported by EriArk/-DXF-Sketcher so changes to either app do not silently break the normal Sketcher -> Viewer workflow. At minimum cover lines, arcs, circles, polylines, layers/colors and a mixed drawing.

Done criteria

  • npm test (or equivalent) exists and runs locally.
  • The tests and renderer build have documented local commands and results.
  • A broken DXF load/measurement/edition/IPC behavior fails the local suite without launching the app manually.
  • At least one DXF produced by DXF Sketcher is part of the regression fixtures.

Activity

  1. changed the title [-]Tests/CI: add automated DXF viewer regression coverage and build verification[/-] [+]Tests: add local DXF viewer regression coverage and build verification[/+] on Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions