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

Tooltip for disabled kebab is missing in Manage permissions page #3346

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -396,8 +396,26 @@ describe('MR Permissions', () => {
it('Disabled actions on default group', () => {
initIntercepts({ isEmpty: false });
modelRegistryPermissions.visit('example-mr');
groupTable.getTableRow('example-mr-users').findKebab().should('be.disabled');
groupTable.getTableRow('example-mr-users-2').findKebab().should('not.be.disabled');

cy.contains('td', 'example-mr-users')
.closest('tr')
.within(() => {
cy.get('button[aria-disabled="true"]')
.should('exist')
.and(
'have.attr',
'aria-label',
'The default group always has access to model registry.',
)
.find('svg')
.should('exist');
});

cy.contains('td', 'example-mr-users-2')
.closest('tr')
.within(() => {
cy.get('button:not([aria-disabled="true"])').should('exist').and('be.visible');
});
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ import {
TimestampTooltipVariant,
Tooltip,
} from '@patternfly/react-core';
import { CheckIcon, OutlinedQuestionCircleIcon, TimesIcon } from '@patternfly/react-icons';
import {
CheckIcon,
OutlinedQuestionCircleIcon,
TimesIcon,
EllipsisVIcon,
} from '@patternfly/react-icons';
import { ProjectKind, RoleBindingKind, RoleBindingSubject } from '~/k8sTypes';
import { relativeTime } from '~/utilities/time';
import { ProjectsContext } from '~/concepts/projects/ProjectsContext';
Expand Down Expand Up @@ -173,9 +178,18 @@ const RoleBindingPermissionsTableRow: React.FC<RoleBindingPermissionsTableRowPro
/>
</SplitItem>
</Split>
) : isDefaultGroup ? (
<Tooltip content="The default group always has access to model registry">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

full stop missing at the end according to design

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Added.

<Button
variant="plain"
isAriaDisabled
aria-label="The default group always has access to model registry."
>
<EllipsisVIcon />
</Button>
</Tooltip>
) : (
<ActionsColumn
isDisabled={isDefaultGroup}
items={[
{
title: 'Edit',
Expand Down