Skip to content

Commit

Permalink
users buttons and updates to failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tiyiprh committed Aug 26, 2024
1 parent 9d7bbbe commit 4558037
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions frontend/awx/access/users/UserPage/UserOrganizations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ function UserOrganizationsInternal(props: { user: AwxUser }) {
variant: ButtonVariant.primary,
isPinned: true,
icon: PlusCircleIcon,
label: t('Add user to organizations'),
label: t('Add users to organizations'),
onClick: () => selectOrganizationsAddUsers([user]),
},
{ type: PageActionType.Seperator },
{
type: PageActionType.Button,
selection: PageActionSelection.Multiple,
icon: MinusCircleIcon,
label: t('Remove user from selected organizations'),
label: t('Remove users from organizations'),
onClick: () =>
removeOrganizationsFromUsers([user], view.selectedItems, view.unselectItemsAndRefresh),
isDanger: true,
Expand Down
4 changes: 2 additions & 2 deletions frontend/awx/access/users/UserPage/UserTeams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function UserTeamsInternal(props: { user: AwxUser }) {
variant: ButtonVariant.primary,
isPinned: true,
icon: PlusCircleIcon,
label: t('Add user to teams'),
label: t('Add users to teams'),
isDisabled: canAddUserToTeam
? undefined
: t(
Expand All @@ -69,7 +69,7 @@ function UserTeamsInternal(props: { user: AwxUser }) {
type: PageActionType.Button,
selection: PageActionSelection.Multiple,
icon: MinusCircleIcon,
label: t('Remove user from selected teams'),
label: t('Remove users from teams'),
onClick: () => removeTeamsFromUsers([user], view.selectedItems),
isDanger: true,
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/awx/access/users/Users.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('Users.cy.ts', () => {
.then((results: AwxUser[]) => {
const user = results[0];
cy.selectTableRow(user.username, false);
cy.clickToolbarKebabAction('delete-selected-users');
cy.clickToolbarKebabAction('delete-users');
cy.contains('Permanently delete users').should('be.visible');
});
});
Expand Down
10 changes: 5 additions & 5 deletions frontend/awx/access/users/Users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,37 +81,37 @@ export function Users() {
type: PageActionType.Button,
selection: PageActionSelection.Multiple,
icon: PlusCircleIcon,
label: t('Add selected users to teams'),
label: t('Add users to teams'),
onClick: () => selectTeamsAddUsers(view.selectedItems),
},
{
type: PageActionType.Button,
selection: PageActionSelection.Multiple,
icon: MinusCircleIcon,
label: t('Remove selected users from teams'),
label: t('Remove users from teams'),
onClick: () => selectTeamsRemoveUsers(view.selectedItems),
},
{ type: PageActionType.Seperator },
{
type: PageActionType.Button,
selection: PageActionSelection.Multiple,
icon: PlusCircleIcon,
label: t('Add selected users to organizations'),
label: t('Add users to organizations'),
onClick: () => selectOrganizationsAddUsers(view.selectedItems),
},
{
type: PageActionType.Button,
selection: PageActionSelection.Multiple,
icon: MinusCircleIcon,
label: t('Remove selected users from organizations'),
label: t('Remove users from organizations'),
onClick: () => selectOrganizationsRemoveUsers(view.selectedItems),
},
{ type: PageActionType.Seperator },
{
type: PageActionType.Button,
selection: PageActionSelection.Multiple,
icon: TrashIcon,
label: t('Delete selected users'),
label: t('Delete users'),
onClick: deleteUsers,
isDanger: true,
},
Expand Down

0 comments on commit 4558037

Please sign in to comment.