Skip to content

test: make the engine's own test suite bootable - #121

Closed
roncodes wants to merge 1 commit into
release/v0.4.25from
test/bootable-dummy-suite
Closed

roncodes wants to merge 1 commit into
release/v0.4.25from
test/bootable-dummy-suite

Conversation

@roncodes

@roncodes roncodes commented Oct 9, 2026

Copy link
Copy Markdown
Member

What change does this PR introduce?

Follow-up to #120. The engine's dummy test app could not boot at all in this package, so no ember test run had ever executed the suite (CI only runs the build). This makes it bootable and makes the tests #120 added pass:

  • Removes the unused ember-classic-decorator devDependency, whose vendor shim throws on Ember 5 (Ember.AutoLocation no longer exists) before any module loads.
  • Adds @ember/legacy-built-in-components as a devDependency, as fleetops and the console declare it; the engine's templates still use the legacy built-ins.
  • Mirrors fleetops' engine config: eager loading when ember test runs from this package, so the engine's modules are in the dummy bundle (consumers keep lazy loading), plus the inert stand-in for the console's generated extensions module in the test helper.
  • Dummy app: the API config @fleetbase/ember-core's adapter reads at module scope, and an intl service that ignores missing locale data, since headless Chrome ships no number formats for every bundled locale (Mongolian among them) and ember-intl otherwise throws in whichever test first touches intl.
  • Tests: setupIntl, a host-router stub for the network controllers, and fetch and app-cache stubs for the order details panels, the way the widget tests already stub them; the order details title assertions now check every panel title instead of only the first.
  • pnpm-lock.yaml regenerated with pnpm 11.20.0 for the two devDependency changes only.

Why was this change needed?

Without it the identity-cell, pill and controller tests from #120 cannot run anywhere.

Other information

Validation, run locally against the linked fleetops-data branch (fleetbase/fleetops-data#87):

pnpm run lint                              # clean
pnpm run build                             # clean
pnpm exec ember test --filter "/shared identity|Controller \| orders\/index|Controller \| customers\/index|network\/orders|network\/customers|storefront\/order\/details|widget\/customers|widget\/orders/"
# 14 tests, 14 pass

The rest of the legacy suite now boots but still has many pre-existing failures, mostly generated "it renders" stubs asserting empty output from modals that render content, plus device and telematic tests; those are out of scope here. Consider adding pnpm test:ember to CI once they are repaired.

Note: the branch feat/shared-identity-components still carries this commit on top of duplicate copies of the multi-store checkout commits that were committed on it after #120 merged; this PR is the clean version. That branch can be deleted.

The dummy app never ran: ember-classic-decorator (unused) crashes on Ember 5,
lazy loading kept the engine's modules out of the test bundle, and the host
services, config and intl data the panels need were missing. Mirrors what
fleetops already does: eager loading when `ember test` runs from this package,
an inert stand-in for the console's extensions module, the API config the
core adapter reads at module scope, and the legacy built-in components the
engine's templates still use.

The dummy intl service ignores missing locale data, since headless Chrome has
no number formats for every bundled locale, and the order details and network
controller tests stub the host router, fetch and app cache the way the widget
tests already do.
@roncodes

Copy link
Copy Markdown
Member Author

Superseded by the single overhaul PR (one branch, one PR targeting release/v0.4.25, per maintainer request).

@roncodes roncodes closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant