Repository navigation
test(e2e): cover the Designer dialog, export, reset and node collapsing - #122
Merged
Merged
Conversation
The browser tests only checked that the Designer page loads and that a click on a node causes no error. Add tests for what users actually do with the library: add an article through the Add node dialog, export the visible graph as wikitext, collapse and expand the neighbors of a node by clicking it, and use the graph after Reset graph, which creates a new network whose handlers have to be bound again. Group the Designer tests and share the dialog steps in a helper that only looks at visible options of the active dialog, because options of a dialog opened earlier stay in the DOM.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #122 +/- ##
=========================================
Coverage 80.68% 80.68%
Complexity 186 186
=========================================
Files 18 18
Lines 1807 1807
Branches 216 216
=========================================
Hits 1458 1458
Misses 197 197
Partials 152 152 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #120, which listed these as not covered: the Designer dialogs and the effect of a click.
New tests
Alicewith the propertyKnowsthrough the dialog results in 3 nodes and 3 edges and closes the dialog.{{#knowledgegraph:wikitext with the expected nodes and properties.depth=1, because neighbors that were loaded as nodes themselves are not toggled.confirm(), accepted in the test) a new network exists, the hook fired again and the graph is empty. After adding a node again, the context menu and double-click work on the new network (regression guard for bug (designer): "Reset graph" drops the click, hover and double-click handlers of the network #110).Verification
build/docker-compose.override.yml).DataSet#updatedisabled in the served bundle only the collapse test fails. WithNetwork#ondisabled six tests fail, including the Reset graph one..first()picked a hidden one. It now only looks at visible options of the active dialog.Not covered
Node deletion and editing through the dialog, the "By properties" and "By categories" tabs, and the graph configuration panel.