From fc33ba716559db6bfe532b64684f439e930daa89 Mon Sep 17 00:00:00 2001 From: Andrew Shubnikov <32542672+shbov@users.noreply.github.com> Date: Mon, 1 Jul 2024 19:09:56 +0300 Subject: [PATCH] fix(Dialog): move QA props to DialogOwnProps (#1691) --- src/components/Dialog/Dialog.tsx | 4 ++-- src/components/Dialog/__stories__/DialogShowcase.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Dialog/Dialog.tsx b/src/components/Dialog/Dialog.tsx index 15198af2f5..1acdc56547 100644 --- a/src/components/Dialog/Dialog.tsx +++ b/src/components/Dialog/Dialog.tsx @@ -17,7 +17,7 @@ import './Dialog.scss'; const b = block('dialog'); -interface DialogOwnProps { +interface DialogOwnProps extends QAProps { open: boolean; children: React.ReactNode; onEscapeKeyDown?: ModalProps['onEscapeKeyDown']; @@ -52,7 +52,7 @@ interface DialogDefaultProps { } export type DialogProps = DialogOwnProps & Partial; -type DialogInnerProps = DialogOwnProps & DialogDefaultProps & QAProps; +type DialogInnerProps = DialogOwnProps & DialogDefaultProps; export class Dialog extends React.Component { static defaultProps: DialogDefaultProps = { diff --git a/src/components/Dialog/__stories__/DialogShowcase.tsx b/src/components/Dialog/__stories__/DialogShowcase.tsx index e419a9061c..b3e0039b7a 100644 --- a/src/components/Dialog/__stories__/DialogShowcase.tsx +++ b/src/components/Dialog/__stories__/DialogShowcase.tsx @@ -67,6 +67,7 @@ function OtherDialog() { hasCloseButton keepMounted onEnterKeyDown={handleApply} + qa="darthVader" onTransitionEntered={() => { selectRef?.current?.focus(); setTimeout(() => setOpenSelect(true), 0);