fix: style issues and test

This commit is contained in:
Diana Olarte
2025-10-22 19:45:20 +11:00
committed by Adolfo R. Brandes
parent 9ef86c2bfe
commit f6bd291662
3 changed files with 7 additions and 4 deletions

View File

@@ -29,7 +29,7 @@
font-weight: var(--pgn-typography-font-weight-base); font-weight: var(--pgn-typography-font-weight-base);
} }
svg { .pgn__icon {
width: var(--pgn-size-icon-xs); width: var(--pgn-size-icon-xs);
height: var(--pgn-size-icon-xs); height: var(--pgn-size-icon-xs);
} }

View File

@@ -1,4 +1,5 @@
import { fireEvent, screen } from '@testing-library/react'; import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { renderWrapper } from '@src/setupTest'; import { renderWrapper } from '@src/setupTest';
import { initializeMockApp } from '@edx/frontend-platform/testing'; import { initializeMockApp } from '@edx/frontend-platform/testing';
import { useLibrary } from '@src/authz-module/data/hooks'; import { useLibrary } from '@src/authz-module/data/hooks';
@@ -96,11 +97,13 @@ describe('LibrariesTeamManager', () => {
}); });
it('renders role cards when "Roles" tab is selected', async () => { it('renders role cards when "Roles" tab is selected', async () => {
const user = userEvent.setup();
renderWrapper(<LibrariesTeamManager />); renderWrapper(<LibrariesTeamManager />);
// Click on "Roles" tab // Click on "Roles" tab
const rolesTab = await screen.findByRole('tab', { name: /roles/i }); const rolesTab = await screen.findByRole('tab', { name: /roles/i });
fireEvent.click(rolesTab); await user.click(rolesTab);
const roleCards = await screen.findAllByTestId('role-card'); const roleCards = await screen.findAllByTestId('role-card');

View File

@@ -57,7 +57,7 @@ const LibrariesTeamManager = () => {
{!libraryRoles ? <Skeleton count={2} height={200} /> : null} {!libraryRoles ? <Skeleton count={2} height={200} /> : null}
{libraryRoles && libraryRoles.map(role => ( {libraryRoles && libraryRoles.map(role => (
<RoleCard <RoleCard
key={`${role}-description`} key={`${role.role}-description`}
title={role.name} title={role.name}
userCounter={role.userCount} userCounter={role.userCount}
description={role.description} description={role.description}