Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/kit/components/Inputs/ArrayBase/ArrayBase.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
align-items: flex-end;

.#{$ns}transparent {
align-items: flex-end;
align-items: flex-start;
}
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ test.describe('Array Base', () => {
await expectScreenshot();
});

test('error remove button', async ({mount, expectScreenshot}) => {
const component = await mount(<DynamicForm spec={ARRAY_BASE.errorRemoveButton} />);
const input = component.getByRole('textbox').first();

await input.focus();
await input.blur();

await expectScreenshot();
});

test('description', async ({mount, expectScreenshot}) => {
await mount(<DynamicForm spec={ARRAY_BASE.description} />);

Expand Down
20 changes: 20 additions & 0 deletions src/lib/kit/components/Inputs/ArrayBase/__tests__/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,26 @@ export const ARRAY_BASE: Record<string, ArraySpec> = {
itemLabel: 'Add element',
},
},
errorRemoveButton: {
type: SpecTypes.Array,
defaultValue: ['foo'],
items: {
type: SpecTypes.String,
pattern: 'bar',
viewSpec: {
type: 'base',
layout: 'row',
layoutTitle: 'Element',
},
},
viewSpec: {
type: 'base',
layout: 'accordeon',
layoutTitle: 'Elements',
layoutOpen: true,
itemLabel: 'Add element',
},
},
description: {
defaultValue: ['foo', 'bar', 'rab', 'oof'],
type: SpecTypes.Array,
Expand Down