Skip to content

Commit

Permalink
updates with latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tiyiprh committed Jul 17, 2024
1 parent 14efd9e commit d7396d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/awx/access/users.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@ describe('Users List Actions', () => {
it('edits a user from the details page', () => {
cy.navigateTo('awx', 'users');
cy.clickTableRowLink('username', user.username);
cy.verifyPageTitle(user.username);
cy.verifyPageTitle(`Edit ${user.username}`);
cy.clickButton(/^Edit user$/);
cy.verifyPageTitle('Edit User');
cy.verifyPageTitle(`Edit ${user.username}`);
cy.get('[data-cy="username"]').type(user.username + 'a');
cy.clickButton(/^Save user$/);
cy.verifyPageTitle(`${user.username}a`);
cy.verifyPageTitle(`Edit ${user.username}`);
});

it('navigates to the edit form from the users list row item', () => {
cy.navigateTo('awx', 'users');
cy.clickTableRowPinnedAction(user.username, 'edit-user');
cy.verifyPageTitle('Edit User');
cy.verifyPageTitle(`Edit ${user.username}`);
});
});

Expand Down
12 changes: 8 additions & 4 deletions frontend/awx/access/users/UserForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ export function CreateUser() {
return (
<PageLayout>
<PageHeader
title={t('Create User')}
title={t('Create user')}
breadcrumbs={[
{ label: t('Users'), to: getPageUrl(AwxRoute.Users) },
{ label: t('Create User') },
{ label: t('Create user') },
]}
/>
<AwxPageForm
Expand Down Expand Up @@ -130,10 +130,14 @@ export function EditUser() {
return (
<PageLayout>
<PageHeader
title={t('Edit User')}
title={user?.username ? t('Edit {{userName}}', { userName: user?.username }) : t('User')}
breadcrumbs={[
{ label: t('Users'), to: getPageUrl(AwxRoute.Users) },
{ label: t('Edit User') },
{
label: user?.username
? t('Edit {{userName}}', { userName: user?.username })
: t('User'),
},
]}
/>
<AwxPageForm<IUserInput>
Expand Down

0 comments on commit d7396d2

Please sign in to comment.