diff --git a/src/app/components/TokenGroup/TokenGroup.test.tsx b/src/app/components/TokenGroup/TokenGroup.test.tsx index 89d4fe376..d3d08dd20 100644 --- a/src/app/components/TokenGroup/TokenGroup.test.tsx +++ b/src/app/components/TokenGroup/TokenGroup.test.tsx @@ -75,8 +75,8 @@ describe('TokenGroup', () => { schema={schema as TokenTypeSchema} />); - await fireEvent.click(getByTestId('tokenlisting-group-size.font')); - await fireEvent.click(getByTestId('tokenlisting-group-color')); + await fireEvent.click(getByTestId('group-heading-size.font-font-listing')); + await fireEvent.click(getByTestId('group-heading-color-color-listing')); const { collapsedTokens } = store.getState().tokenState; expect(collapsedTokens).toEqual(['size.font', 'color']); @@ -90,9 +90,9 @@ describe('TokenGroup', () => { schema={schema as TokenTypeSchema} />); - await fireEvent.click(getByTestId('tokenlisting-group-size.font')); - await fireEvent.click(getByTestId('tokenlisting-group-size.font')); - await fireEvent.click(getByTestId('tokenlisting-group-color')); + await fireEvent.click(getByTestId('group-heading-size.font-font-listing')); + await fireEvent.click(getByTestId('group-heading-size.font-font-listing')); + await fireEvent.click(getByTestId('group-heading-color-color-listing')); const { collapsedTokens } = store.getState().tokenState; expect(collapsedTokens).toEqual(['color']); diff --git a/src/app/components/TokenGroup/TokenGroupHeading.tsx b/src/app/components/TokenGroup/TokenGroupHeading.tsx index add80ab64..36d344257 100644 --- a/src/app/components/TokenGroup/TokenGroupHeading.tsx +++ b/src/app/components/TokenGroup/TokenGroupHeading.tsx @@ -91,11 +91,10 @@ export function TokenGroupHeading({ data-cy={`tokenlisting-group-${path}`} data-testid={`tokenlisting-group-${path}`} type="button" - onClick={handleToggleCollapsed} > {collapsed.includes(path) ? : } - + {label} @@ -110,39 +109,39 @@ export function TokenGroupHeading({ - - - - - - - )} - > - - Renaming only affects tokens of the same type - - + + + + + + + )} + > + + Renaming only affects tokens of the same type + + - - + + } tooltip="Add a new token"