Wizard: Update search input placeholders

The placeholders we tend to use are usually quite specific. "Type to search" felt quite vague for some reason. Also repositories had no placeholder, I believe "filter" is clearer than "search" here as we're not fetching any results, just filtering through the already existing list of repositories.
This commit is contained in:
regexowl 2025-04-25 10:37:09 +02:00 committed by Simon Steinbeiß
parent 25c41fbe2b
commit 318d67c3c4
4 changed files with 6 additions and 5 deletions

View file

@ -1243,7 +1243,7 @@ const Packages = () => {
<ToolbarItem variant="search-filter">
<SearchInput
type="text"
placeholder="Type to search"
placeholder="Search packages"
aria-label="Search packages"
data-testid="packages-search-input"
value={searchTerm}

View file

@ -524,7 +524,8 @@ const Repositories = () => {
</ToolbarItem>
<ToolbarItem variant="search-filter">
<SearchInput
aria-label="Search repositories"
placeholder="Filter repositories"
aria-label="Filter repositories"
onChange={handleFilterRepositories}
value={filterValue}
onClear={() => setFilterValue('')}

View file

@ -116,7 +116,7 @@ const toggleAll = async () => {
const searchForRepository = async (searchTerm: string) => {
const user = userEvent.setup();
const searchInput = await screen.findByRole('textbox', {
name: /search repositories/i,
name: /filter repositories/i,
});
await waitFor(() => user.type(searchInput, searchTerm));
};
@ -270,7 +270,7 @@ describe('Repositories request generated correctly', () => {
const selectNginxRepository = async () => {
const user = userEvent.setup();
const search = await screen.findByLabelText('Search repositories');
const search = await screen.findByLabelText('Filter repositories');
await waitFor(() => user.type(search, 'nginx stable repo'));
await waitFor(
() => expect(screen.getByText('nginx stable repo')).toBeInTheDocument

View file

@ -65,7 +65,7 @@ const clickRevisitButton = async () => {
const searchForRepository = async (repo: string) => {
const user = userEvent.setup();
const search = await screen.findByLabelText('Search repositories');
const search = await screen.findByLabelText('Filter repositories');
await waitFor(() => user.type(search, repo));
await waitFor(() => expect(screen.getByText(repo)).toBeInTheDocument);
};