mirror of
https://github.com/quay/quay.git
synced 2026-01-26 06:21:37 +03:00
[redhat-3.14] web: make team name clickable in Teams View (PROJQUAY-9514) (#4329)
* web: make team name clickable in Teams View (PROJQUAY-9347) users can now click team name to navigate to team management page where team description can be edited, matching old Angular UI behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Brady Pratt <bpratt@redhat.com> * web: show team desc if no members (PROJQUAY-9347) allow setting the team description even if there are no members yet Signed-off-by: Brady Pratt <bpratt@redhat.com> --------- Signed-off-by: Brady Pratt <bpratt@redhat.com> Co-authored-by: Brady Pratt <bpratt@redhat.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
5cf708506b
commit
ebbec69c8d
@@ -248,4 +248,38 @@ describe('Teams and membership page', () => {
|
||||
cy.get(`[data-testid="edit-team-description-btn"]`).should('not.exist');
|
||||
cy.get(`[data-testid="${user}-delete-icon"]`).should('not.exist');
|
||||
});
|
||||
|
||||
it('Can click team name to navigate to team management page and edit description', () => {
|
||||
const team = 'arsenal';
|
||||
const newDescription = 'updated team description';
|
||||
cy.visit('/organization/testorg?tab=Teamsandmembership');
|
||||
cy.get('#Teams').click();
|
||||
|
||||
// Search for a single team
|
||||
cy.get('#teams-view-search').type(`${team}`);
|
||||
cy.contains('1 - 1 of 1');
|
||||
|
||||
// Click on team name to navigate to team management page
|
||||
cy.contains('td', team).contains('a', team).click();
|
||||
cy.url().should('include', `teams/${team}`);
|
||||
|
||||
// Verify team name is displayed
|
||||
cy.get('[data-testid="teamname-title"]').contains(team).should('exist');
|
||||
|
||||
// Edit team description
|
||||
cy.get('[data-testid="edit-team-description-btn"]').click();
|
||||
cy.get('[data-testid="team-description-text-area"]').clear();
|
||||
cy.get('[data-testid="team-description-text-area"]').type(newDescription);
|
||||
cy.get('[data-testid="save-team-description-btn"]').click();
|
||||
|
||||
// verify success alert
|
||||
cy.get('.pf-v5-c-alert.pf-m-success')
|
||||
.contains(`Successfully updated team:${team} description`)
|
||||
.should('exist');
|
||||
|
||||
// verify description is updated
|
||||
cy.get('[data-testid="team-description-text"]')
|
||||
.contains(newDescription)
|
||||
.should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -528,6 +528,9 @@ export default function ManageMembersList(props: ManageMembersListProps) {
|
||||
return (
|
||||
<>
|
||||
<Conditional if={pageInReadOnlyMode}>{teamSyncedConfig}</Conditional>
|
||||
<PageSection variant={PageSectionVariants.light}>
|
||||
{teamDescriptionComponent}
|
||||
</PageSection>
|
||||
<Empty
|
||||
title="There are no viewable members for this team"
|
||||
icon={CubesIcon}
|
||||
|
||||
@@ -278,7 +278,22 @@ export default function TeamsViewList(props: TeamsViewListProps) {
|
||||
isSelected: selectedTeams.some((t) => t.name === team.name),
|
||||
}}
|
||||
/>
|
||||
<Td dataLabel={teamViewColumnNames.teamName}>{team.name}</Td>
|
||||
<Td dataLabel={teamViewColumnNames.teamName}>
|
||||
{team.can_view ? (
|
||||
<Link
|
||||
to={getTeamMemberPath(
|
||||
location.pathname,
|
||||
props.organizationName,
|
||||
team.name,
|
||||
searchParams.get('tab'),
|
||||
)}
|
||||
>
|
||||
{team.name}
|
||||
</Link>
|
||||
) : (
|
||||
team.name
|
||||
)}
|
||||
</Td>
|
||||
<Td
|
||||
dataLabel={teamViewColumnNames.members}
|
||||
data-testid={`member-count-for-${team.name}`}
|
||||
|
||||
Reference in New Issue
Block a user