scaffolder: restore schema title rendering and fix toolbar test

The migration to the table-based RenderSchema dropped rendering of the
JSON Schema `title` field. Restore it in the ValueCell. Also update the
TemplateEditorToolbar test to select an action before asserting on its
schema details, matching the new list+detail UI.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-03-29 22:49:04 +02:00
parent 0a7ec8e7c9
commit a7aedb4f0a
2 changed files with 6 additions and 3 deletions
@@ -114,8 +114,10 @@ describe('TemplateEditorToolbar', () => {
expect(screen.getByLabelText('Search for an action')).toBeInTheDocument();
expect(screen.getByText('action:example')).toBeInTheDocument();
expect(screen.getByText('Example description')).toBeInTheDocument();
expect(screen.getByText('Inform the title')).toBeInTheDocument();
await userEvent.click(screen.getByText('action:example'));
expect(await screen.findByText('Inform the title')).toBeInTheDocument();
});
it('should accept custom toolbar actions', async () => {
@@ -413,7 +413,7 @@ function ValueCell({
const [isExpanded, setIsExpanded] = context.expanded;
const id = generateId(item, context);
const info = inspectSchema(item.schema);
const description = item.schema.description;
const { title, description } = item.schema;
return (
<Cell>
<Flex direction="column" gap="1">
@@ -452,6 +452,7 @@ function ValueCell({
),
)}
</Flex>
{title && <MarkdownContent content={title} />}
{description && <MarkdownContent content={description} />}
<RenderExpansion item={item} context={context} />
</Flex>