Skip to content

Commit

Permalink
feat(core-components-select): add dataTestId
Browse files Browse the repository at this point in the history
  • Loading branch information
reme3d2y committed Sep 2, 2020
1 parent 93943b7 commit 83c5dd5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/select/src/components/base-select/Component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { isGroup } from '../../utils';
export const BaseSelect = forwardRef(
(
{
dataTestId,
className,
options,
autocomplete = false,
Expand Down Expand Up @@ -265,6 +266,7 @@ export const BaseSelect = forwardRef(
{...getComboboxProps({
className: cn(styles.component, { [styles.block]: block }, className),
})}
data-test-id={dataTestId}
>
<div {...fieldWrapperProps}>
{nativeSelect && renderNativeSelect()}
Expand Down
5 changes: 5 additions & 0 deletions packages/select/src/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ export type GroupShape = {
};

export type BaseSelectProps = {
/**
* Идентификатор для систем автоматизированного тестирования
*/
dataTestId?: string;

/**
* Дополнительный класс
*/
Expand Down

0 comments on commit 83c5dd5

Please sign in to comment.