Add option to show known issues scatterplot
Test and deploy / deploy (push) Successful in 30s

This commit is contained in:
2026-07-29 13:12:46 -05:00
parent b36247faf4
commit cb6ce0b3c5
15 changed files with 192 additions and 37 deletions
+10 -2
View File
@@ -9,7 +9,7 @@ globalThis.Element = dom.window.Element;
globalThis.localStorage = dom.window.localStorage;
const { CheckboxTree } = await import('../web/vendor/checkbox-tree/checkbox-tree.js');
const { findAddressedReleaseNode } = await import('../web/js/tree.js');
const { findAddressedReleaseNode, findIssueReleaseNode } = await import('../web/js/tree.js');
function createTree(options = {}) {
const container = document.createElement('div');
@@ -108,10 +108,18 @@ test('rejects duplicate node ids', () => {
test('finds an addressed release leaf by product and exact filename', () => {
const nodes = [
{ id: 'known', metadata: { path: ['PAN-OS'], addressed: [] } },
{ id: 'release', metadata: { path: ['PAN-OS', '11', '11.1'], addressed: ['11.1.13-h3.md'] } },
{
id: 'release',
metadata: {
path: ['PAN-OS', '11', '11.1'],
addressed: ['11.1.13-h3.md'],
known: ['11.1.13.md']
}
},
{ id: 'other', metadata: { path: ['GlobalProtect'], addressed: ['11.1.13-h3.md'] } }
];
assert.equal(findAddressedReleaseNode(nodes, 'PAN-OS', '11.1.13-h3')?.id, 'release');
assert.equal(findAddressedReleaseNode(nodes, 'PAN-OS', '11.1.13'), undefined);
assert.equal(findIssueReleaseNode(nodes, 'PAN-OS', '11.1.13', 'known')?.id, 'release');
});
+27
View File
@@ -4,6 +4,7 @@ import {
buildIssuePlotProduct,
buildReleaseStatistics,
extractAddressedIssueIds,
extractIssuePlotEntries,
renderStatisticsPage
} from '../scripts/generate-release-statistics.mjs';
@@ -32,6 +33,31 @@ test('builds compact plot points in semantic release order', () => {
]);
});
test('detects resolved only inside the issue own caveat block', () => {
const entries = extractIssuePlotEntries(`## PAN-100000
\`\`\`caveat
This issue is now resolved.
\`\`\`
## PAN-200000
The word resolved appears in the description only.
## PAN-300000
\`\`\`caveat
Applies to resolved DNS names.
\`\`\`
`, { detectResolved: true });
assert.deepEqual(entries, [
{ id: 'PAN-100000', resolved: true },
{ id: 'PAN-200000', resolved: false },
{ id: 'PAN-300000', resolved: true }
]);
});
test('counts unique releases at major and minor levels and hotfixes at patch level', () => {
const records = [
{ product: 'PAN-OS', issueType: 'known', version: '10.1.2' },
@@ -65,5 +91,6 @@ test('renders the graph without displaying the legacy release tables', () => {
assert.match(html, /id="issue-plot-canvas"/);
assert.match(html, />Base release</);
assert.match(html, />Hotfix release</);
assert.match(html, />Resolved known issue</);
assert.doesNotMatch(html, /class="stats-product"/);
});