Skip to content

Commit

Permalink
Fix Node._findSchema() (josdejong#651)
Browse files Browse the repository at this point in the history
* Add test setup function for simulating browser globals

* Add tests for Node._findSchema

Some of the tests currently fail, which will be helpful in fixing the
incorrect behavior of the `_findSchema` function. The current failures
are:
- the last schema in the pattern properties object is always returned
- when pattern properties are present, wrong object schemas are returned

* Add schema-based tooltip to field names

Using the `title` and `description` properties from the schema, create
and set a tooltip on each field name. When the user hovers over a field
name, it will show the applicable information: title, description, both,
or neither, depending on what data is present in the schema.

* Remove redundant setting of field name title

* Remove accidental .only() from Node tests

* Fix Node._findSchema for pattern properties

The method now checks the key against the RegExp specified by the
pattern properties instead of always returning the last pattern property
in the object.

* Fix path used for recursive calls in Node._findSchema

* Add failing Node._findSchema tests for multi-level pattern properties

* Fix Node._findSchema for schemas with properties and patternProperties
  • Loading branch information
AdamVig authored and josdejong committed Feb 16, 2019
1 parent 53a4f57 commit f827953
Show file tree
Hide file tree
Showing 5 changed files with 1,005 additions and 36 deletions.
Loading

0 comments on commit f827953

Please sign in to comment.