Skip to content

Commit

Permalink
remove the default value of the testID
Browse files Browse the repository at this point in the history
  • Loading branch information
HoonBaek committed May 14, 2024
1 parent c5e31c2 commit 8bd113d
Show file tree
Hide file tree
Showing 39 changed files with 6 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const FileViewerComponent = ({
disableDelete,
onDownloadClick,
}: FileViewerUIProps) => (
<div className="sendbird-fileviewer" data-tsetid="sendbird-fileviewer">
<div className="sendbird-fileviewer" data-testid="sendbird-fileviewer">
<div className="sendbird-fileviewer__header">
<div className="sendbird-fileviewer__header__left">
<div className="sendbird-fileviewer__header__left__avatar">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ exports[`ui/AdminMessage should do a snapshot test of the AdminMessage DOM 1`] =
>
<span
class="sendbird-admin-message__text sendbird-label sendbird-label--caption-2 sendbird-label--color-onbackground-2"
data-testid=""
>
hoon1000, pp, Nico, aloompatest, 598, Kyle, 33333333, bennettl and tyson joined.
</span>
Expand Down
2 changes: 0 additions & 2 deletions src/ui/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ exports[`ui/Avatar should do a snapshot test of the Avatar DOM with four element
>
<div
class=" sendbird-icon sendbird-icon-user sendbird-icon-color--content"
data-testid=""
role="button"
style="width: 32.199999999999996px; min-width: 32.199999999999996px; height: 32.199999999999996px; min-height: 32.199999999999996px;"
tabindex="0"
Expand Down Expand Up @@ -227,7 +226,6 @@ exports[`ui/Avatar should render default image if src is empty 1`] = `
>
<div
class=" sendbird-icon sendbird-icon-user sendbird-icon-color--content"
data-testid=""
role="button"
style="width: 32.199999999999996px; min-width: 32.199999999999996px; height: 32.199999999999996px; min-height: 32.199999999999996px;"
tabindex="0"
Expand Down
1 change: 0 additions & 1 deletion src/ui/Badge/__tests__/__snapshots__/Badge.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ exports[`Badge should do a snapshot test of the Badge DOM 1`] = `
>
<span
class="sendbird-label sendbird-label--caption-2 sendbird-label--color-oncontent-1"
data-testid=""
>
1
</span>
Expand Down
2 changes: 0 additions & 2 deletions src/ui/Button/__tests__/__snapshots__/Button.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ exports[`ui/Button should do a snapshot test of the default Button DOM 1`] = `
>
<span
class="sendbird-button__text sendbird-label sendbird-label--button-1 sendbird-label--color-oncontent-1"
data-testid=""
>
Button
</span>
Expand All @@ -24,7 +23,6 @@ exports[`ui/Button should do a snapshot test of the small Button DOM 1`] = `
>
<span
class="sendbird-button__text sendbird-label sendbird-label--button-1 sendbird-label--color-oncontent-1"
data-testid=""
>
Button
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ exports[`ui/ConnectionStatus should render ConnectionStatus 1`] = `
>
<span
class="sendbird-label sendbird-label--body-2 sendbird-label--color-onbackground-2"
data-testid=""
>
Trying to connect…
</span>
<div
class=" sendbird-icon sendbird-icon-disconnected sendbird-icon-color--sent"
data-testid=""
role="button"
style="width: 14px; min-width: 14px; height: 14px; min-height: 14px;"
tabindex="0"
Expand Down
2 changes: 1 addition & 1 deletion src/ui/ContextMenu/MenuItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default class MenuItems extends React.Component<MenuItemsProps, MenuItems
return <></>;

const { menuStyle } = this.state;
const { children, style, className = '', testID = '' } = this.props;
const { children, style, className = '', testID } = this.props;
return (
createPortal(
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ exports[`ui/DateSeparator should do a snapshot test of the DateSeparator DOM 1`]
>
<span
class="sendbird-label sendbird-label--caption-2 sendbird-label--color-onbackground-2"
data-testid=""
>
Date Separator
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ exports[`ui/FileMessageItemBody should do a snapshot test of the FileMessageItem
>
<div
class="sendbird-file-message-item-body__file-icon__icon sendbird-icon sendbird-icon-photo sendbird-icon-color--primary"
data-testid=""
role="button"
style="width: 24px; min-width: 24px; height: 24px; min-height: 24px;"
tabindex="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,11 @@ exports[`ui/FileViewer should do a snapshot test of the FileViewer DOM 1`] = `
</div>
<span
class="sendbird-fileviewer__header__left__filename sendbird-label sendbird-label--h-2 sendbird-label--color-onbackground-1"
data-testid=""
>
sent-mail (1).png
</span>
<span
class="sendbird-fileviewer__header__left__sender-name sendbird-label sendbird-label--body-1 sendbird-label--color-onbackground-2"
data-testid=""
>
hoon102
</span>
Expand All @@ -65,7 +63,6 @@ exports[`ui/FileViewer should do a snapshot test of the FileViewer DOM 1`] = `
>
<div
class=" sendbird-icon sendbird-icon-down-load sendbird-icon-color--on-background-1"
data-testid=""
role="button"
style="width: 24px; min-width: 24px; height: 24px; min-height: 24px;"
tabindex="0"
Expand All @@ -79,7 +76,6 @@ exports[`ui/FileViewer should do a snapshot test of the FileViewer DOM 1`] = `
>
<div
class=" sendbird-icon sendbird-icon-close sendbird-icon-color--on-background-1"
data-testid=""
role="button"
style="width: 24px; min-width: 24px; height: 24px; min-height: 24px;"
tabindex="0"
Expand Down
1 change: 0 additions & 1 deletion src/ui/Icon/__tests__/__snapshots__/Icon.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ exports[`ui/Icon should do a snapshot test of the default Icon DOM 1`] = `
<DocumentFragment>
<div
class=" sendbird-icon sendbird-icon-add "
data-testid=""
role="button"
style="width: 26px; min-width: 26px; height: 26px; min-height: 26px;"
tabindex="0"
Expand Down
2 changes: 1 addition & 1 deletion src/ui/Icon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default function Icon({
height = 26,
onClick = noop,
children = null,
testID = '',
testID,
}: IconProps) {
const iconStyle = {
width: typeof width === 'string' ? width : `${width}px`,
Expand Down
1 change: 0 additions & 1 deletion src/ui/Label/__tests__/__snapshots__/Label.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ exports[`ui/Label should create a snapshot of a default label component 1`] = `
<DocumentFragment>
<span
class="sendbird-label sendbird-label--h-1 sendbird-label--color-onbackground-1"
data-testid=""
>
Example
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/ui/Label/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const Label = forwardRef(({
type,
color,
children = null,
testID = '',
testID,
}: LabelProps, ref?: RefObject<HTMLDivElement>) => {
return (
// Donot make this into div
Expand Down
2 changes: 0 additions & 2 deletions src/ui/Loader/__tests__/__snapshots__/Loader.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ exports[`ui/Loader should do a snapshot test of the default Loader DOM 1`] = `
<DocumentFragment>
<div
class=" sendbird-loader"
data-testid=""
style="width: 26px; height: 26px;"
>
<div
class=" sendbird-icon sendbird-icon-spinner "
data-testid=""
role="button"
style="width: 26px; min-width: 26px; height: 26px; min-height: 26px;"
tabindex="0"
Expand Down
2 changes: 1 addition & 1 deletion src/ui/Loader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Loader({
width = '26px',
height = '26px',
children,
testID = '',
testID,
}: LoaderProps): ReactElement {
return (
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ exports[`ui/MessageContent should do a snapshot test of the MessageContent DOM 1
>
<div
class=" sendbird-icon sendbird-icon-user sendbird-icon-color--content"
data-testid=""
role="button"
style="width: 16.099999999999998px; min-width: 16.099999999999998px; height: 16.099999999999998px; min-height: 16.099999999999998px;"
tabindex="0"
Expand All @@ -47,7 +46,6 @@ exports[`ui/MessageContent should do a snapshot test of the MessageContent DOM 1
>
<span
class="sendbird-message-content__middle__sender-name sendbird-label sendbird-label--caption-2 sendbird-label--color-onbackground-2"
data-testid=""
>
Mathew
</span>
Expand All @@ -56,7 +54,6 @@ exports[`ui/MessageContent should do a snapshot test of the MessageContent DOM 1
>
<span
class="sendbird-label sendbird-label--body-1 sendbird-label--color-onbackground-1"
data-testid=""
>
<div
class="sendbird-message-content__middle__message-item-body sendbird-text-message-item-body incoming "
Expand All @@ -66,7 +63,6 @@ exports[`ui/MessageContent should do a snapshot test of the MessageContent DOM 1
</span>
<span
class="sendbird-message-content__middle__body-container__created-at right sendbird-label sendbird-label--caption-3 sendbird-label--color-onbackground-2"
data-testid=""
>
mock-date
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ exports[`ui/MessageSearchFileItem should do a snapshot test of the MessageSearch
>
<span
class="sendbird-message-search-file-item__right__sender-name sendbird-label sendbird-label--subtitle-2 sendbird-label--color-onbackground-1"
data-testid=""
>
ME
</span>
Expand All @@ -47,7 +46,6 @@ exports[`ui/MessageSearchFileItem should do a snapshot test of the MessageSearch
>
<div
class=" sendbird-icon sendbird-icon-file-document sendbird-icon-color--primary"
data-testid=""
role="button"
style="width: 18px; min-width: 18px; height: 18px; min-height: 18px;"
tabindex="0"
Expand All @@ -57,15 +55,13 @@ exports[`ui/MessageSearchFileItem should do a snapshot test of the MessageSearch
</div>
<span
class="sendbird-message-search-file-item__right__content__url sendbird-label sendbird-label--body-2 sendbird-label--color-onbackground-1"
data-testid=""
>
72b35fef-acda-4e32-123323456789973567890dfvgbhnjmkiytdxbna0e4-37e1226b0615.test
</span>
</div>
</div>
<span
class="sendbird-message-search-file-item__message-created-at sendbird-label sendbird-label--caption-3 sendbird-label--color-onbackground-2"
data-testid=""
>
2020/1/23
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,16 @@ exports[`ui/MessageSearchItem should do a snapshot test of the MessageSearchItem
>
<span
class="sendbird-message-search-item__right__sender-name sendbird-label sendbird-label--subtitle-2 sendbird-label--color-onbackground-1"
data-testid=""
>
Sravan
</span>
<span
class="sendbird-message-search-item__right__message-text sendbird-label sendbird-label--body-2 sendbird-label--color-onbackground-3"
data-testid=""
>
Hello My name is SendBird.
</span>
<span
class="sendbird-message-search-item__right__message-created-at sendbird-label sendbird-label--caption-3 sendbird-label--color-onbackground-2"
data-testid=""
>
2020/1/23
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ exports[`ui/MessageStatus should do a snapshot test of the failed MessageStatus
>
<div
class="sendbird-message-status__icon sendbird-icon sendbird-icon-error sendbird-icon-color--error"
<<<<<<< HEAD
=======
data-testid="sendbird-message-status-icon"
>>>>>>> f152fac6 (update snapshots)
role="button"
style="width: 16px; min-width: 16px; height: 16px; min-height: 16px;"
tabindex="0"
Expand All @@ -52,10 +49,7 @@ exports[`ui/MessageStatus should do a snapshot test of the failed MessageStatus
>
<div
class="sendbird-message-status__icon sendbird-icon sendbird-icon-error sendbird-icon-color--error"
<<<<<<< HEAD
=======
data-testid="sendbird-message-status-icon"
>>>>>>> f152fac6 (update snapshots)
role="button"
style="width: 16px; min-width: 16px; height: 16px; min-height: 16px;"
tabindex="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ exports[`ui/OGMessageItemBody should do a snapshot test of the OGMessageItemBody
>
<span
class="sendbird-label sendbird-label--body-1 sendbird-label--color-onbackground-1"
data-testid=""
>
<div
class="sendbird-og-message-item-body__text-bubble"
Expand Down Expand Up @@ -38,19 +37,16 @@ exports[`ui/OGMessageItemBody should do a snapshot test of the OGMessageItemBody
>
<span
class="sendbird-og-message-item-body__description__title sendbird-label sendbird-label--subtitle-2 sendbird-label--color-onbackground-1"
data-testid=""
>
example-text
</span>
<span
class="sendbird-og-message-item-body__description__description sendbird-label sendbird-label--body-2 sendbird-label--color-onbackground-1"
data-testid=""
>
example-text
</span>
<span
class="sendbird-og-message-item-body__description__url sendbird-label sendbird-label--caption-3 sendbird-label--color-onbackground-2"
data-testid=""
>
example-text
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ exports[`OpenChannelAdminMessage should do a snapshot test of the OpenChannelAdm
>
<span
class="sendbird-openchannel-admin-message__text sendbird-label sendbird-label--caption-2 sendbird-label--color-onbackground-2"
data-testid=""
>
Hello I am Admin
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ exports[`ui/OpenchannelConversationHeader should do a snapshot test of the Openc
</div>
<span
class="sendbird-openchannel-conversation-header__left__title sendbird-label sendbird-label--h-2 sendbird-label--color-onbackground-1"
data-testid=""
>
Open Channel Title
</span>
<span
class="sendbird-openchannel-conversation-header__left__sub-title sendbird-label sendbird-label--body-2 sendbird-label--color-onbackground-2"
data-testid=""
>
Open Channel Subtitle
</span>
Expand All @@ -55,7 +53,6 @@ exports[`ui/OpenchannelConversationHeader should do a snapshot test of the Openc
>
<div
class=" sendbird-icon sendbird-icon-members sendbird-icon-color--primary"
data-testid=""
role="button"
style="width: 24px; min-width: 24px; height: 24px; min-height: 24px;"
tabindex="0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@ exports[`ui/OpenchannelFileMessage should do a snapshot test of the OpenchannelF
>
<span
class="sendbird-openchannel-file-message__right__title__sender-name sendbird-label sendbird-label--caption-2 sendbird-label--color-onbackground-2"
data-testid=""
>
ME
</span>
<span
class="sendbird-openchannel-file-message__right__title__sent-at sendbird-label sendbird-label--caption-3 sendbird-label--color-onbackground-3"
data-testid=""
>
mock-date
</span>
Expand All @@ -59,7 +57,6 @@ exports[`ui/OpenchannelFileMessage should do a snapshot test of the OpenchannelF
>
<div
class="sendbird-openchannel-file-message__right__body__icon sendbird-icon sendbird-icon-file-document sendbird-icon-color--primary"
data-testid=""
role="button"
style="width: 48px; min-width: 48px; height: 48px; min-height: 48px;"
tabindex="0"
Expand All @@ -73,7 +70,6 @@ exports[`ui/OpenchannelFileMessage should do a snapshot test of the OpenchannelF
>
<span
class="sendbird-label sendbird-label--body-1 sendbird-label--color-onbackground-1"
data-testid=""
>
72b35fef-acda-4e32-...4-37e1226b0615.pdf
</span>
Expand All @@ -97,7 +93,6 @@ exports[`ui/OpenchannelFileMessage should do a snapshot test of the OpenchannelF
>
<div
class=" sendbird-icon sendbird-icon-more "
data-testid=""
role="button"
style="width: 24px; min-width: 24px; height: 24px; min-height: 24px;"
tabindex="0"
Expand Down

0 comments on commit 8bd113d

Please sign in to comment.