Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
39452e9
[chore] added snapshots
ilyabrower Jun 12, 2026
888cdfd
[chore] added snapshots
ilyabrower Jun 12, 2026
e15d24b
[chore] added snapshots
ilyabrower Jun 12, 2026
c2c4589
[chore] added snapshots
ilyabrower Jun 12, 2026
346d583
[input-mask] added data-ui-name test
ilyabrower Jul 28, 2026
fdf285f
[modal] added data-ui-name test
ilyabrower Jul 28, 2026
8b41a04
[notice] added data-ui-name test
ilyabrower Jul 28, 2026
45709a3
[notice-bubble] added data-ui-name test
ilyabrower Jul 28, 2026
3c14237
[pagination] added data-ui-name test
ilyabrower Jul 28, 2026
c9f8628
[pills] added data-ui-name test
ilyabrower Jul 28, 2026
28faacc
[product-head] added data-ui-name test
ilyabrower Jul 28, 2026
252c984
[progress-bar] added data-ui-name test
ilyabrower Jul 28, 2026
4224020
[chore] Merge remote-tracking branch 'origin/release/v17' into UIK-37…
ilyabrower Jul 28, 2026
9af5a8b
[radio] added data-ui-name test
ilyabrower Jul 29, 2026
b0841cb
[select] added data-ui-name test
ilyabrower Jul 29, 2026
e7c91c9
[side-panel, skeleton, slider, spin, spin-container, switch, tab-line…
ilyabrower Jul 29, 2026
b54f0f2
[chore] updated lock file
ilyabrower Jul 30, 2026
eb870ca
[chore] Merge branch 'release/v17' into UIK-3788/data-ui-name-tests
ilyabrower Jul 31, 2026
fbbd108
[chore] updated data-ui-name snapshots
ilyabrower Jul 31, 2026
b28e618
[chore] Merge remote-tracking branch 'origin/release/v17' into UIK-37…
ilyabrower Aug 3, 2026
0318d38
Merge branch 'release/v17' into UIK-3788/data-ui-name-tests
Valeria-Zimnitskaya Aug 12, 2026
213a80f
[carousel] update test
Valeria-Zimnitskaya Aug 12, 2026
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
5 changes: 4 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions semcore/drag-and-drop/__tests__/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`DragAndDrop > Verify data-ui-name 1`] = `
{
"children": [
{
"children": [
{
"children": [],
"uiName": "DragAndDrop.Draggable",
},
{
"children": [],
"uiName": "DragAndDrop.Draggable",
},
{
"children": [],
"uiName": "DragAndDrop.DropZone",
},
],
"uiName": "DragAndDrop",
},
{
"children": [],
"uiName": "Box",
},
],
"uiName": null,
}
`;
32 changes: 31 additions & 1 deletion semcore/drag-and-drop/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
import { extractUIName } from '@semcore/testing-utils/shared/extractUINameTree.ts';
import { runDependencyCheckTests } from '@semcore/testing-utils/shared-tests';
import { describe } from '@semcore/testing-utils/vitest';
import { cleanup, render } from '@semcore/testing-utils/testing-library';
import { beforeEach, describe, expect, test } from '@semcore/testing-utils/vitest';
import React from 'react';

import DragAndDrop from '../src';

describe('drag-and-drop Dependency imports', () => {
runDependencyCheckTests('drag-and-drop');
});

