Skip to content

Commit

Permalink
datatest-id
Browse files Browse the repository at this point in the history
  • Loading branch information
sgendre committed Feb 15, 2024
1 parent dbea72f commit 9ca515b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
import { forwardRef } from 'react';
import type { MouseEvent, Ref } from 'react';

import classnames from 'classnames';

// eslint-disable-next-line @talend/import-depth
import { IconNameWithSize } from '@talend/icons/dist/typeUtils';

import { mergeRefs } from '../../../../mergeRef';
import { DeprecatedIconNames } from '../../../../types';
import { Tooltip, TooltipChildrenFnProps, TooltipChildrenFnRef } from '../../../Tooltip';
import { StackHorizontal } from '../../../Stack';
import { Clickable, ClickableProps } from '../../../Clickable';
import { getIconWithDeprecatedSupport } from '../../../Icon/DeprecatedIconHelper';
import { SizedIcon } from '../../../Icon';
import { getIconWithDeprecatedSupport } from '../../../Icon/DeprecatedIconHelper';
import { StackHorizontal } from '../../../Stack';
import { Tooltip, TooltipChildrenFnProps, TooltipChildrenFnRef } from '../../../Tooltip';

import styles from '../AffixStyles.module.scss';
import { mergeRefs } from '../../../../mergeRef';

type CommonAffixButtonPropsType = {
dataTestid?: string;
children: string;
isDropdown?: boolean;
onClick: (event: MouseEvent<HTMLButtonElement> | KeyboardEvent) => void;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
import {
FocusEvent,
forwardRef,
InputHTMLAttributes,
Ref,
useImperativeHandle,
useRef,
FocusEvent,
} from 'react';

import classnames from 'classnames';
import InputWrapper, { AffixesProps } from '../InputWrapper/InputWrapper';
import { FieldStatusProps } from '../Field/Field';

import useRevealPassword from '../../../Form/Field/Input/hooks/useRevealPassword';
import { SizedIcon } from '../../../Icon';
import { FieldStatusProps } from '../Field/Field';
import InputWrapper, { AffixesProps } from '../InputWrapper/InputWrapper';

import styles from './Input.module.scss';

export type InputPrimitiveProps = Omit<InputHTMLAttributes<any>, 'prefix' | 'suffix'> &
export type InputPrimitiveProps = Omit<
InputHTMLAttributes<any>,
'prefix' | 'suffix' | 'dataTestid'
> &
AffixesProps &
Omit<FieldStatusProps, 'errorMessage'>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type SelectNoWrapperProps = Omit<SelectHTMLAttributes<any>, 'prefix'> & {
hasError?: boolean;
isAffix?: boolean;
isSuffix?: boolean;
dataTestid?: string;
};

const SelectNoWrapper = forwardRef((props: SelectNoWrapperProps, ref: Ref<HTMLSelectElement>) => {
Expand All @@ -25,12 +26,14 @@ const SelectNoWrapper = forwardRef((props: SelectNoWrapperProps, ref: Ref<HTMLSe
isAffix = false,
isSuffix = false,
id,
dataTestid,
...rest
} = props;
return (
<div className={styles.select__wrapper}>
<select
{...rest}
data-testid={dataTestid}
disabled={disabled}
ref={ref}
id={id}
Expand Down

0 comments on commit 9ca515b

Please sign in to comment.