Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ exports[`Results Table Should match snapshot 1`] = `
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -618,6 +619,7 @@ exports[`Results Table Should match snapshot 1`] = `
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -3089,6 +3091,7 @@ exports[`Results Table for MannWhitneyResultsItem for mann-whitney-u testVersion
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -3374,6 +3377,7 @@ exports[`Results Table for MannWhitneyResultsItem for mann-whitney-u testVersion
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ exports[`Compare Over Time renders correctly in Search View: Initial state for t
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -1167,6 +1168,7 @@ exports[`Compare Over Time should have an edit mode in Results View: After click
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -1957,6 +1959,7 @@ exports[`Compare Over Time should remove the checked revision once X button is c
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -2855,6 +2858,7 @@ exports[`Compare Over Time should update base repo, revisions and time-range aft
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down
15 changes: 15 additions & 0 deletions src/__tests__/Search/__snapshots__/CompareWithBase.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ exports[`Compare With Base renders correctly when there are no results: Initial
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -446,6 +447,7 @@ exports[`Compare With Base renders correctly when there are no results: Initial
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -941,6 +943,7 @@ exports[`Compare With Base should have an edit mode in Results View: After click
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -1246,6 +1249,7 @@ exports[`Compare With Base should have an edit mode in Results View: After click
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -1455,6 +1459,7 @@ exports[`Compare With Base should have an edit mode in Results View: After click
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -1760,6 +1765,7 @@ exports[`Compare With Base should have an edit mode in Results View: After click
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -2133,6 +2139,7 @@ exports[`Compare With Base should have an edit mode in Results View: Initial sta
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -2438,6 +2445,7 @@ exports[`Compare With Base should have an edit mode in Results View: Initial sta
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -2815,6 +2823,7 @@ exports[`Compare With Base should have an edit mode in Results View: after remov
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -2960,6 +2969,7 @@ exports[`Compare With Base should have an edit mode in Results View: after remov
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -3369,6 +3379,7 @@ exports[`Compare With Base should have an edit mode in Results View: after remov
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -3674,6 +3685,7 @@ exports[`Compare With Base should have an edit mode in Results View: after remov
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -4077,6 +4089,7 @@ exports[`Compare With Base should remove the checked revision once X button is c
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -4222,6 +4235,7 @@ exports[`Compare With Base should remove the checked revision once X button is c
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -4646,6 +4660,7 @@ exports[`Compare With Base should remove the checked revision once X button is c
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ exports[`Search Containter should match snapshot 1`] = `
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -307,6 +308,7 @@ exports[`Search Containter should match snapshot 1`] = `
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -731,6 +733,7 @@ exports[`Search Containter should match snapshot 1`] = `
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,7 @@ exports[`SearchResultsList should match snapshot 1`] = `
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -2065,6 +2066,7 @@ exports[`SearchResultsList should match snapshot 1`] = `
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -2489,6 +2491,7 @@ exports[`SearchResultsList should match snapshot 1`] = `
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down
15 changes: 15 additions & 0 deletions src/__tests__/Search/__snapshots__/SearchView.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ exports[`Search View renders correctly when there are no results 1`] = `
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -474,6 +475,7 @@ exports[`Search View renders correctly when there are no results 1`] = `
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -898,6 +900,7 @@ exports[`Search View renders correctly when there are no results 1`] = `
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -1295,6 +1298,7 @@ exports[`With search parameters both search components are populated as expected
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -1670,6 +1674,7 @@ exports[`With search parameters both search components are populated as expected
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -1815,6 +1820,7 @@ exports[`With search parameters both search components are populated as expected
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -2346,6 +2352,7 @@ exports[`With search parameters both search components are populated as expected
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -2721,6 +2728,7 @@ exports[`With search parameters both search components are populated as expected
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -2866,6 +2874,7 @@ exports[`With search parameters both search components are populated as expected
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -3397,6 +3406,7 @@ exports[`With search parameters displays the default value for framework if the
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -3772,6 +3782,7 @@ exports[`With search parameters displays the default value for framework if the
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -3917,6 +3928,7 @@ exports[`With search parameters displays the default value for framework if the
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -4448,6 +4460,7 @@ exports[`With search parameters displays the default values if some values are b
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -4683,6 +4696,7 @@ exports[`With search parameters displays the default values if some values are b
id="search-base-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down Expand Up @@ -4828,6 +4842,7 @@ exports[`With search parameters displays the default values if some values are b
id="search-new-input"
placeholder="Search by revision ID or author email"
type="text"
value=""
/>
<fieldset
aria-hidden="true"
Expand Down
3 changes: 3 additions & 0 deletions src/components/Search/SearchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { InputStylesRaw } from '../../styles';
import { InputType } from '../../types/state';

interface SearchInputProps {
value?: string;
onFocus: () => unknown;
inputPlaceholder: string;
compact: boolean;
Expand All @@ -18,6 +19,7 @@ interface SearchInputProps {
}

function SearchInput({
value,
onFocus,
compact,
inputPlaceholder,
Expand Down Expand Up @@ -48,6 +50,7 @@ function SearchInput({
return (
<FormControl className={styles.container} fullWidth>
<TextField
value={value}
error={Boolean(searchError)}
helperText={searchError}
placeholder={inputPlaceholder}
Expand Down
Loading