V2Wizard: Set pkg recommendations expandable to open by default
This makes the pkg recommendations expandable open by default and updates the tests accordingly.
This commit is contained in:
parent
3018d64df6
commit
12fc6b9841
3 changed files with 2 additions and 12 deletions
|
|
@ -27,7 +27,7 @@ const PackageRecommendations = () => {
|
|||
const undebouncedPackages = useAppSelector(selectPackages);
|
||||
const packages = useDebounce(undebouncedPackages);
|
||||
|
||||
const [isExpanded, setIsExpanded] = useState(false);
|
||||
const [isExpanded, setIsExpanded] = useState(true);
|
||||
|
||||
const [fetchRecommendedPackages, { data, isSuccess, isLoading, isError }] =
|
||||
useRecommendPackageMutation();
|
||||
|
|
|
|||
|
|
@ -109,11 +109,10 @@ const toggleSelected = async () => {
|
|||
};
|
||||
|
||||
const checkRecommendationsEmptyState = async () => {
|
||||
const recommendationButton = await screen.findByRole('button', {
|
||||
await screen.findByRole('button', {
|
||||
name: 'Recommended Red Hat packages',
|
||||
});
|
||||
|
||||
await userEvent.click(recommendationButton);
|
||||
await screen.findByText('Select packages to generate recommendations.');
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -78,12 +78,6 @@ const deselectFirstPackage = async () => {
|
|||
);
|
||||
};
|
||||
|
||||
const openRecommendationsExpandable = async () => {
|
||||
await userEvent.click(
|
||||
await screen.findByRole('button', { name: /recommended red hat packages/i })
|
||||
);
|
||||
};
|
||||
|
||||
const addSingleRecommendation = async () => {
|
||||
const addPackageButtons = await screen.findAllByText(/add package/i);
|
||||
await userEvent.click(addPackageButtons[0]);
|
||||
|
|
@ -163,7 +157,6 @@ describe('package recommendations', () => {
|
|||
await goToPackagesStep();
|
||||
await searchForPackage();
|
||||
await selectFirstPackage();
|
||||
await openRecommendationsExpandable();
|
||||
await addSingleRecommendation();
|
||||
await goToReviewStep();
|
||||
const receivedRequest = await interceptBlueprintRequest(CREATE_BLUEPRINT);
|
||||
|
|
@ -183,7 +176,6 @@ describe('package recommendations', () => {
|
|||
await goToPackagesStep();
|
||||
await searchForPackage();
|
||||
await selectFirstPackage();
|
||||
await openRecommendationsExpandable();
|
||||
await addAllRecommendations();
|
||||
await goToReviewStep();
|
||||
const receivedRequest = await interceptBlueprintRequest(CREATE_BLUEPRINT);
|
||||
|
|
@ -203,7 +195,6 @@ describe('package recommendations', () => {
|
|||
await goToPackagesStep();
|
||||
await searchForPackage();
|
||||
await selectFirstPackage();
|
||||
await openRecommendationsExpandable();
|
||||
await addSingleRecommendation();
|
||||
await switchToSelected();
|
||||
await deselectRecommendation();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue