Skip to content

Commit

Permalink
test(react): add icon button loading Cypress tests
Browse files Browse the repository at this point in the history
Add icon button loading Cypress tests to capture any issues
  • Loading branch information
GCHQ-Developer-530 committed Dec 10, 2024
1 parent 3f21c08 commit 2acad46
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
27 changes: 27 additions & 0 deletions packages/react/src/component-tests/IcButton/IcButtonTestData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ export const iconProps = {
disabled: false,
monochrome: false,
},
iconLoading: {
title: "Default",
size: "medium",
theme: "light",
loading: true,
disabled: false,
monochrome: false,
},
iconDisabled: {
title: "Disabled",
size: "medium",
Expand All @@ -49,6 +57,14 @@ export const iconProps = {
disabled: false,
monochrome: true,
},
iconDarkLoading: {
title: "Dark",
size: "medium",
theme: "dark",
loading: true,
disabled: false,
monochrome: true,
},
iconLight: {
title: "Light",
size: "medium",
Expand All @@ -57,6 +73,14 @@ export const iconProps = {
disabled: false,
monochrome: true,
},
iconLightLoading: {
title: "Light",
size: "medium",
theme: "light",
loading: true,
disabled: false,
monochrome: true,
},
};

export const SlottedIcon = () => {
Expand Down Expand Up @@ -787,9 +811,12 @@ export const IconButtonGroup = (): ReactElement => {
<IconBtnGroup props={iconProps.iconDefault} />
<IconBtnGroup props={iconProps.iconLarge} />
<IconBtnGroup props={iconProps.iconSmall} />
<IconBtnGroup props={iconProps.iconLoading} />
<IconBtnGroup props={iconProps.iconDisabled} />
<IconBtnGroup props={iconProps.iconDark} />
<IconBtnGroup props={iconProps.iconDarkLoading} />
<IconBtnGroup props={iconProps.iconLight} />
<IconBtnGroup props={iconProps.iconLightLoading} />
</>
);
};
Expand Down

0 comments on commit 2acad46

Please sign in to comment.