Skip to content

Commit

Permalink
Wizard: Switch view to "Available" when searching for package
Browse files Browse the repository at this point in the history
this fix an issue when user search for a package, the viewv stay "Selected"
instead of switching to "Available

fix one test
  • Loading branch information
dependabot[bot] authored and mgold1234 committed Feb 12, 2025
1 parent 1289d37 commit 0e1d790
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,7 @@ const Packages = () => {
) => {
setSearchTerm(selection);
setToggleSourceRepos(RepoToggle.INCLUDED);
setToggleSelected('toggle-available');
};

const handleClear = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,10 @@ describe('Step Packages', () => {
await clearSearchInput();
await typeIntoSearchBox('test');

const availablePackages = await getRows();
expect(availablePackages[0]).toHaveTextContent('test');
expect(availablePackages[1]).toHaveTextContent('test-sources');
await toggleSelected();
const selectedPackages = await getRows();
expect(selectedPackages[0]).toHaveTextContent('test');
expect(selectedPackages[1]).toHaveTextContent('test-sources');
});

test('should display recommendations', async () => {
Expand Down

0 comments on commit 0e1d790

Please sign in to comment.