Skip to content

8.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 13 Oct 11:07
· 39 commits to development since this release
fc2b6c7

Added

  • Browser testing for ColdBox applications (BoxLang), built on TestBox browser support and bx-playwright: annotate any BaseTestCase with @browser, @browserProfile or @baseURL and it gets TestBox's browse(), this.playwright(), browserAvailable() and browser matchers, while it still loads your application like any integration test. BaseTestCase adds the ColdBox helpers routeURL(), visitRoute() and assertRouteIs() for named routes, including module routes. Logged-in tests use bx-playwright saved sessions. Needs a TestBox release with annotation-driven browser support (Ortus-Solutions/TestBox#222). The route helpers build paths from the web root: the appMapping is not part of them, set webMapping when the app is served from a sub folder. With params, a route with optional placeholders resolves to the longest variant the params fill. They throw BaseTestCase.NoColdBoxApp when no ColdBox application is loaded.
  • group() now accepts a meta struct option that every route inside the group inherits. Nested groups merge outer-first and a route's own meta() values win on conflict. This lets a single group declare route metadata, for example the permissions consumed by security middleware.
  • Router.registerMiddleware() registers a closure, lambda, object instance or WireBox ID under a name, singly or as a struct of name : target pairs, so it can be referenced from middleware(), group( { middleware : [ name ] } ) and withoutMiddleware( name ). Registering a name that already exists, including a middlewareGroup() name, throws Router.DuplicateMiddleware unless force = true. (COLDBOX-1460)

Fixed

  • event.route( "name@module" ) built module route links without a slash between the module entry point and the route pattern
  • Adobe ColdFusion: a request context decorator copied the this reference of the original context, so its inherited methods ran against the original context and missed the decorator's own state and mocks
  • COLDBOX-1456 Bootstrap.onSessionStart() ran the session start handler on a controller that was still loading during a reinit. It now skips the event until the controller is initiated.
  • WireBox released a circular partner to other threads before the outer object finished wiring. A singleton, engine scope or CacheBox object built inside another build left the wiring set as soon as its own wiring ended, while holding a reference to the outer object. Keys now stay marked until the outermost build completes, tracked on the injector across all scopes.
  • COLDBOX-1455 WireBox singleton, engine (application, session, server) and CacheBox scopes handed objects to other threads before their dependencies were wired. A single wiring lock now makes other threads wait, while the wiring thread still resolves circular dependencies.
  • BaseTestCase.execute() (and the get(), post(), etc. helpers built on it) now runs route-scoped middleware registered with Router.middleware(), in the same order as the Bootstrap, so integration tests exercise the same request lifecycle as a real request.
  • Passing a component instance as route middleware (for example middleware( myObject )) no longer fails on engines where isStruct() is true for components. (COLDBOX-1460)

Changed

  • WireBox CFScopes scope renamed to EngineScopes