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-25027] AWX - updates to Users section breadcrumbs & headers #2733

Merged
merged 3 commits into from
Aug 21, 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/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
Loading