From 3aeaacd87d92bbad4372fd6b61d7cdba4505217c Mon Sep 17 00:00:00 2001 From: Martin Castro Laminrs Date: Tue, 2 Jun 2026 18:33:59 +0200 Subject: [PATCH 1/2] test(examples): exercise html-fragment path in jobs custom-form fixture (#679) The examples/jobs JobAdmin already ships the custom-template Path B (?run_custom=1 dual-listbox change_view + run_custom.html + the run_with_custom_steps action). Update its docstrings/comments from the old legacy-iframe contract to the server-rendered html-fragment contract (rest-api 1.7.0+, #75), and add JobHtmlFragmentApiTests covering the SPA's actual API path end-to-end against the example backend: - GET .../form-spec/?run_custom=1 -> renderer "html-fragment" (dual-listbox markup + inline ', + csrf_token: 'csrf-123', + submit_url: '/admin/jobs/job/1/change/?run_custom=1', + method: 'POST', + messages: [], + ...overrides, + }; +} + +function renderFragment(frag: HtmlFragmentResponse) { + return render( + + + + + , + ); +} + +beforeEach(() => { + navigateMock.mockReset(); + submitMock.mockReset(); +}); + +describe('HtmlFragment (#679)', () => { + it('injects the fragment in-shell and EXECUTES inline