Skip to content

Commit

Permalink
[UXD][AAP-25027] AWX - updates to Users section breadcrumbs & headers (
Browse files Browse the repository at this point in the history
  • Loading branch information
tiyiprh authored Aug 21, 2024
1 parent 9168e30 commit 5708ce3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/awx/access/users/users.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ describe('Users Tests', () => {

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

it('edits a user from the details page', () => {
cy.clickTableRowLink('username', user.username);
cy.verifyPageTitle(user.username);
cy.url().should('contain', '/details');
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`);
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 5708ce3

Please sign in to comment.