forked from temando/open-api-renderer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request temando#117 from brendo/issue-111-add-tag-support
Add support for top level Tags. Closes temando#111
- Loading branch information
Showing
13 changed files
with
264 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,7 @@ | |
.description-inline p { | ||
display: inline; | ||
} | ||
|
||
.description p { | ||
margin: .5rem 0; | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import React from 'react' | ||
import NavigationTag from './../../src/components/NavigationTag/NavigationTag' | ||
import renderer from 'react-test-renderer' | ||
|
||
describe('<NavigationTag />', () => { | ||
const location = { | ||
hash: '#pets' | ||
} | ||
|
||
it('renders with minimum props', () => { | ||
const tree = renderer.create( | ||
<NavigationTag title='pets' onClick={jest.fn()} location={location} /> | ||
) | ||
|
||
expect(tree).toMatchSnapshot() | ||
}) | ||
|
||
it('renders with methods', () => { | ||
const methods = [{ | ||
type: 'get', | ||
title: 'Get pets', | ||
link: 'pets' | ||
}, | ||
{ | ||
type: 'get', | ||
title: 'Get pets', | ||
link: 'pets/:id' | ||
}] | ||
|
||
const tree = renderer.create( | ||
<NavigationTag title='pets' onClick={jest.fn()} location={location} methods={methods} /> | ||
) | ||
|
||
expect(tree).toMatchSnapshot() | ||
}) | ||
|
||
it('renders with description', () => { | ||
const tree = renderer.create( | ||
<NavigationTag title='Pets' handle='pets' description='Access to Pets' onClick={jest.fn()} location={location} /> | ||
) | ||
|
||
expect(tree).toMatchSnapshot() | ||
}) | ||
}) |
Oops, something went wrong.