Skip to content

Commit

Permalink
chore: Updates broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Katie George committed Oct 22, 2024
1 parent b57dcff commit 54577a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ exports[`test-utils selectors 1`] = `
"awsui_file-option-thumbnail-image_ezgb4",
"awsui_hints_1ubbm",
"awsui_root_1ubbm",
"awsui_upload-button_4xu1k",
"awsui_upload-input_4xu1k",
],
"flashbar": [
"awsui_action-button_1q84n",
Expand Down Expand Up @@ -336,6 +334,9 @@ exports[`test-utils selectors 1`] = `
"awsui_description_1wepg",
"awsui_disabled_15o6u",
"awsui_dropdown_qwoo0",
"awsui_file-input-button_181f9",
"awsui_file-input-container_181f9",
"awsui_file-input_181f9",
"awsui_filter-container_z5mul",
"awsui_filtering-match-highlight_1p2cx",
"awsui_handle_sdha6",
Expand Down
4 changes: 1 addition & 3 deletions src/internal/components/file-input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { warnOnce } from '@cloudscape-design/component-toolkit/internal';

import InternalButton from '../../../button/internal';
import { useFormFieldContext } from '../../../contexts/form-field';
import { getBaseProps } from '../../base-component';
import ScreenreaderOnly from '../../components/screenreader-only';
import { fireNonCancelableEvent } from '../../events';
import checkControlled from '../../hooks/check-controlled';
Expand Down Expand Up @@ -41,7 +40,6 @@ const InternalFileInput = React.forwardRef(
const formFieldContext = useFormFieldContext(restProps);
const selfControlId = useUniqueId('upload-input');
const controlId = formFieldContext.controlId ?? selfControlId;
const baseProps = getBaseProps(restProps);

useForwardFocus(ref, uploadInputRef);

Expand Down Expand Up @@ -88,7 +86,7 @@ const InternalFileInput = React.forwardRef(
}, [value]);

return (
<div {...baseProps} className={clsx(baseProps.className, styles['file-input-container'])}>
<div className={clsx(styles['file-input-container'])}>
{/* This is the actual interactive and accessible file-upload element. */}
{/* It is visually hidden to achieve the desired UX design. */}
<input
Expand Down

0 comments on commit 54577a6

Please sign in to comment.