describe('DragAndDrop', () => {
beforeEach(cleanup);

test('Verify data-ui-name', () => {
const dragAndDrop = (
<DragAndDrop aria-label='Sortable list' onDnD={() => {}}>
<DragAndDrop.Draggable id='first' aria-label='First item'>
First item
</DragAndDrop.Draggable>
<DragAndDrop.Draggable id='second' aria-label='Second item'>
Second item
</DragAndDrop.Draggable>
<DragAndDrop.DropZone aria-label='Drop zone'>
Drop zone
</DragAndDrop.DropZone>
</DragAndDrop>
);

const { container } = render(dragAndDrop);
const result = extractUIName(container);

expect(result).toMatchSnapshot();
});
});
132 changes: 132 additions & 0 deletions semcore/dropdown-menu/__tests__/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`DropdownMenu > Verify data-ui-name 1`] = `
{
"children": [
{
"children": [
{
"children": [
{
"children": [],
"uiName": "ButtonTrigger.Text",
},
{
"children": [
{
"children": [
{
"children": [],
"uiName": null,
},
],
"uiName": "ChevronDown",
},
],
"uiName": "ButtonTrigger.Addon",
},
],
"uiName": "DropdownMenu.Trigger.InnerTriggerWrapper",
},
],
"uiName": "DropdownMenu.Trigger",
},
{
"children": [],
"uiName": null,
},
{
"children": [
{
"children": [
{
"children": [
{
"children": [
{
"children": [
{
"children": [],
"uiName": "Flex",
},
],
"uiName": "Dropdown.Item",
},
{
"children": [
{
"children": [],
"uiName": "DropdownMenu.Item",
},
{
"children": [
{
"children": [
{
"children": [],
"uiName": "DropdownMenu.Item.Addon",
},
{
"children": [],
"uiName": "DropdownMenu.Item.Text",
},
],
"uiName": "DropdownMenu.Item.Content",
},
{
"children": [],
"uiName": "DropdownMenu.Item.Hint",
},
],
"uiName": "DropdownMenu.Item",
},
],
"uiName": "DropdownMenu.Group",
},
{
"children": [
{
"children": [
{
"children": [
{
"children": [],
"uiName": "Button.Text",
},
],
"uiName": "Button.InnerWrapper",
},
],
"uiName": "Button",
},
],
"uiName": "DropdownMenu.Actions",
},
{
"children": [],
"uiName": "DropdownMenu.StatusItem",
},
{
"children": [],
"uiName": "Box",
},
],
"uiName": null,
},
],
"uiName": "ScrollArea.Container",
},
],
"uiName": "DropdownMenu.Menu",
},
],
"uiName": "DropdownMenu.Popper",
},
{
"children": [],
"uiName": null,
},
],
"uiName": null,
}
`;
38 changes: 31 additions & 7 deletions semcore/dropdown-menu/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Box } from '@semcore/base-components';
import { ButtonTrigger } from '@semcore/base-trigger';
import Button from '@semcore/button';
import { extractUIName } from '@semcore/testing-utils/shared/extractUINameTree.ts';
import { runDependencyCheckTests } from '@semcore/testing-utils/shared-tests';
import { cleanup, render, userEvent } from '@semcore/testing-utils/testing-library';
import { expect, test, describe, beforeEach, vi } from '@semcore/testing-utils/vitest';
Expand All @@ -15,14 +16,37 @@ describe('dropdown-menu Dependency imports', () => {
describe('DropdownMenu', () => {
beforeEach(() => {
cleanup();
});

test('Verify data-ui-name', () => {
const dropdownMenu = (
<DropdownMenu visible disablePortal>
<DropdownMenu.Trigger tag={ButtonTrigger}>
Trigger
</DropdownMenu.Trigger>
<DropdownMenu.Menu>
<DropdownMenu.Group title='Group title'>
<DropdownMenu.Item>Item 1</DropdownMenu.Item>
<DropdownMenu.Item>
<DropdownMenu.Item.Content>
<DropdownMenu.Item.Addon>Before</DropdownMenu.Item.Addon>
<DropdownMenu.Item.Text>Item 2</DropdownMenu.Item.Text>
</DropdownMenu.Item.Content>
<DropdownMenu.Item.Hint>Hint text</DropdownMenu.Item.Hint>
</DropdownMenu.Item>
</DropdownMenu.Group>
<DropdownMenu.Actions>
<Button>Apply</Button>
</DropdownMenu.Actions>
<DropdownMenu.StatusItem id='search-result' itemsCount={0} />
</DropdownMenu.Menu>
</DropdownMenu>
);

const { container } = render(dropdownMenu);
const result = extractUIName(container);

const mockIntersectionObserver = vi.fn();
mockIntersectionObserver.mockReturnValue({
observe: () => null,
unobserve: () => null,
disconnect: () => null,
});
window.IntersectionObserver = mockIntersectionObserver;
expect(result).toMatchSnapshot();
});

test.sequential('Verify does not trigger visibility change on Space key in input', async () => {
Expand Down
25 changes: 25 additions & 0 deletions semcore/dropdown/__tests__/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Dropdown > Verify data-ui-name 1`] = `
{
"children": [
{
"children": [],
"uiName": "Dropdown.Trigger",
},
{
"children": [],
"uiName": null,
},
{
"children": [],
"uiName": "Dropdown.Popper",
},
{
"children": [],
"uiName": null,
},
],
"uiName": null,
}
`;
17 changes: 17 additions & 0 deletions semcore/dropdown/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { extractUIName } from '@semcore/testing-utils/shared/extractUINameTree.ts';
import { runDependencyCheckTests } from '@semcore/testing-utils/shared-tests';
import {
cleanup,
Expand Down Expand Up @@ -81,6 +82,22 @@ describe('Dropdown', () => {
window.IntersectionObserver = mockIntersectionObserver;
});

test('Verify data-ui-name', () => {
const dropdown = (
<Dropdown visible disablePortal>
<Dropdown.Trigger>
Trigger
</Dropdown.Trigger>
<Dropdown.Popper aria-label='Dropdown popper description' />
</Dropdown>
);

const { container } = render(dropdown);
const result = extractUIName(container);

expect(result).toMatchSnapshot();
});

test('Verify not open popper by keyboard enter if interaction none', async () => {
const spy = vi.fn();
render(
Expand Down
Loading
Loading