-
Notifications
You must be signed in to change notification settings - Fork 45
feat: new JSV design #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: new JSV design #103
Changes from 1 commit
4ebc0f9
6c7902e
1efbe1c
8faa3b7
bccb846
0a1f443
912bab8
ca06c5d
c77f451
9feccb7
716278a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import { Dictionary, Primitive } from '@stoplight/types'; | ||
| import { Box, Flex, Text } from '@stoplight/mosaic'; | ||
| import { Flex, Text } from '@stoplight/mosaic'; | ||
| import { capitalize, keys, omit, pick, pickBy, uniq } from 'lodash'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only to be consistent with other lodash functions that we needed to use. |
||
| import * as React from 'react'; | ||
| import { RegularNode } from '@stoplight/json-schema-tree'; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import 'jest-enzyme'; | ||
|
|
||
| import { RegularNode } from '@stoplight/json-schema-tree'; | ||
| import { Dictionary } from '@stoplight/types'; | ||
| import { shallow } from 'enzyme'; | ||
| import * as React from 'react'; | ||
|
|
||
| import { Properties } from '../Properties'; | ||
|
|
||
| describe('Properties component', () => { | ||
| describe('when property is deprecated', () => { | ||
| let validations: Dictionary<unknown>; | ||
| let deprecated: boolean; | ||
|
|
||
| beforeEach(() => { | ||
| ({ validations, deprecated } = new RegularNode({ | ||
| 'x-deprecated': true, | ||
| type: 'string', | ||
| minLength: 2, | ||
| default: 'foo', | ||
| })); | ||
| }); | ||
|
|
||
| it('should render deprecated box', () => { | ||
| const wrapper = shallow( | ||
| <Properties deprecated={deprecated} required={false} validations={validations} />, | ||
| ).childAt(0); | ||
|
|
||
| expect(wrapper).toHaveText('deprecated'); | ||
| }); | ||
| }); | ||
| }); |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.