Commit Graph

45 Commits

Author SHA1 Message Date
kyle
75747424cf improvement: sanitization via DOMPurify (#4513)
* swap `sanitize-html` for `dompurify`

* set up node enzyme tests with jsdom

dompurify, as the name suggests, needs a DOM or it won't work!

* reconcile tests and sanitizer settings

* remove obsolete sanitizeOptions

* add `jsdom` dependency
2018-05-04 10:06:44 -07:00
kyle
fd8274b353 Filter $$ref from examples (#4392)
* fix(dev-server): don't open localhost in a browser
* tests: refactor model-example enzyme tests to be more isolated
* tests: add failing sampleFromSchema tests for $$ref keys
* tests: add additional test for user-created $$ref values
* fix: create deeplyStripKey; use it to filter $$refs out of examples
* tests: add cases for deeplyStripKey
2018-03-30 18:02:32 -07:00
Helder Sepulveda
ebf94dfccf Allow images with data scheme (#4305)
* Add UnitTest for images

allows image elements with https scheme

* Test images with data scheme

* Add allowedSchemesByTag

* Fix error  Strings must use doublequote  quotes
2018-03-08 17:17:30 -08:00
kyle
ecf688171f feat: lazy resolver (#4249)
* default to empty `ImmutableMap` when grabbing op metadata
* pass `errors` into JsonSchema components
* Account for Immutable data structure in JavaScriptonSchema...
    ...and create empty Lists instead of Maps by default.
* Pass ImmutableList through to JsonSchema child components
* Add lazy resolving spec state extensions
* TEMPORARY: disable conventional resolved spec
* WIP
* Use resolveSubtree in Operation display
* Freebie: short-circuit Markdown component if it is given plaintext
* NEW DEFAULT BEHAVIOR: `defaultModelsExpandDepth: 1` does not expand individual models
* Render faked Model expander to trigger resolution
* Baseline support for Editor lifecycles
* Display operation summaries before the operation is resolved
* Test migrations
* WIP
* Swagger2 TIO Body params
* a bit of cleanup
* Debounce string param inputs
* Reach into unresolved operation for deprecated flag, if available
* Fire subtree request outside of render
* Remove debugging flags
* Fix logical errors in spec statePlugins
* TODOs become TODONEs!
* Migrate deeplinking feature to non-resolved spec action
* ESLint fixes
2018-02-23 01:12:53 -08:00
gilbode
f0c5f1fe33 fix: use mutated request for request URL in live-response (#4117) 2018-02-09 19:49:18 -08:00
Helder Sepulveda
f2a8ed07e0 improve(sanitizer): add more allowed attributes (#4194)
* Add a couple of items to the sanitizeOptions

*  Strings must use doublequote  quotes
2018-02-07 19:51:15 -08:00
Kyle Shockey
9bad35ed85 Refactor specPath to Im data structures to avoid waste renders 2017-12-28 18:04:12 -06:00
kyle
15dbc20efd Merge branch 'master' into master 2017-12-15 18:22:07 -08:00
Helder Sepulveda
6ba6039eb7 Merge branch 'master' into master 2017-12-12 17:48:40 -05:00
Greg Thompson
0e883d4a7a Merge remote-tracking branch 'upstream/master' into ft/deeplinking-link-component 2017-12-12 09:18:12 -06:00
kyle
a94c6c0e7f Merge branch 'master' into feature/deeplink-zenscroll 2017-12-11 19:05:16 -08:00
Greg Thompson
d2e931f3e1 DeepLink feedback 2017-12-11 14:27:28 -06:00
HelderSepu
28c706c70a Add defaultModelsExpandDepth
This change separates:
the Model (the one on the model-example section)
from
the Models (the ones at the bottom)
2017-12-08 21:12:41 -05:00
Greg Thompson
05fd5b354d update test 2017-12-08 10:20:55 -06:00
Kyle Shockey
60ee667688 Linter & test harness fixes 2017-12-07 17:07:30 -08:00
kyle
bfb4c7a8d7 Merge branch 'master' into feature/spec-path 2017-12-07 16:49:34 -08:00
Kyle Shockey
328f02c463 Move method filtering logic to Operations component 2017-12-07 14:00:47 -08:00
Kyle Shockey
eb97b91d7e Add failing tests 2017-12-07 14:00:26 -08:00
Josh Ponelat
41ae8242b6 fix test 2017-12-04 16:10:43 +02:00
Kyle Shockey
0fa532d35c Ensure that unknown types are always displayed as strings 2017-11-29 19:41:12 -06:00
Kyle Shockey
5224932cf9 Fix failing test 2017-11-29 19:21:20 -06:00
Kyle Shockey
e17a5f40f5 Add JsonSchemaForm tests, including one failing 2017-11-29 19:03:40 -06:00
Kyle Shockey
88e98ce281 fix tests 2017-11-23 12:55:29 -06:00
Greg Thompson
ee5d9a8c34 propType test fix 2017-11-09 10:23:02 -06:00
kyle
49457fe089 Correct typo in test description 2017-11-08 22:48:20 -08:00
feenr
bcad5b583e Remove commented out and debug code 2017-11-06 12:41:14 -05:00
feenr
e9d94e02d8 Add new tests for object-model 2017-11-06 10:43:43 -05:00
Josh Ponelat
e53bd3aef3 add stub to models test for specSelectors.isOAS3) 2017-11-03 17:50:46 +02:00
Mark H. Wilkinson
e1a7af4c92 Fix regression with rendering links in Markdown. 2017-10-16 14:40:07 +01:00
Owen Conti
60e8091eed Add unit test for images in markdown 2017-10-08 10:26:32 -06:00
Owen Conti
1785d48746 Remove .only from existing tests. Add markdown test cases for heading elements. 2017-10-08 10:13:09 -06:00
kyle
263f6feb2f Merge branch 'master' into ft/default_model_rendering 2017-09-29 13:29:04 -07:00
Owen Conti
44ece46cd3 Fixes #3633
Make sure PrimitiveModel uses the schema's title first and then falls back to the passed-in `name` property. Added enzyme test for functionality.
2017-09-17 09:49:13 -06:00
Owen Conti
ef99b7e434 Remove it.only from new test 2017-09-12 23:09:21 -06:00
Owen Conti
cb88cd53b6 Added test for response.jsx to make sure properties are passed to ModelExample component in the correct order 2017-09-12 23:07:11 -06:00
Mike Gilbode
d7ae284a0c Add defaultModelRendering parameter. 2017-08-30 23:30:57 -04:00
Mike Gilbode
087ed20384 Add support for requestInterceptor / responseInterceptor.
- Display mutated requests from request interceptor in curl output in UI.
  Put this behind showMutatedRequest flag so that the mutation can be
  silent.
- Document requestInterceptor, responseInterceptor and showMutatedRequest
  in README.md
- Add tests
2017-08-13 01:14:41 -04:00
Kyle Shockey
049e227c3c Add small comment to test 2017-08-09 17:44:36 -07:00
Kyle Shockey
b7a3f10f64 Remove it.only 2017-08-09 17:35:56 -07:00
Kyle Shockey
9747559529 operationScheme -> currentScheme 2017-08-09 17:35:33 -07:00
Kyle Shockey
9dee2daa14 Fix global state issues with Schemes component 2017-08-09 17:06:48 -07:00
Owen Conti
2c35ba2c8f Fixes #3405 - Changed logic for schemes.jsx component to select default scheme when there is no selected scheme. Added test for functionality. 2017-07-18 19:58:02 -06:00
Kyle Shockey
e1fcbfbf09 Linter error fixes 2017-03-23 16:36:45 -07:00
Kyle Shockey
df9e93fc2b Skip failing test for now 2017-03-22 21:21:28 -07:00
Ron
f22a628934 in with the new 2017-03-17 21:17:53 -07:00