feat: Make file input public #10723
Annotations
4 errors
Run Unit Tests:
src/__tests__/snapshot-tests/test-utils-selectors.test.tsx#L32
expect(received).toMatchSnapshot()
Snapshot name: `test-utils selectors 1`
- Snapshot - 2
+ Received + 0
@@ -333,12 +333,10 @@
"awsui_control_1wepg",
"awsui_description_1p2cx",
"awsui_description_1wepg",
"awsui_disabled_15o6u",
"awsui_dropdown_qwoo0",
- "awsui_file-input-button_181f9",
- "awsui_file-input_181f9",
"awsui_file-option-last-modified_ofwwb",
"awsui_file-option-name_ofwwb",
"awsui_file-option-size_ofwwb",
"awsui_file-option-thumbnail_ofwwb",
"awsui_filter-container_z5mul",
at Object.<anonymous> (src/__tests__/snapshot-tests/test-utils-selectors.test.tsx:32:32)
|
Run Unit Tests:
src/__tests__/snapshot-tests/test-utils-wrappers.test.tsx#L21
expect(received).toMatchSnapshot()
Snapshot name: `Generate test utils ElementWrapper dom ElementWrapper matches the snapshot 1`
- Snapshot - 0
+ Received + 11
@@ -112,10 +112,14 @@
import ExpandableSectionWrapper from './expandable-section';
export { ExpandableSectionWrapper };
+ import FileInputWrapper from './file-input';
+ export { FileInputWrapper };
+
+
import FileUploadWrapper from './file-upload';
export { FileUploadWrapper };
import FlashbarWrapper from './flashbar';
@@ -333,10 +337,11 @@
findDateInput(selector?: string): DateInputWrapper | null;
findDatePicker(selector?: string): DatePickerWrapper | null;
findDateRangePicker(selector?: string): DateRangePickerWrapper | null;
findDrawer(selector?: string): DrawerWrapper | null;
findExpandableSection(selector?: string): ExpandableSectionWrapper | null;
+ findFileInput(selector?: string): FileInputWrapper | null;
findFileUpload(selector?: string): FileUploadWrapper | null;
findFlashbar(selector?: string): FlashbarWrapper | null;
findForm(selector?: string): FormWrapper | null;
findFormField(selector?: string): FormFieldWrapper | null;
findGrid(selector?: string): GridWrapper | null;
@@ -550,10 +555,16 @@
ElementWrapper.prototype.findExpandableSection = function(selector) {
const rootSelector = `.${ExpandableSectionWrapper.rootSelector}`;
// casting to 'any' is needed to avoid this issue with generics
// https://github.com/microsoft/TypeScript/issues/29132
return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, ExpandableSectionWrapper);
+ };
+ ElementWrapper.prototype.findFileInput = function(selector) {
+ const rootSelector = `.${FileInputWrapper.rootSelector}`;
+ // casting to 'any' is needed to avoid this issue with generics
+ // https://github.com/microsoft/TypeScript/issues/29132
+ return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, FileInputWrapper);
};
ElementWrapper.prototype.findFileUpload = function(selector) {
const rootSelector = `.${FileUploadWrapper.rootSelector}`;
// casting to 'any' is needed to avoid this issue with generics
// https://github.com/microsoft/TypeScript/issues/29132
at src/__tests__/snapshot-tests/test-utils-wrappers.test.tsx:21:24
|
Run Unit Tests:
src/__tests__/snapshot-tests/test-utils-wrappers.test.tsx#L21
expect(received).toMatchSnapshot()
Snapshot name: `Generate test utils ElementWrapper selectors ElementWrapper matches the snapshot 1`
- Snapshot - 0
+ Received + 11
@@ -112,10 +112,14 @@
import ExpandableSectionWrapper from './expandable-section';
export { ExpandableSectionWrapper };
+ import FileInputWrapper from './file-input';
+ export { FileInputWrapper };
+
+
import FileUploadWrapper from './file-upload';
export { FileUploadWrapper };
import FlashbarWrapper from './flashbar';
@@ -333,10 +337,11 @@
findDateInput(selector?: string): DateInputWrapper;
findDatePicker(selector?: string): DatePickerWrapper;
findDateRangePicker(selector?: string): DateRangePickerWrapper;
findDrawer(selector?: string): DrawerWrapper;
findExpandableSection(selector?: string): ExpandableSectionWrapper;
+ findFileInput(selector?: string): FileInputWrapper;
findFileUpload(selector?: string): FileUploadWrapper;
findFlashbar(selector?: string): FlashbarWrapper;
findForm(selector?: string): FormWrapper;
findFormField(selector?: string): FormFieldWrapper;
findGrid(selector?: string): GridWrapper;
@@ -550,10 +555,16 @@
ElementWrapper.prototype.findExpandableSection = function(selector) {
const rootSelector = `.${ExpandableSectionWrapper.rootSelector}`;
// casting to 'any' is needed to avoid this issue with generics
// https://github.com/microsoft/TypeScript/issues/29132
return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, ExpandableSectionWrapper);
+ };
+ ElementWrapper.prototype.findFileInput = function(selector) {
+ const rootSelector = `.${FileInputWrapper.rootSelector}`;
+ // casting to 'any' is needed to avoid this issue with generics
+ // https://github.com/microsoft/TypeScript/issues/29132
+ return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, FileInputWrapper);
};
ElementWrapper.prototype.findFileUpload = function(selector) {
const rootSelector = `.${FileUploadWrapper.rootSelector}`;
// casting to 'any' is needed to avoid this issue with generics
// https://github.com/microsoft/TypeScript/issues/29132
at src/__tests__/snapshot-tests/test-utils-wrappers.test.tsx:21:24
|
Run Unit Tests
Process completed with exit code 1.
|
Loading