Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MGMT-19607: revert OCM versions Button relocation #2803

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ describe('Assisted Installer UI behaviour - cluster creation', () => {
.find('[role="menuitem"]')
.each((versionItem, index) => {
//TODO: test adaptations for new feature about custom OCP releases
if (index > 0) {
expect(versionItem.parent()).to.have.id(expectedVersionIds[index -1]);
} else {
expect(versionItem.parent()).to.have.id('all-versions');
if (index < 7) {
expect(versionItem.parent()).to.have.id(expectedVersionIds[index]);
}
});
});
Expand Down
24 changes: 12 additions & 12 deletions libs/ui-lib/lib/common/components/ui/OpenShiftVersionDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,6 @@ export const OpenShiftVersionDropdown = ({
});

const dropdownGroup = [
<DropdownGroup key="all-available-versions">
<DropdownItem key="all-versions" id="all-versions">
<Button
id="show-all-versions"
variant="link"
onClick={() => showOpenshiftVersionModal()}
isInline
>
Show all available versions
</Button>
</DropdownItem>
</DropdownGroup>,
<DropdownGroup label="Latest releases" key="latest-releases">
{dropdownItems}
</DropdownGroup>,
Expand All @@ -129,6 +117,18 @@ export const OpenShiftVersionDropdown = ({
>
{customDropdownItems}
</DropdownGroup>,
<DropdownGroup key="all-available-versions">
<DropdownItem key="all-versions" id="all-versions">
<Button
variant="link"
isInline
onClick={() => showOpenshiftVersionModal()}
id="show-all-versions"
>
Show all available versions
</Button>
</DropdownItem>
</DropdownGroup>,
];

const onSelect = React.useCallback(
Expand Down
Loading