Skip to content

Instantly share code, notes, and snippets.

@dsibinski
Created July 11, 2021 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsibinski/5266776ab31d225e6dc97278d4f5f02f to your computer and use it in GitHub Desktop.
Save dsibinski/5266776ab31d225e6dc97278d4f5f02f to your computer and use it in GitHub Desktop.
describe('FormIoJsonProcessor', () => {
describe('test getComponentsCount', () => {
it('should return correct components count for a form with 6 not nested components', () => {
let formIoJsonProcessor = new FormIoJsonProcessor();
expect(formIoJsonProcessor
.getRandomizableComponentsCount(formWith6NotNestedComponents))
.toBe(6);
})
it('should treat FieldSet and Columns as a single component when counting components', () => {
let formIoJsonProcessor = new FormIoJsonProcessor();
expect(formIoJsonProcessor
.getRandomizableComponentsCount(formWith3NotNestedAnd4NestedIn2GroupsComponents))
.toBe(5);
})
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment