From 075efed2b06f9b850db6c8e657570d8946bc081b Mon Sep 17 00:00:00 2001 From: "pulse-triage[bot]" <249995291+pulse-triage[bot]@users.noreply.github.com> Date: Tue, 13 Oct 2026 19:37:33 +0100 Subject: [PATCH] Preserve troubleshooting assertions when composing new workflow entries Select each rendered workflow by its unique label instead of a position. Keep every copied-command safety assertion from current source and the memory distinction from the PBS candidate; their merge changed row order, not guidance semantics. Contract-Neutral: Documentation regression selectors only; no public behaviour or subsystem contract change. Change-source: pulse-maintainer --- .../troubleshootingEntryGuide.test.ts | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/frontend-modern/src/features/docs/__tests__/troubleshootingEntryGuide.test.ts b/frontend-modern/src/features/docs/__tests__/troubleshootingEntryGuide.test.ts index 86efb546e6..c82a427c80 100644 --- a/frontend-modern/src/features/docs/__tests__/troubleshootingEntryGuide.test.ts +++ b/frontend-modern/src/features/docs/__tests__/troubleshootingEntryGuide.test.ts @@ -62,30 +62,33 @@ describe('troubleshooting workflow entry', () => { it('keeps server updates, workload updates and reporting acceptance distinct', () => { const section = entry(); - const rows = section.querySelectorAll('li'); - expect(prose(rows[1] as HTMLElement)).toContain( - 'An update of a monitored container is a different job', - ); - const updateLinks = [...rows[1].querySelectorAll('a')].map((link) => link.getAttribute('href')); + const row = (label: string) => { + const rows = [...section.querySelectorAll('li')].filter((element) => + prose(element.querySelector('strong') as HTMLElement).startsWith(label), + ); + expect(rows, label).toHaveLength(1); + return rows[0] as HTMLElement; + }; + const update = row('Update failed or its result is uncertain'); + const install = row('Agent host is missing or reporting is rejected'); + const command = row('Copied agent install or removal command failed'); + const reporting = row('Guest readings are missing or disagree'); + const memory = row('Pulse itself uses more memory, CPU or disk writes'); + expect(prose(update)).toContain('An update of a monitored container is a different job'); + const updateLinks = [...update.querySelectorAll('a')].map((link) => link.getAttribute('href')); expect(updateLinks).toEqual([ '/docs/AUTO_UPDATE#update-failed', '/docs/DOCKER#check-a-failed-or-pending-workload-update', ]); - expect(prose(rows[1] as HTMLElement)).toContain( - 'Preserve the current state and rollback evidence', - ); - expect(prose(rows[2] as HTMLElement)).toContain('Installer success is not an accepted report'); - expect(prose(rows[3] as HTMLElement)).toContain('A stopped new command does not diagnose the existing agent'); - expect(prose(rows[3] as HTMLElement)).toContain('do not repeat removal or installation'); - expect(rows[3].querySelector('a')?.getAttribute('href')).toBe( + expect(prose(update)).toContain('Preserve the current state and rollback evidence'); + expect(prose(install)).toContain('Installer success is not an accepted report'); + expect(prose(command)).toContain('A stopped new command does not diagnose the existing agent'); + expect(prose(command)).toContain('do not repeat removal or installation'); + expect(command.querySelector('a')?.getAttribute('href')).toBe( '/docs/UNIFIED_AGENT#copied-agent-command-fails-before-installation', ); - expect(prose(rows[4] as HTMLElement)).toContain( - 'a working Pulse Agent view does not prove API recovery', - ); - expect(prose(rows[7] as HTMLElement)).toContain( - 'Guest usage and database size are different measurements', - ); + expect(prose(reporting)).toContain('a working Pulse Agent view does not prove API recovery'); + expect(prose(memory)).toContain('Guest usage and database size are different measurements'); }); it('routes every entry to an existing shipped heading in the production viewer', () => {