Skip to content

Commit 104dfe2

Browse files
fix(SearchCurrentNodes) - BED-5692 - Change copy to clarify intent of Search Current Results (#1831)
* change copy * restore files from main * restore package.json * remove out of sync packages * restore package files * fix tests * update test
1 parent 82fde71 commit 104dfe2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

packages/javascript/bh-shared-ui/src/components/GraphControls/GraphControls.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,15 @@ describe('GraphControls', () => {
202202
describe('Searching current results', () => {
203203
it('renders GraphButton with correct text', async () => {
204204
setup();
205-
const searchResultsMenu = await screen.findByText('Search Current Results');
205+
const searchResultsMenu = await screen.findByText('Search');
206206

207207
expect(searchResultsMenu).toBeInTheDocument();
208208
});
209209

210210
it('disables GraphButton when isCurrentSearchOpen is true', async () => {
211211
const { user } = setup();
212212

213-
const searchResultsMenu = screen.getByText('Search Current Results');
213+
const searchResultsMenu = screen.getByText('Search');
214214
await user.click(searchResultsMenu);
215215

216216
expect(searchResultsMenu).toBeDisabled();
@@ -221,7 +221,7 @@ describe('GraphControls', () => {
221221

222222
expect(screen.queryByTestId('explore_graph-controls_search-current-nodes-popper')).not.toBeInTheDocument();
223223

224-
const searchResultsMenu = screen.getByText('Search Current Results');
224+
const searchResultsMenu = screen.getByText('Search');
225225
await user.click(searchResultsMenu);
226226

227227
expect(screen.getByTestId('explore_graph-controls_search-current-nodes-popper')).toBeInTheDocument();
@@ -230,11 +230,11 @@ describe('GraphControls', () => {
230230
it('sets the selectedItem param and closes popper when a node is selected', async () => {
231231
const { user } = setup();
232232

233-
const searchResultsMenu = screen.getByText('Search Current Results');
233+
const searchResultsMenu = screen.getByText('Search');
234234

235235
await user.click(searchResultsMenu);
236236

237-
const searchInput = await screen.findByPlaceholderText('Search Current Results');
237+
const searchInput = await screen.findByPlaceholderText('Search node in results');
238238

239239
await user.type(searchInput, currentNodes[1].label);
240240

packages/javascript/bh-shared-ui/src/components/GraphControls/GraphControls.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ function GraphControls<T extends readonly string[]>(props: GraphControlsProps<T>
154154
</GraphMenu>
155155

156156
<GraphButton
157-
aria-label='Search Current Results'
157+
aria-label='Search node in results'
158158
onClick={() => setIsCurrentSearchOpen(true)}
159-
displayText={'Search Current Results'}
159+
displayText={'Search'}
160160
disabled={isCurrentSearchOpen}
161161
data-testid='explore_graph-controls_search-current-results'
162162
/>

packages/javascript/bh-shared-ui/src/components/SearchCurrentNodes/SearchCurrentNodes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { useOnClickOutside } from '../../hooks';
2323
import SearchResultItem from '../SearchResultItem';
2424
import { FlatNode, GraphNodes } from './types';
2525

26-
export const PLACEHOLDER_TEXT = 'Search Current Results';
26+
export const PLACEHOLDER_TEXT = 'Search node in results';
2727
export const NO_RESULTS_TEXT = 'No result found in current results';
2828

2929
const LIST_ITEM_HEIGHT = 38;

0 commit comments

Comments
 (0)