Skip to content

Commit e69c39a

Browse files
committed
docs(changelog): document KnowledgeGraphContextMenu.js coverage
1 parent 5572f30 commit e69c39a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](https://semver.org/) and
2323
- `KnowledgeGraph::parserFunctionKnowledgeGraph()`, `SpecialKnowledgeGraphDesigner::execute()`: confirmed the two `SecurityCheck-XSS` Phan findings on `wfMessage( 'knowledge-graph-wrapper-loading' )->text()` are false positives (hardcoded message key, plain-text i18n values, concatenated only with internal int indexes) and replaced the blanket `.phan/baseline.php` suppressions with inline `@phan-suppress-next-line` justifications ([#63](https://github.com/SemanticMediaWiki/KnowledgeGraph/issues/63))
2424

2525
### Added
26+
- `ext.knowledgegraph.contextmenu.test.js`: added coverage for the previously-untested `resources/KnowledgeGraphContextMenu.js` — removal of a pre-existing `#knowledgegraphp-popup-menu` element (present and absent), root element/`className` construction, per-item `<li>` rendering (icon `<span>` class, label text node, `onClick` listener registration and invocation), `showAt()`'s `style.left`/`style.top`/`document.body` append, and the `$( document )` click-outside removal and `$( '#' + PopupMenuId )` click-inside `stopPropagation()` guard; extended `tests/node-qunit/stubs/mw-oo-stubs.js` so its fake `document.getElementById()` can find elements previously appended via `append()`/`appendChild()` and so the fake jQuery `click()` supports both binding and triggering handlers, both needed to exercise this file ([#83](https://github.com/SemanticMediaWiki/KnowledgeGraph/issues/83))
2627
- `tests/node-qunit/stubs/mw-oo-stubs.js`: added hand-rolled `mw`/`OO`/`$`/`jQuery`/`document`/`vis` stubs, installed via `setup.js` before any production file is required; unblocks `require()`-ing the 6 of 8 testable JS files under `resources/` that reference these globals at module-load time (`KnowledgeGraphDialog.js` and `KnowledgeGraphNonModalDialog.js` call `OO.inheritClass()` at the top level, `KnowledgeGraph.js` calls `$( document ).ready()` at the top level), a hard prerequisite for follow-up JS coverage issues on those files; added `stubs.test.js` asserting all 8 files require cleanly ([#82](https://github.com/SemanticMediaWiki/KnowledgeGraph/issues/82))
2728
- `ext.knowledgegraph.functions.test.js`: added coverage for the previously-untested `KnowledgeGraphFunctions.uuidv4()`, `randomHSL()`, `getContrastColor()`, and `rgbToHex()` ([#81](https://github.com/SemanticMediaWiki/KnowledgeGraph/issues/81))
2829
- `SpecialKnowledgeGraphDesignerTest`: added coverage for the previously-untested `SpecialKnowledgeGraphDesigner::getGroupName()`, the only method in the class without a test ([#77](https://github.com/SemanticMediaWiki/KnowledgeGraph/issues/77))

0 commit comments

Comments
 (0)