Source code
Revision control
Copy as Markdown
Other Tools
exports[`QuickOpenModal Basic render with mount & searchType = functions 1`] = `
<Provider
store={
Object {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
}
}
>
<QuickOpenModal
blackBoxRanges={Object {}}
clearHighlightLineRange={[MockFunction]}
closeQuickOpen={[MockFunction]}
displayedSources={Array []}
enabled={true}
getFunctionSymbols={
[MockFunction] {
"calls": Array [
Array [
Object {
"source": Object {
"id": "foo",
},
},
100,
],
],
"results": Array [
Object {
"type": "return",
"value": Array [],
},
],
}
}
highlightLineRange={[MockFunction]}
isOriginal={false}
openedTabUrls={Array []}
query="@"
searchType="functions"
selectSpecificLocation={[MockFunction]}
selectedLocation={
Object {
"source": Object {
"id": "foo",
},
}
}
setQuickOpenQuery={[MockFunction]}
shortcutsModalEnabled={false}
thread="FakeThread"
toggleShortcutsModal={[MockFunction]}
updateCursorPosition={[MockFunction]}
>
<Modal
handleClose={[Function]}
>
<div
className="modal-wrapper"
onClick={[Function]}
>
<div
className="modal"
onClick={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query="@"
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={true}
showExcludePatterns={false}
showSearchModifiers={false}
summaryMsg="Loading…"
>
<SearchInput
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query="@"
searchKey="quickopen-search"
searchOptions={
Object {
"caseSensitive": false,
"excludePatterns": "",
"regexMatch": false,
"wholeWord": false,
}
}
selectedItemId=""
setSearchOptions={[Function]}
showClose={false}
showErrorEmoji={true}
showExcludePatterns={false}
showSearchModifiers={false}
size=""
summaryMsg="Loading…"
>
<div
className="search-outline"
>
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="result-list"
className="search-field"
role="combobox"
>
<AccessibleImage
className="search"
>
<span
className="img search"
/>
</AccessibleImage>
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="result-list"
className="empty"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
spellCheck={false}
value="@"
/>
<div
className="search-field-summary"
>
Loading…
</div>
<div
className="search-buttons-bar"
/>
</div>
</div>
</SearchInput>
</Connect(SearchInput)>
</div>
</div>
</Modal>
</QuickOpenModal>
</Provider>
`;
exports[`QuickOpenModal Basic render with mount & searchType = variables 1`] = `
<Provider
store={
Object {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
}
}
>
<QuickOpenModal
blackBoxRanges={Object {}}
clearHighlightLineRange={[MockFunction]}
closeQuickOpen={[MockFunction]}
displayedSources={Array []}
enabled={true}
getFunctionSymbols={[MockFunction]}
highlightLineRange={[MockFunction]}
isOriginal={false}
openedTabUrls={Array []}
query="#"
searchType="variables"
selectSpecificLocation={[MockFunction]}
selectedLocation={
Object {
"source": Object {
"id": "foo",
},
}
}
setQuickOpenQuery={[MockFunction]}
shortcutsModalEnabled={false}
thread="FakeThread"
toggleShortcutsModal={[MockFunction]}
updateCursorPosition={[MockFunction]}
>
<Modal
handleClose={[Function]}
>
<div
className="modal-wrapper"
onClick={[Function]}
>
<div
className="modal"
onClick={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query="#"
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={true}
showExcludePatterns={false}
showSearchModifiers={false}
summaryMsg=""
>
<SearchInput
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query="#"
searchKey="quickopen-search"
searchOptions={
Object {
"caseSensitive": false,
"excludePatterns": "",
"regexMatch": false,
"wholeWord": false,
}
}
selectedItemId=""
setSearchOptions={[Function]}
showClose={false}
showErrorEmoji={true}
showExcludePatterns={false}
showSearchModifiers={false}
size=""
summaryMsg=""
>
<div
className="search-outline"
>
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="result-list"
className="search-field"
role="combobox"
>
<AccessibleImage
className="search"
>
<span
className="img search"
/>
</AccessibleImage>
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="result-list"
className="empty"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
spellCheck={false}
value="#"
/>
<div
className="search-buttons-bar"
/>
</div>
</div>
</SearchInput>
</Connect(SearchInput)>
<ResultList
expanded={false}
items={Array []}
key="results"
role="listbox"
selectItem={[Function]}
selected={0}
size="small"
>
<ul
aria-live="polite"
className="result-list small"
id="result-list"
role="listbox"
/>
</ResultList>
</div>
</div>
</Modal>
</QuickOpenModal>
</Provider>
`;
exports[`QuickOpenModal Basic render with mount 1`] = `
<Provider
store={
Object {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
}
}
>
<QuickOpenModal
blackBoxRanges={Object {}}
clearHighlightLineRange={[MockFunction]}
closeQuickOpen={[MockFunction]}
displayedSources={Array []}
enabled={true}
getFunctionSymbols={[MockFunction]}
highlightLineRange={[MockFunction]}
isOriginal={false}
openedTabUrls={Array []}
query=""
searchType="sources"
selectSpecificLocation={[MockFunction]}
selectedLocation={
Object {
"source": Object {
"id": "foo",
},
}
}
setQuickOpenQuery={[MockFunction]}
shortcutsModalEnabled={false}
thread="FakeThread"
toggleShortcutsModal={[MockFunction]}
updateCursorPosition={[MockFunction]}
>
<Modal
handleClose={[Function]}
>
<div
className="modal-wrapper"
onClick={[Function]}
>
<div
className="modal"
onClick={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=""
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={false}
showExcludePatterns={false}
showSearchModifiers={false}
size="big"
summaryMsg=""
>
<SearchInput
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=""
searchKey="quickopen-search"
searchOptions={
Object {
"caseSensitive": false,
"excludePatterns": "",
"regexMatch": false,
"wholeWord": false,
}
}
selectedItemId=""
setSearchOptions={[Function]}
showClose={false}
showErrorEmoji={false}
showExcludePatterns={false}
showSearchModifiers={false}
size="big"
summaryMsg=""
>
<div
className="search-outline"
>
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="result-list"
className="search-field big"
role="combobox"
>
<AccessibleImage
className="search"
>
<span
className="img search"
/>
</AccessibleImage>
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="result-list"
className=""
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
spellCheck={false}
value=""
/>
<div
className="search-buttons-bar"
/>
</div>
</div>
</SearchInput>
</Connect(SearchInput)>
<ResultList
expanded={false}
items={Array []}
key="results"
role="listbox"
selectItem={[Function]}
selected={0}
size="big"
>
<ul
aria-live="polite"
className="result-list big"
id="result-list"
role="listbox"
/>
</ResultList>
</div>
</div>
</Modal>
</QuickOpenModal>
</Provider>
`;
exports[`QuickOpenModal Doesn't render when disabled 1`] = `
<Modal
handleClose={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=""
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={false}
showExcludePatterns={false}
showSearchModifiers={false}
size="big"
summaryMsg=""
/>
<ResultList
expanded={false}
items={Array []}
key="results"
role="listbox"
selectItem={[Function]}
selected={0}
size="big"
/>
</Modal>
`;
exports[`QuickOpenModal Renders when enabled 1`] = `
<Modal
handleClose={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=""
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={false}
showExcludePatterns={false}
showSearchModifiers={false}
size="big"
summaryMsg=""
/>
<ResultList
expanded={false}
items={Array []}
key="results"
role="listbox"
selectItem={[Function]}
selected={0}
size="big"
/>
</Modal>
`;
exports[`QuickOpenModal Simple goto search query = :abc & searchType = goto 1`] = `
<QuickOpenModal
blackBoxRanges={Object {}}
clearHighlightLineRange={[MockFunction]}
closeQuickOpen={[MockFunction]}
displayedSources={Array []}
enabled={true}
getFunctionSymbols={[MockFunction]}
highlightLineRange={[MockFunction]}
isOriginal={false}
openedTabUrls={Array []}
query=":abc"
searchType="goto"
selectSpecificLocation={[MockFunction]}
selectedLocation={
Object {
"source": Object {
"id": "foo",
},
}
}
setQuickOpenQuery={[MockFunction]}
shortcutsModalEnabled={false}
thread="FakeThread"
toggleShortcutsModal={[MockFunction]}
updateCursorPosition={[MockFunction]}
>
<Modal
handleClose={[Function]}
>
<div
className="modal-wrapper"
onClick={[Function]}
>
<div
className="modal"
onClick={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=":abc"
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={true}
showExcludePatterns={false}
showSearchModifiers={false}
summaryMsg="Go to line"
>
<SearchInput
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=":abc"
searchKey="quickopen-search"
searchOptions={
Object {
"caseSensitive": false,
"excludePatterns": "",
"regexMatch": false,
"wholeWord": false,
}
}
selectedItemId=""
setSearchOptions={[Function]}
showClose={false}
showErrorEmoji={true}
showExcludePatterns={false}
showSearchModifiers={false}
size=""
summaryMsg="Go to line"
>
<div
className="search-outline"
>
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="result-list"
className="search-field"
role="combobox"
>
<AccessibleImage
className="search"
>
<span
className="img search"
/>
</AccessibleImage>
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="result-list"
className="empty"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
spellCheck={false}
value=":abc"
/>
<div
className="search-field-summary"
>
Go to line
</div>
<div
className="search-buttons-bar"
/>
</div>
</div>
</SearchInput>
</Connect(SearchInput)>
</div>
</div>
</Modal>
</QuickOpenModal>
`;
exports[`QuickOpenModal showErrorEmoji false when count + query 1`] = `
<Provider
store={
Object {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
}
}
>
<QuickOpenModal
blackBoxRanges={Object {}}
clearHighlightLineRange={[MockFunction]}
closeQuickOpen={[MockFunction]}
displayedSources={Array []}
enabled={true}
getFunctionSymbols={[MockFunction]}
highlightLineRange={[MockFunction]}
isOriginal={false}
openedTabUrls={Array []}
query="dasdasdas"
searchType="sources"
selectSpecificLocation={[MockFunction]}
selectedLocation={
Object {
"source": Object {
"id": "foo",
},
}
}
setQuickOpenQuery={[MockFunction]}
shortcutsModalEnabled={false}
thread="FakeThread"
toggleShortcutsModal={[MockFunction]}
updateCursorPosition={[MockFunction]}
>
<Modal
handleClose={[Function]}
>
<div
className="modal-wrapper"
onClick={[Function]}
>
<div
className="modal"
onClick={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query="dasdasdas"
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={true}
showExcludePatterns={false}
showSearchModifiers={false}
size="big"
summaryMsg=""
>
<SearchInput
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query="dasdasdas"
searchKey="quickopen-search"
searchOptions={
Object {
"caseSensitive": false,
"excludePatterns": "",
"regexMatch": false,
"wholeWord": false,
}
}
selectedItemId=""
setSearchOptions={[Function]}
showClose={false}
showErrorEmoji={true}
showExcludePatterns={false}
showSearchModifiers={false}
size="big"
summaryMsg=""
>
<div
className="search-outline"
>
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="result-list"
className="search-field big"
role="combobox"
>
<AccessibleImage
className="search"
>
<span
className="img search"
/>
</AccessibleImage>
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="result-list"
className="empty"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
spellCheck={false}
value="dasdasdas"
/>
<div
className="search-buttons-bar"
/>
</div>
</div>
</SearchInput>
</Connect(SearchInput)>
<ResultList
expanded={false}
items={Array []}
key="results"
role="listbox"
selectItem={[Function]}
selected={0}
size="big"
>
<ul
aria-live="polite"
className="result-list big"
id="result-list"
role="listbox"
/>
</ResultList>
</div>
</div>
</Modal>
</QuickOpenModal>
</Provider>
`;
exports[`QuickOpenModal showErrorEmoji false when goto numeric ':2222' 1`] = `
<Provider
store={
Object {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
}
}
>
<QuickOpenModal
blackBoxRanges={Object {}}
clearHighlightLineRange={[MockFunction]}
closeQuickOpen={[MockFunction]}
displayedSources={Array []}
enabled={true}
getFunctionSymbols={[MockFunction]}
highlightLineRange={[MockFunction]}
isOriginal={false}
openedTabUrls={Array []}
query=":2222"
searchType="goto"
selectSpecificLocation={[MockFunction]}
selectedLocation={
Object {
"source": Object {
"id": "foo",
},
}
}
setQuickOpenQuery={[MockFunction]}
shortcutsModalEnabled={false}
thread="FakeThread"
toggleShortcutsModal={[MockFunction]}
updateCursorPosition={[MockFunction]}
>
<Modal
handleClose={[Function]}
>
<div
className="modal-wrapper"
onClick={[Function]}
>
<div
className="modal"
onClick={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=":2222"
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={false}
showExcludePatterns={false}
showSearchModifiers={false}
summaryMsg="Go to line"
>
<SearchInput
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=":2222"
searchKey="quickopen-search"
searchOptions={
Object {
"caseSensitive": false,
"excludePatterns": "",
"regexMatch": false,
"wholeWord": false,
}
}
selectedItemId=""
setSearchOptions={[Function]}
showClose={false}
showErrorEmoji={false}
showExcludePatterns={false}
showSearchModifiers={false}
size=""
summaryMsg="Go to line"
>
<div
className="search-outline"
>
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="result-list"
className="search-field"
role="combobox"
>
<AccessibleImage
className="search"
>
<span
className="img search"
/>
</AccessibleImage>
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="result-list"
className=""
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
spellCheck={false}
value=":2222"
/>
<div
className="search-field-summary"
>
Go to line
</div>
<div
className="search-buttons-bar"
/>
</div>
</div>
</SearchInput>
</Connect(SearchInput)>
</div>
</div>
</Modal>
</QuickOpenModal>
</Provider>
`;
exports[`QuickOpenModal showErrorEmoji false when no query 1`] = `
<Provider
store={
Object {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
}
}
>
<QuickOpenModal
blackBoxRanges={Object {}}
clearHighlightLineRange={[MockFunction]}
closeQuickOpen={[MockFunction]}
displayedSources={Array []}
enabled={true}
getFunctionSymbols={[MockFunction]}
highlightLineRange={[MockFunction]}
isOriginal={false}
openedTabUrls={Array []}
query=""
searchType="other"
selectSpecificLocation={[MockFunction]}
selectedLocation={
Object {
"source": Object {
"id": "foo",
},
}
}
setQuickOpenQuery={[MockFunction]}
shortcutsModalEnabled={false}
thread="FakeThread"
toggleShortcutsModal={[MockFunction]}
updateCursorPosition={[MockFunction]}
>
<Modal
handleClose={[Function]}
>
<div
className="modal-wrapper"
onClick={[Function]}
>
<div
className="modal"
onClick={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=""
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={false}
showExcludePatterns={false}
showSearchModifiers={false}
summaryMsg=""
>
<SearchInput
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=""
searchKey="quickopen-search"
searchOptions={
Object {
"caseSensitive": false,
"excludePatterns": "",
"regexMatch": false,
"wholeWord": false,
}
}
selectedItemId=""
setSearchOptions={[Function]}
showClose={false}
showErrorEmoji={false}
showExcludePatterns={false}
showSearchModifiers={false}
size=""
summaryMsg=""
>
<div
className="search-outline"
>
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="result-list"
className="search-field"
role="combobox"
>
<AccessibleImage
className="search"
>
<span
className="img search"
/>
</AccessibleImage>
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="result-list"
className=""
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
spellCheck={false}
value=""
/>
<div
className="search-buttons-bar"
/>
</div>
</div>
</SearchInput>
</Connect(SearchInput)>
<ResultList
expanded={false}
items={Array []}
key="results"
role="listbox"
selectItem={[Function]}
selected={0}
size="small"
>
<ul
aria-live="polite"
className="result-list small"
id="result-list"
role="listbox"
/>
</ResultList>
</div>
</div>
</Modal>
</QuickOpenModal>
</Provider>
`;
exports[`QuickOpenModal showErrorEmoji true when goto not numeric ':22k22' 1`] = `
<Provider
store={
Object {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
}
}
>
<QuickOpenModal
blackBoxRanges={Object {}}
clearHighlightLineRange={[MockFunction]}
closeQuickOpen={[MockFunction]}
displayedSources={Array []}
enabled={true}
getFunctionSymbols={[MockFunction]}
highlightLineRange={[MockFunction]}
isOriginal={false}
openedTabUrls={Array []}
query=":22k22"
searchType="goto"
selectSpecificLocation={[MockFunction]}
selectedLocation={
Object {
"source": Object {
"id": "foo",
},
}
}
setQuickOpenQuery={[MockFunction]}
shortcutsModalEnabled={false}
thread="FakeThread"
toggleShortcutsModal={[MockFunction]}
updateCursorPosition={[MockFunction]}
>
<Modal
handleClose={[Function]}
>
<div
className="modal-wrapper"
onClick={[Function]}
>
<div
className="modal"
onClick={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=":22k22"
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={true}
showExcludePatterns={false}
showSearchModifiers={false}
summaryMsg="Go to line"
>
<SearchInput
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=":22k22"
searchKey="quickopen-search"
searchOptions={
Object {
"caseSensitive": false,
"excludePatterns": "",
"regexMatch": false,
"wholeWord": false,
}
}
selectedItemId=""
setSearchOptions={[Function]}
showClose={false}
showErrorEmoji={true}
showExcludePatterns={false}
showSearchModifiers={false}
size=""
summaryMsg="Go to line"
>
<div
className="search-outline"
>
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="result-list"
className="search-field"
role="combobox"
>
<AccessibleImage
className="search"
>
<span
className="img search"
/>
</AccessibleImage>
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="result-list"
className="empty"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
spellCheck={false}
value=":22k22"
/>
<div
className="search-field-summary"
>
Go to line
</div>
<div
className="search-buttons-bar"
/>
</div>
</div>
</SearchInput>
</Connect(SearchInput)>
</div>
</div>
</Modal>
</QuickOpenModal>
</Provider>
`;
exports[`QuickOpenModal showErrorEmoji true when no count + query 1`] = `
<Provider
store={
Object {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
}
}
>
<QuickOpenModal
blackBoxRanges={Object {}}
clearHighlightLineRange={[MockFunction]}
closeQuickOpen={[MockFunction]}
displayedSources={Array []}
enabled={true}
getFunctionSymbols={[MockFunction]}
highlightLineRange={[MockFunction]}
isOriginal={false}
openedTabUrls={Array []}
query="test"
searchType="other"
selectSpecificLocation={[MockFunction]}
selectedLocation={
Object {
"source": Object {
"id": "foo",
},
}
}
setQuickOpenQuery={[MockFunction]}
shortcutsModalEnabled={false}
thread="FakeThread"
toggleShortcutsModal={[MockFunction]}
updateCursorPosition={[MockFunction]}
>
<Modal
handleClose={[Function]}
>
<div
className="modal-wrapper"
onClick={[Function]}
>
<div
className="modal"
onClick={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query="test"
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={true}
showExcludePatterns={false}
showSearchModifiers={false}
summaryMsg=""
>
<SearchInput
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query="test"
searchKey="quickopen-search"
searchOptions={
Object {
"caseSensitive": false,
"excludePatterns": "",
"regexMatch": false,
"wholeWord": false,
}
}
selectedItemId=""
setSearchOptions={[Function]}
showClose={false}
showErrorEmoji={true}
showExcludePatterns={false}
showSearchModifiers={false}
size=""
summaryMsg=""
>
<div
className="search-outline"
>
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="result-list"
className="search-field"
role="combobox"
>
<AccessibleImage
className="search"
>
<span
className="img search"
/>
</AccessibleImage>
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="result-list"
className="empty"
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
spellCheck={false}
value="test"
/>
<div
className="search-buttons-bar"
/>
</div>
</div>
</SearchInput>
</Connect(SearchInput)>
<ResultList
expanded={false}
items={Array []}
key="results"
role="listbox"
selectItem={[Function]}
selected={0}
size="small"
>
<ul
aria-live="polite"
className="result-list small"
id="result-list"
role="listbox"
/>
</ResultList>
</div>
</div>
</Modal>
</QuickOpenModal>
</Provider>
`;
exports[`QuickOpenModal shows loading loads with function type search 1`] = `
<Modal
handleClose={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=""
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={false}
showExcludePatterns={false}
showSearchModifiers={false}
summaryMsg=""
/>
<ResultList
expanded={false}
items={Array []}
key="results"
role="listbox"
selectItem={[Function]}
selected={0}
size="small"
/>
</Modal>
`;
exports[`QuickOpenModal updateResults on enable 1`] = `
<Provider
store={
Object {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
}
}
>
<QuickOpenModal
blackBoxRanges={Object {}}
clearHighlightLineRange={[MockFunction]}
closeQuickOpen={[MockFunction]}
displayedSources={Array []}
enabled={false}
getFunctionSymbols={[MockFunction]}
highlightLineRange={[MockFunction]}
isOriginal={false}
openedTabUrls={Array []}
query=""
searchType="sources"
selectSpecificLocation={[MockFunction]}
selectedLocation={
Object {
"source": Object {
"id": "foo",
},
}
}
setQuickOpenQuery={[MockFunction]}
shortcutsModalEnabled={false}
thread="FakeThread"
toggleShortcutsModal={[MockFunction]}
updateCursorPosition={[MockFunction]}
>
<Modal
handleClose={[Function]}
>
<div
className="modal-wrapper"
onClick={[Function]}
>
<div
className="modal"
onClick={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=""
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={false}
showExcludePatterns={false}
showSearchModifiers={false}
size="big"
summaryMsg=""
>
<SearchInput
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=""
searchKey="quickopen-search"
searchOptions={
Object {
"caseSensitive": false,
"excludePatterns": "",
"regexMatch": false,
"wholeWord": false,
}
}
selectedItemId=""
setSearchOptions={[Function]}
showClose={false}
showErrorEmoji={false}
showExcludePatterns={false}
showSearchModifiers={false}
size="big"
summaryMsg=""
>
<div
className="search-outline"
>
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="result-list"
className="search-field big"
role="combobox"
>
<AccessibleImage
className="search"
>
<span
className="img search"
/>
</AccessibleImage>
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="result-list"
className=""
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
spellCheck={false}
value=""
/>
<div
className="search-buttons-bar"
/>
</div>
</div>
</SearchInput>
</Connect(SearchInput)>
<ResultList
expanded={false}
items={Array []}
key="results"
role="listbox"
selectItem={[Function]}
selected={0}
size="big"
>
<ul
aria-live="polite"
className="result-list big"
id="result-list"
role="listbox"
/>
</ResultList>
</div>
</div>
</Modal>
</QuickOpenModal>
</Provider>
`;
exports[`QuickOpenModal updateResults on enable 2`] = `
<Provider
enabled={true}
store={
Object {
"clearActions": [Function],
"dispatch": [Function],
"getActions": [Function],
"getState": [Function],
"replaceReducer": [Function],
"subscribe": [Function],
}
}
>
<QuickOpenModal
blackBoxRanges={Object {}}
clearHighlightLineRange={[MockFunction]}
closeQuickOpen={[MockFunction]}
displayedSources={Array []}
enabled={false}
getFunctionSymbols={[MockFunction]}
highlightLineRange={[MockFunction]}
isOriginal={false}
openedTabUrls={Array []}
query=""
searchType="sources"
selectSpecificLocation={[MockFunction]}
selectedLocation={
Object {
"source": Object {
"id": "foo",
},
}
}
setQuickOpenQuery={[MockFunction]}
shortcutsModalEnabled={false}
thread="FakeThread"
toggleShortcutsModal={[MockFunction]}
updateCursorPosition={[MockFunction]}
>
<Modal
handleClose={[Function]}
>
<div
className="modal-wrapper"
onClick={[Function]}
>
<div
className="modal"
onClick={[Function]}
>
<Connect(SearchInput)
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=""
searchKey="quickopen-search"
selectedItemId=""
showClose={false}
showErrorEmoji={false}
showExcludePatterns={false}
showSearchModifiers={false}
size="big"
summaryMsg=""
>
<SearchInput
count={0}
expanded={false}
handleClose={[Function]}
hasPrefix={true}
isLoading={false}
onChange={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
query=""
searchKey="quickopen-search"
searchOptions={
Object {
"caseSensitive": false,
"excludePatterns": "",
"regexMatch": false,
"wholeWord": false,
}
}
selectedItemId=""
setSearchOptions={[Function]}
showClose={false}
showErrorEmoji={false}
showExcludePatterns={false}
showSearchModifiers={false}
size="big"
summaryMsg=""
>
<div
className="search-outline"
>
<div
aria-expanded={false}
aria-haspopup="listbox"
aria-owns="result-list"
className="search-field big"
role="combobox"
>
<AccessibleImage
className="search"
>
<span
className="img search"
/>
</AccessibleImage>
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="result-list"
className=""
onBlur={[Function]}
onChange={[Function]}
onFocus={[Function]}
onKeyDown={[Function]}
placeholder="Go to file…"
spellCheck={false}
value=""
/>
<div
className="search-buttons-bar"
/>
</div>
</div>
</SearchInput>
</Connect(SearchInput)>
<ResultList
expanded={false}
items={Array []}
key="results"
role="listbox"
selectItem={[Function]}
selected={0}
size="big"
>
<ul
aria-live="polite"
className="result-list big"
id="result-list"
role="listbox"
/>
</ResultList>
</div>
</div>
</Modal>
</QuickOpenModal>
</Provider>
`;