Skip to content

Commit

Permalink
updated test to check all button types
Browse files Browse the repository at this point in the history
  • Loading branch information
nkylstad committed Oct 29, 2024
1 parent 6e3523e commit fdd447a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions frontend/packages/ux-editor/src/utils/formLayoutUtils.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -512,10 +512,15 @@ describe('formLayoutUtils', () => {
});

describe('isComponentTypeValidChild', () => {
it('Returns true if the child is valid to given container', () => {
expect(isComponentTypeValidChild(mockInternal, buttonGroupId, ComponentType.Button)).toBe(
true,
);
it.each([
ComponentType.ActionButton,
ComponentType.Button,
ComponentType.CustomButton,
ComponentType.NavigationButtons,
ComponentType.PrintButton,
ComponentType.InstantiationButton,
])('Returns true if the child is valid to given container', (buttonType: ComponentType) => {
expect(isComponentTypeValidChild(mockInternal, buttonGroupId, buttonType)).toBe(true);
});

it('Returns true if the component is not dropped inside a container', () => {
Expand Down

0 comments on commit fdd447a

Please sign in to comment.