Skip to content

Commit

Permalink
fix(Storybook): aligne props
Browse files Browse the repository at this point in the history
  • Loading branch information
bar-tay authored and faselbaum committed Mar 8, 2024
1 parent 6d568cf commit 1662c8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/ui-library/src/components/select/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ const sampleParams: BlrSelectType = {
name: 'Text Input',
label: 'Label',
labelAppendix: '(Optional)',
size: 'md',
sizeVariant: 'md',
errorMessage: 'This is error message',
hasHint: true,
hintMessage: 'Field is used for hint',
hintIcon: 'blrInfo',
hintMessageIcon: 'blrInfo',
selectId: 'Peter',
errorMessageIcon: 'blrErrorFilled',
theme: 'Light',
Expand Down Expand Up @@ -46,7 +46,7 @@ describe('blr-select', () => {
BlrSelectRenderFunction({
...sampleParams,
hasHint: true,
hintIcon: 'blrInfo',
hintMessageIcon: 'blrInfo',
hasError: true,
errorMessageIcon: 'blrErrorFilled',
})
Expand Down Expand Up @@ -76,7 +76,7 @@ describe('blr-select', () => {
});

it('has a size sm when "size" is set to "sm" ', async () => {
const element = await fixture(BlrSelectRenderFunction({ ...sampleParams, size: 'sm' }));
const element = await fixture(BlrSelectRenderFunction({ ...sampleParams, sizeVariant: 'sm' }));

const selectWrapper = querySelectorDeep('.blr-select-wrapper', element.getRootNode() as HTMLElement);
const className = selectWrapper?.className;
Expand All @@ -85,7 +85,7 @@ describe('blr-select', () => {
});

it('is rendering options inside slot', async () => {
const element = await fixture(BlrSelectRenderFunction({ ...sampleParams, size: 'sm' }, optionsAsChildren));
const element = await fixture(BlrSelectRenderFunction({ ...sampleParams, sizeVariant: 'sm' }, optionsAsChildren));
const options = querySelectorAllDeep('.blr-select-option', element?.getRootNode() as HTMLElement);
const optionsLength = optionsAsChildren.strings[0].trim().split('</option>').filter(Boolean).length;
expect(options).to.be.lengthOf(optionsLength);
Expand Down

0 comments on commit 1662c8e

Please sign in to comment.