diff --git a/.github/scripts/release-qa-status/src/format.test.ts b/.github/scripts/release-qa-status/src/format.test.ts index ba484e934d3..ebcf6afe98c 100644 --- a/.github/scripts/release-qa-status/src/format.test.ts +++ b/.github/scripts/release-qa-status/src/format.test.ts @@ -1,5 +1,5 @@ -import { renderSlack } from './format'; -import { ReleaseQAReport, PRQAResult } from './types'; +import { renderMarkdown, renderSlack } from './format'; +import { PRQAResult, ReleaseQAReport, SlackMapping } from './types'; function pr( number: number, @@ -59,7 +59,7 @@ describe('renderSlack', () => { expect(renderSlack(r)).toContain(':rotating_light: *QA Coverage*'); }); - it('uses the requested count labels', () => { + it('renders the count labels exactly as requested', () => { const r = report({ summary: { failed: 1, missing: 2, unlinked: 3, external: 4, passed: 0, excluded: 0 }, failed: [pr(1, 't', 'failed')], @@ -71,35 +71,152 @@ describe('renderSlack', () => { expect(out).toContain('Not in the core repo: 4'); }); - it('truncates very long titles with an ellipsis', () => { - const longTitle = 'x'.repeat(200); + it('does NOT include a detailed PR list in the slack snippet', () => { const r = report({ - summary: { failed: 0, missing: 1, unlinked: 0, external: 0, passed: 0, excluded: 0 }, - missing: [pr(10, longTitle, 'missing')], + summary: { failed: 0, missing: 2, unlinked: 0, external: 0, passed: 0, excluded: 0 }, + missing: [ + pr(35463, 'feat(maintenance): thread dump endpoints', 'missing'), + pr(35726, 'fix(edit-content): normalize lockedBy', 'missing'), + ], }); const out = renderSlack(r); - expect(out).toContain('…'); - // Original 200-char title should not appear verbatim - expect(out).not.toContain(longTitle); + // Compact: just counts + cc line, no per-PR lines. + expect(out).not.toContain('thread dump'); + expect(out).not.toContain('normalize lockedBy'); + expect(out).not.toContain('https://github.com/dotCMS/core/pull/35463'); }); - it('escapes mrkdwn-meaningful characters in titles', () => { + it('wraps each count in a Slack link with per-bucket anchor when detailUrl is provided', () => { const r = report({ - summary: { failed: 0, missing: 1, unlinked: 0, external: 0, passed: 0, excluded: 0 }, - missing: [pr(10, 'fix