feat: enhance order asset selection and previews
This commit is contained in:
@@ -69,6 +69,33 @@ test("tags nested mock asset uris found in workflow step payloads", () => {
|
||||
expect(viewModel.failureCount).toBe(1);
|
||||
});
|
||||
|
||||
test("extracts a step preview uri from standard output uri fields", () => {
|
||||
const viewModel = adaptWorkflowDetail({
|
||||
...WORKFLOW_BASE,
|
||||
current_step: "scene",
|
||||
steps: [
|
||||
{
|
||||
id: 2,
|
||||
workflow_run_id: 9001,
|
||||
step_name: "scene",
|
||||
step_status: "succeeded",
|
||||
input_json: null,
|
||||
output_json: {
|
||||
uri: "https://images.example.com/orders/101/scene/generated.jpg",
|
||||
},
|
||||
error_message: null,
|
||||
started_at: "2026-03-27T00:08:00Z",
|
||||
ended_at: "2026-03-27T00:09:00Z",
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
expect(viewModel.steps[0].previewUri).toBe(
|
||||
"https://images.example.com/orders/101/scene/generated.jpg",
|
||||
);
|
||||
expect(viewModel.steps[0].containsMockAssets).toBe(false);
|
||||
});
|
||||
|
||||
test("maps workflow lookup status and current step labels", () => {
|
||||
const viewModel = adaptWorkflowLookupItem(WORKFLOW_BASE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user