diff --git a/tdrive/frontend/src/app/atoms/avatar/index.tsx b/tdrive/frontend/src/app/atoms/avatar/index.tsx index a8a09efa..961370e9 100644 --- a/tdrive/frontend/src/app/atoms/avatar/index.tsx +++ b/tdrive/frontend/src/app/atoms/avatar/index.tsx @@ -13,6 +13,7 @@ interface AvatarProps extends React.InputHTMLAttributes { icon?: JSX.Element | false; title?: string; nogradient?: boolean; + testClassId?: string; } const sizes = { xl: 24, lg: 14, md: 10, sm: 9, xs: 6 }; @@ -68,12 +69,13 @@ export default function Avatar(props: AvatarProps) { className += ' '; return (
{props.icon} @@ -83,18 +85,18 @@ export default function Avatar(props: AvatarProps) { if (props.avatar) { return ( -
+
{props.title}
); } return ( -
+
{letters.toUpperCase()}
); diff --git a/tdrive/frontend/src/app/atoms/button/button.tsx b/tdrive/frontend/src/app/atoms/button/button.tsx index 791fdfc8..e789e865 100644 --- a/tdrive/frontend/src/app/atoms/button/button.tsx +++ b/tdrive/frontend/src/app/atoms/button/button.tsx @@ -59,6 +59,8 @@ export const Button = (props: ButtonProps) => { else className = className + ' w-9 !p-0 justify-center'; } + const testId = props.testClassId ? `testid:${props.testClassId}` : ''; + return ( diff --git a/tdrive/frontend/src/app/components/search-popup/parts/result-context.tsx b/tdrive/frontend/src/app/components/search-popup/parts/result-context.tsx index 2376aa2e..f0452427 100644 --- a/tdrive/frontend/src/app/components/search-popup/parts/result-context.tsx +++ b/tdrive/frontend/src/app/components/search-popup/parts/result-context.tsx @@ -4,7 +4,7 @@ import { UserType } from '@features/users/types/user'; export default ({ user }: { user?: UserType }) => { return ( -
+
{!!user && <>{UsersService.getFullName(user)}}
); diff --git a/tdrive/frontend/src/app/components/search-popup/search-input.tsx b/tdrive/frontend/src/app/components/search-popup/search-input.tsx index b411bf55..cfedd404 100755 --- a/tdrive/frontend/src/app/components/search-popup/search-input.tsx +++ b/tdrive/frontend/src/app/components/search-popup/search-input.tsx @@ -38,6 +38,7 @@ export const SearchInput = () => { value={input.query} className={className} placeholder={Languages.t('scenes.app.mainview.quick_search_placeholder')} + testClassId="search-input-quick-search" /> )} /> diff --git a/tdrive/frontend/src/app/components/search-popup/search-popup.tsx b/tdrive/frontend/src/app/components/search-popup/search-popup.tsx index 0c28421a..dcd2cce7 100755 --- a/tdrive/frontend/src/app/components/search-popup/search-popup.tsx +++ b/tdrive/frontend/src/app/components/search-popup/search-popup.tsx @@ -8,7 +8,7 @@ export default () => { const { open, setOpen } = useSearchModal(); return ( - setOpen(false)} className="sm:w-[80vw] sm:max-w-4xl"> + setOpen(false)} className="sm:w-[80vw] sm:max-w-4xl testid:search-popup"> ); diff --git a/tdrive/frontend/src/app/components/search-popup/tabs/drive.tsx b/tdrive/frontend/src/app/components/search-popup/tabs/drive.tsx index 9301e939..61e5f3e8 100644 --- a/tdrive/frontend/src/app/components/search-popup/tabs/drive.tsx +++ b/tdrive/frontend/src/app/components/search-popup/tabs/drive.tsx @@ -16,7 +16,7 @@ export default () => { return (
{!!isRecent && ( - + {Languages.t('components.searchpopup.recent_files')} )} diff --git a/tdrive/frontend/src/app/components/uploads/upload-zone.tsx b/tdrive/frontend/src/app/components/uploads/upload-zone.tsx index ccb1115a..ba06bce8 100755 --- a/tdrive/frontend/src/app/components/uploads/upload-zone.tsx +++ b/tdrive/frontend/src/app/components/uploads/upload-zone.tsx @@ -191,7 +191,7 @@ export default class UploadZone extends React.Component {
node && (this.node = node)} style={this.props.style} - className={classNames('upload_drop_zone', this.props.className, `testid:${this.props.testClassId}`)} + className={classNames('upload_drop_zone', this.props.className, this.props.testClassId ? `testid:${this.props.testClassId}` : '')} onClick={() => { if (!this.props.disableClick) { this.open(); diff --git a/tdrive/frontend/src/app/views/client/body/drive/components/access-level-dropdown.tsx b/tdrive/frontend/src/app/views/client/body/drive/components/access-level-dropdown.tsx index 825cba64..3fe6fcfd 100644 --- a/tdrive/frontend/src/app/views/client/body/drive/components/access-level-dropdown.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/components/access-level-dropdown.tsx @@ -40,11 +40,14 @@ export const AccessLevelDropdown = ({ }) => { const createOption = (level: DriveFileAccessLevelOrRemove) => !hiddenLevels?.includes(level) && ; + + const testId = testClassId ? `testid:${testClassId}` : ''; + return (