-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TS errors in
tests
directory (#314)
Fix all TS errors in the `tests` folder. J=SLAP-2360 TEST=manual Go through all files in `tests` and see that there are no more errors.
- Loading branch information
Showing
35 changed files
with
352 additions
and
349 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 |
---|---|---|
|
@@ -406,7 +406,7 @@ Apache License | |
|
||
The following NPM package may be included in this product: | ||
|
||
- @reduxjs/[email protected].5 | ||
- @reduxjs/[email protected].6 | ||
|
||
This package contains the following license and notice below: | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,48 @@ | ||
import { FiltersContextType } from '../../../src/components/Filters/FiltersContext'; | ||
import { SelectableFieldValueFilter } from '../../../src/models/SelectableFieldValueFilter'; | ||
import { FilterGroupContextType } from '../../../src/components/Filters/FilterGroupContext'; | ||
import { Matcher } from '@yext/search-headless-react'; | ||
|
||
const selectableFilter: SelectableFieldValueFilter = { | ||
selected: true, | ||
fieldId: '123', | ||
matcher: Matcher.Equals, | ||
value: 'test' | ||
}; | ||
|
||
export const filterContextValue: FiltersContextType = { | ||
selectFilter: () => null, | ||
applyFilters: () => null, | ||
filters: [] | ||
}; | ||
|
||
export const filterContextValueDisabled: FiltersContextType = { | ||
selectFilter: () => null, | ||
applyFilters: () => null, | ||
filters: [selectableFilter] | ||
}; | ||
|
||
export const filterGroupContextValue: FilterGroupContextType = { | ||
searchValue: '', | ||
fieldId: '123', | ||
setSearchValue: () => null, | ||
getCollapseProps: () => ({ | ||
id: 'id', | ||
onTransitionEnd: () => null, | ||
style: {}, | ||
'aria-hidden': 'false' | ||
}), | ||
getToggleProps: () => ({ | ||
disabled: false, | ||
type: 'button', | ||
role: 'role', | ||
id: 'id', | ||
'aria-controls': 'element', | ||
'aria-expanded': 'true', | ||
tabIndex: 0, | ||
onClick: () => null | ||
}), | ||
isExpanded: true, | ||
isOptionsDisabled: false, | ||
setIsOptionsDisabled: () => null | ||
}; |
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
Oops, something went wrong.