-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
3,827 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ dist | |
.idea | ||
/src/helpers.js | ||
.DS_Store | ||
coverage |
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,23 @@ | ||
sudo: false | ||
language: node_js | ||
|
||
node_js: | ||
- '10' | ||
|
||
branches: | ||
only: | ||
- master | ||
|
||
cache: | ||
directories: | ||
- node_modules | ||
- | ||
before_install: | ||
- npm update | ||
|
||
install: | ||
- npm ci | ||
|
||
script: | ||
- npm test | ||
- npm run coveralls |
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,16 @@ | ||
import React from 'react'; | ||
import renderer from 'react-test-renderer'; | ||
|
||
import Clear from '../../src/components/Clear'; | ||
|
||
const props = { | ||
parentProps: { | ||
clearRenderer: null | ||
} | ||
}; | ||
|
||
it('<Clear/> renders correctly', () => { | ||
const tree = renderer.create(<Clear {...props}/>).toJSON(); | ||
|
||
expect(tree).toMatchSnapshot(); | ||
}); |
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,24 @@ | ||
import React from 'react'; | ||
import renderer from 'react-test-renderer'; | ||
|
||
import Content from '../../src/components/Content'; | ||
|
||
import {options} from '../../docs/src/options'; | ||
|
||
const props = { | ||
parentProps: { | ||
contentRenderer: null | ||
}, | ||
parentState: { | ||
values: options | ||
}, | ||
parentMethods: { | ||
getInputSize: () => undefined | ||
} | ||
}; | ||
|
||
it('<Content/> renders correctly', () => { | ||
const tree = renderer.create(<Content {...props}/>).toJSON(); | ||
|
||
expect(tree).toMatchSnapshot(); | ||
}); |
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,22 @@ | ||
import React from 'react'; | ||
import renderer from 'react-test-renderer'; | ||
|
||
import Dropdown from '../../src/components/Dropdown'; | ||
|
||
const props = { | ||
parentProps: { | ||
dropdownRenderer: null, | ||
}, | ||
parentState: { | ||
selectBounds: {} | ||
}, | ||
parentMethods: { | ||
searchResults: () => [] | ||
} | ||
}; | ||
|
||
it('<Dropdown/> renders correctly', () => { | ||
const tree = renderer.create(<Dropdown {...props}/>).toJSON(); | ||
|
||
expect(tree).toMatchSnapshot(); | ||
}); |
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,19 @@ | ||
import React from 'react'; | ||
import renderer from 'react-test-renderer'; | ||
|
||
import DropdownHandle from '../../src/components/DropdownHandle'; | ||
|
||
const props = { | ||
parentProps: { | ||
dropdownHandleRenderer: null | ||
}, | ||
parentState: { | ||
dropdown: false | ||
} | ||
}; | ||
|
||
it('<DropdownHandle/> renders correctly', () => { | ||
const tree = renderer.create(<DropdownHandle {...props}/>).toJSON(); | ||
|
||
expect(tree).toMatchSnapshot(); | ||
}); |
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,23 @@ | ||
import React from 'react'; | ||
import renderer from 'react-test-renderer'; | ||
|
||
import Input from '../../src/components/Input'; | ||
import { options } from '../../docs/src/options'; | ||
|
||
const props = { | ||
parentProps: { | ||
inputRenderer: null | ||
}, | ||
parentState: { | ||
values: options | ||
}, | ||
parentMethods: { | ||
getInputSize: () => undefined | ||
} | ||
}; | ||
|
||
it('<Input/> renders correctly', () => { | ||
const tree = renderer.create(<Input {...props}/>).toJSON(); | ||
|
||
expect(tree).toMatchSnapshot(); | ||
}); |
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,25 @@ | ||
import React from 'react'; | ||
import renderer from 'react-test-renderer'; | ||
|
||
import Item from '../../src/components/Item'; | ||
|
||
import {options} from '../../docs/src/options'; | ||
|
||
const props = { | ||
item: options[0], | ||
parentProps: { | ||
itemRenderer: null | ||
}, | ||
parentState: { | ||
cursor: 0 | ||
}, | ||
parentMethods: { | ||
isSelected: () => undefined | ||
} | ||
}; | ||
|
||
it('<Item/> renders correctly', () => { | ||
const tree = renderer.create(<Item {...props}/>).toJSON(); | ||
|
||
expect(tree).toMatchSnapshot(); | ||
}); |
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,16 @@ | ||
import React from 'react'; | ||
import renderer from 'react-test-renderer'; | ||
|
||
import Loading from '../../src/components/Loading'; | ||
|
||
const props = { | ||
parentProps: { | ||
loadingRenderer: null | ||
} | ||
}; | ||
|
||
it('<Loading/> renders correctly', () => { | ||
const tree = renderer.create(<Loading {...props}/>).toJSON(); | ||
|
||
expect(tree).toMatchSnapshot(); | ||
}); |
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,16 @@ | ||
import React from 'react'; | ||
import renderer from 'react-test-renderer'; | ||
|
||
import NoData from '../../src/components/NoData'; | ||
|
||
const props = { | ||
parentProps: { | ||
noDataRenderer: null | ||
} | ||
}; | ||
|
||
it('<NoData/> renders correctly', () => { | ||
const tree = renderer.create(<NoData {...props}/>).toJSON(); | ||
|
||
expect(tree).toMatchSnapshot(); | ||
}); |
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,19 @@ | ||
import React from 'react'; | ||
import renderer from 'react-test-renderer'; | ||
|
||
import Option from '../../src/components/Option'; | ||
|
||
import {options} from '../../docs/src/options'; | ||
|
||
const props = { | ||
parentItem: options[0], | ||
parentProps: { | ||
optionRenderer: null | ||
} | ||
}; | ||
|
||
it('<Option/> renders correctly', () => { | ||
const tree = renderer.create(<Option {...props}/>).toJSON(); | ||
|
||
expect(tree).toMatchSnapshot(); | ||
}); |
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,16 @@ | ||
import React from 'react'; | ||
import renderer from 'react-test-renderer'; | ||
|
||
import Separator from '../../src/components/Separator'; | ||
|
||
const props = { | ||
parentProps: { | ||
separatorRenderer: null | ||
} | ||
}; | ||
|
||
it('<Separator/> renders correctly', () => { | ||
const tree = renderer.create(<Separator {...props}/>).toJSON(); | ||
|
||
expect(tree).toMatchSnapshot(); | ||
}); |
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,12 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<Clear/> renders correctly 1`] = ` | ||
<div | ||
className="css-x3l5ce-ClearComponent e11qlq5e0" | ||
onClick={[Function]} | ||
onKeyPress={[Function]} | ||
tabIndex="-1" | ||
> | ||
× | ||
</div> | ||
`; |
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,15 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<Content/> renders correctly 1`] = ` | ||
<div | ||
className="react-dropdown-select-content react-dropdown-select-type-single css-rpdrp-ContentComponent e1gn6jc30" | ||
onClick={[Function]} | ||
> | ||
<span /> | ||
<input | ||
className="react-dropdown-select-input css-1bc66r-InputComponent e11wid6y0" | ||
onClick={[Function]} | ||
tabIndex="-1" | ||
/> | ||
</div> | ||
`; |
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,14 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<Dropdown/> renders correctly 1`] = ` | ||
<div | ||
aria-expanded="true" | ||
className="react-dropdown-select-dropdown css-k5q2zn-DropDown e1qjn9k90" | ||
role="list" | ||
tabIndex="-1" | ||
> | ||
<div | ||
className="css-1lli8k7-NoDataComponent e1l5ho1t0" | ||
/> | ||
</div> | ||
`; |
23 changes: 23 additions & 0 deletions
23
__tests__/components/__snapshots__/DropdownHandle.spec.js.snap
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,23 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<DropdownHandle/> renders correctly 1`] = ` | ||
<div | ||
className="react-dropdown-select-dropdown-handle css-2zkru-DropdownHandleComponent e1vudypg0" | ||
onClick={[Function]} | ||
onKeyDown={[Function]} | ||
onKeyPress={[Function]} | ||
tabIndex="-1" | ||
> | ||
<svg | ||
fill="currentColor" | ||
preserveAspectRatio="xMidYMid meet" | ||
viewBox="0 0 40 40" | ||
> | ||
<g> | ||
<path | ||
d="m31 26.4q0 0.3-0.2 0.5l-1.1 1.2q-0.3 0.2-0.6 0.2t-0.5-0.2l-8.7-8.8-8.8 8.8q-0.2 0.2-0.5 0.2t-0.5-0.2l-1.2-1.2q-0.2-0.2-0.2-0.5t0.2-0.5l10.4-10.4q0.3-0.2 0.6-0.2t0.5 0.2l10.4 10.4q0.2 0.2 0.2 0.5z" | ||
/> | ||
</g> | ||
</svg> | ||
</div> | ||
`; |
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,9 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<Input/> renders correctly 1`] = ` | ||
<input | ||
className="react-dropdown-select-input css-1bc66r-InputComponent e11wid6y0" | ||
onClick={[Function]} | ||
tabIndex="-1" | ||
/> | ||
`; |
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,13 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<Item/> renders correctly 1`] = ` | ||
<span | ||
className="react-dropdown-select-item null css-7av8hz-ItemComponent evc32pp0" | ||
onClick={[Function]} | ||
onKeyPress={[Function]} | ||
role="option" | ||
tabIndex="-1" | ||
> | ||
</span> | ||
`; |
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,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<Loading/> renders correctly 1`] = ` | ||
<div | ||
className="react-dropdown-select-loading css-k8dcp9-LoadingComponent e1l5cpc30" | ||
/> | ||
`; |
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,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<NoData/> renders correctly 1`] = ` | ||
<div | ||
className="css-1lli8k7-NoDataComponent e1l5ho1t0" | ||
/> | ||
`; |
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,18 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<Option/> renders correctly 1`] = ` | ||
<span | ||
className="react-dropdown-select-option css-1sb8fud-OptionComponent e1l4eby50" | ||
role="listitem" | ||
> | ||
<span | ||
className="react-dropdown-select-option-label" | ||
/> | ||
<span | ||
className="react-dropdown-select-option-remove" | ||
onClick={[Function]} | ||
> | ||
× | ||
</span> | ||
</span> | ||
`; |
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,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<Separator/> renders correctly 1`] = ` | ||
<div | ||
className="react-dropdown-select-separator css-vxbae9-SeparatorComponent e19h5j1v0" | ||
/> | ||
`; |
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,10 @@ | ||
module.exports = { | ||
plugins: [ | ||
"emotion", | ||
"@babel/plugin-proposal-class-properties", | ||
"@babel/plugin-proposal-object-rest-spread", | ||
"@babel/plugin-syntax-dynamic-import", | ||
"transform-dynamic-import" | ||
], | ||
presets: ['@babel/preset-env', '@babel/preset-react'] | ||
}; |
Oops, something went wrong.