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

[UXD][AAP-25468] AWX - updates to Teams section buttons and actions #2747

Merged
merged 3 commits into from
Aug 26, 2024
Merged
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
4 changes: 2 additions & 2 deletions cypress/e2e/awx/access/teams/teams.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ cyLabel(['upstream'], () => {
id: team.summary_fields.object_roles.member_role.id,
});
cy.filterTableBySingleSelect('name', team.name);
cy.clickTableRowAction('name', team.name, 'remove-users', {
cy.clickTableRowAction('name', team.name, 'remove-users-from-teams', {
inKebab: true,
disableFilter: true,
});
Expand Down Expand Up @@ -283,7 +283,7 @@ cyLabel(['upstream'], () => {
cy.filterTableByMultiSelect('name', arrayOfElementText);
cy.get('tbody tr').should('have.length', 5);
cy.getByDataCy('select-all').click();
cy.clickToolbarKebabAction('delete-selected-teams');
cy.clickToolbarKebabAction('delete-teams');
cy.get('#confirm').click();
cy.intercept('DELETE', awxAPI`/teams/*/`).as('deleted');
cy.clickButton(/^Delete team/);
Expand Down
2 changes: 1 addition & 1 deletion frontend/awx/access/teams/TeamPage/TeamAccess.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('TeamAccess', () => {
// Remove users
cy.selectTableRow('admin', false); // User cannot be removed as they are a system administrator
cy.selectTableRow('user-2', false);
cy.clickToolbarKebabAction('remove-users');
cy.clickToolbarKebabAction('remove-users-from-teams');
// Confirmation modal is displayed with a warning
cy.get('.pf-v5-c-modal-box').within(() => {
cy.hasAlert(
Expand Down
2 changes: 1 addition & 1 deletion frontend/awx/access/teams/Teams.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('Teams.cy.ts', () => {
cy.intercept({ method: 'GET', url: '/api/v2/teams/*' }, { fixture: 'teams.json' });
cy.mount(<Teams />);
cy.get('[type="checkbox"][id="select-all"]').check();
cy.clickToolbarKebabAction('delete-selected-teams');
cy.clickToolbarKebabAction('delete-teams');
cy.contains(
'1 of the selected teams cannot be deleted due to insufficient permissions.'
).should('be.visible');
Expand Down
4 changes: 2 additions & 2 deletions frontend/awx/access/teams/hooks/useTeamActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ export function useTeamActions(options: {
type: PageActionType.Button,
selection: PageActionSelection.Single,
icon: PlusCircleIcon,
label: t('Add users'),
label: t('Add users to teams'),
isDisabled: (team: Team) => cannotAddUsers(team),
onClick: (team) => selectUsersAddTeams([team]),
},
{
type: PageActionType.Button,
selection: PageActionSelection.Single,
icon: MinusCircleIcon,
label: t('Remove users'),
label: t('Remove users from teams'),
isDisabled: (team: Team) => cannotRemoveUsers(team),
onClick: (team) => selectAndRemoveUsersFromTeam(team),
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/awx/access/teams/hooks/useTeamToolbarActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function useTeamToolbarActions(view: IAwxView<Team>) {
type: PageActionType.Button,
selection: PageActionSelection.Multiple,
icon: PlusCircleIcon,
label: t('Add users to selected teams'),
label: t('Add users to teams'),
onClick: () => selectUsersAddTeams(view.selectedItems),
},
{
Expand All @@ -62,7 +62,7 @@ export function useTeamToolbarActions(view: IAwxView<Team>) {
type: PageActionType.Button,
selection: PageActionSelection.Multiple,
icon: TrashIcon,
label: t('Delete selected teams'),
label: t('Delete teams'),
onClick: deleteTeams,
isDanger: true,
},
Expand Down
Loading