Skip to content

Commit

Permalink
chore(button-toggle-group): convert enzyme tests to RTL
Browse files Browse the repository at this point in the history
  • Loading branch information
nuria1110 committed May 31, 2024
1 parent 674597b commit 2eda196
Show file tree
Hide file tree
Showing 4 changed files with 390 additions and 544 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import FormField from "../../../__internal__/form-field";
import { TagProps } from "../../../__internal__/utils/helpers/tags";
import guid from "../../../__internal__/utils/helpers/guid";
import StyledButtonToggleGroup, {
StyledButtonToggleGroupWrapper,
StyledHintText,
} from "./button-toggle-group.style";
import { ButtonToggle } from "..";
Expand Down Expand Up @@ -243,27 +242,24 @@ const ButtonToggleGroup = ({
{inputHint}
</StyledHintText>
)}
<StyledButtonToggleGroupWrapper
labelInline={labelInline}
<StyledButtonToggleGroup
ref={wrapperRef}
{...(label
? { "aria-labelledby": labelId.current }
: { "aria-label": ariaLabel })}
labelInline={labelInline}
inputWidth={inputWidth}
fullWidth={fullWidth}
role="group"
data-component={dataComponent}
data-role={dataRole}
data-element={dataElement}
id={id}
className={className}
disabled={disabled}
>
<StyledButtonToggleGroup
{...(label
? { "aria-labelledby": labelId.current }
: { "aria-label": ariaLabel })}
inputWidth={inputWidth}
fullWidth={fullWidth}
role="group"
data-component={dataComponent}
data-role={dataRole}
data-element={dataElement}
id={id}
className={className}
disabled={disabled}
>
{children}
</StyledButtonToggleGroup>
</StyledButtonToggleGroupWrapper>
{children}
</StyledButtonToggleGroup>
</ButtonToggleGroupContext.Provider>
</FormField>
</InputGroupBehaviour>
Expand Down
Loading

0 comments on commit 2eda196

Please sign in to comment.