Prevent chromatic build error on SearchBar
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
@@ -37,10 +37,10 @@ describe('SearchBar', () => {
|
||||
};
|
||||
|
||||
const query = jest.fn().mockResolvedValue({});
|
||||
const getString = jest.fn().mockReturnValue('Mock title');
|
||||
const getOptionalString = jest.fn().mockReturnValue('Mock title');
|
||||
|
||||
const apiRegistry = ApiRegistry.from([
|
||||
[configApiRef, { getString }],
|
||||
[configApiRef, { getOptionalString }],
|
||||
[searchApiRef, { query }],
|
||||
]);
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@ export const SearchBarBase = ({
|
||||
}, [onChange]);
|
||||
|
||||
const placeholder =
|
||||
overridePlaceholder ?? `Search in ${configApi.getString('app.title')}`;
|
||||
overridePlaceholder ??
|
||||
`Search in ${configApi.getOptionalString('app.title') || 'Backstage'}`;
|
||||
|
||||
return (
|
||||
<InputBase
|
||||
|
||||
Reference in New Issue
Block a user