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:
parent
25c41fbe2b
commit
318d67c3c4
4 changed files with 6 additions and 5 deletions
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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('')}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue