Generates ExUnit tests for every :live entity's three LiveView
modules (Index / Show / Form). One test file per entity,
organized as describe blocks per module with one test per
action — a CI-ready skeleton the developer fills in with
fixtures and assertions specific to their domain.
The generated tests use the standard Phoenix test stack
(Phoenix.ConnTest, Phoenix.LiveViewTest) and assume the
consumer app has a *.ConnCase module under
test/support/conn_case.ex — which mix phx.new emits by
default, so no extra setup is needed.
Each generated test carries a # TODO: line pointing at the
fixture hole to fill — the generator cannot know the app's
context factories, so it stops short of full assertions.
Returns a list of {path, source} tuples. Custom code below the
# --- CUSTOM --- marker is preserved on regeneration.
Summary
Functions
Generate a test file per :live entity in the domain.
Generate a single entity's LiveView test file.
Path to the generated test file, relative to the project root.
Functions
@spec render_all( Caravela.Schema.Domain.t(), keyword() ) :: [{String.t(), String.t()}]
Generate a test file per :live entity in the domain.
@spec render_entity(Caravela.Schema.Domain.t(), Caravela.Schema.Entity.t(), keyword()) :: {String.t(), String.t()}
Generate a single entity's LiveView test file.
@spec test_file_path(Caravela.Schema.Domain.t(), Caravela.Schema.Entity.t()) :: String.t()
Path to the generated test file, relative to the project root.