From b527b418e60d754a920b285287e1a30e4816412e Mon Sep 17 00:00:00 2001 From: Joan Perals Tresserra Date: Mon, 23 Mar 2026 17:12:31 +0100 Subject: [PATCH] chore: Update test utils wrapper --- .../test-utils-wrappers.test.tsx.snap | 1232 +++++++++++++++++ 1 file changed, 1232 insertions(+) diff --git a/src/__tests__/snapshot-tests/__snapshots__/test-utils-wrappers.test.tsx.snap b/src/__tests__/snapshot-tests/__snapshots__/test-utils-wrappers.test.tsx.snap index 35b13b6618..63813e2f81 100644 --- a/src/__tests__/snapshot-tests/__snapshots__/test-utils-wrappers.test.tsx.snap +++ b/src/__tests__/snapshot-tests/__snapshots__/test-utils-wrappers.test.tsx.snap @@ -210,6 +210,15 @@ findAlert(selector?: string): AlertWrapper | null; * @returns {Array} */ findAllAlerts(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Alert for the current element, + * or the element itself if it is an instance of Alert. + * If no Alert is found, returns \`null\`. + * + * @returns {AlertWrapper | null} + */ +findClosestAlert(): AlertWrapper | null; /** * Returns the wrapper of the first AnchorNavigation that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first AnchorNavigation. @@ -229,6 +238,15 @@ findAnchorNavigation(selector?: string): AnchorNavigationWrapper | null; * @returns {Array} */ findAllAnchorNavigations(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent AnchorNavigation for the current element, + * or the element itself if it is an instance of AnchorNavigation. + * If no AnchorNavigation is found, returns \`null\`. + * + * @returns {AnchorNavigationWrapper | null} + */ +findClosestAnchorNavigation(): AnchorNavigationWrapper | null; /** * Returns the wrapper of the first Annotation that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Annotation. @@ -248,6 +266,15 @@ findAnnotation(selector?: string): AnnotationWrapper | null; * @returns {Array} */ findAllAnnotations(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Annotation for the current element, + * or the element itself if it is an instance of Annotation. + * If no Annotation is found, returns \`null\`. + * + * @returns {AnnotationWrapper | null} + */ +findClosestAnnotation(): AnnotationWrapper | null; /** * Returns the wrapper of the first AppLayout that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first AppLayout. @@ -267,6 +294,15 @@ findAppLayout(selector?: string): AppLayoutWrapper | null; * @returns {Array} */ findAllAppLayouts(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent AppLayout for the current element, + * or the element itself if it is an instance of AppLayout. + * If no AppLayout is found, returns \`null\`. + * + * @returns {AppLayoutWrapper | null} + */ +findClosestAppLayout(): AppLayoutWrapper | null; /** * Returns the wrapper of the first AppLayoutToolbar that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first AppLayoutToolbar. @@ -286,6 +322,15 @@ findAppLayoutToolbar(selector?: string): AppLayoutToolbarWrapper | null; * @returns {Array} */ findAllAppLayoutToolbars(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent AppLayoutToolbar for the current element, + * or the element itself if it is an instance of AppLayoutToolbar. + * If no AppLayoutToolbar is found, returns \`null\`. + * + * @returns {AppLayoutToolbarWrapper | null} + */ +findClosestAppLayoutToolbar(): AppLayoutToolbarWrapper | null; /** * Returns the wrapper of the first AreaChart that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first AreaChart. @@ -305,6 +350,15 @@ findAreaChart(selector?: string): AreaChartWrapper | null; * @returns {Array} */ findAllAreaCharts(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent AreaChart for the current element, + * or the element itself if it is an instance of AreaChart. + * If no AreaChart is found, returns \`null\`. + * + * @returns {AreaChartWrapper | null} + */ +findClosestAreaChart(): AreaChartWrapper | null; /** * Returns the wrapper of the first AttributeEditor that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first AttributeEditor. @@ -324,6 +378,15 @@ findAttributeEditor(selector?: string): AttributeEditorWrapper | null; * @returns {Array} */ findAllAttributeEditors(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent AttributeEditor for the current element, + * or the element itself if it is an instance of AttributeEditor. + * If no AttributeEditor is found, returns \`null\`. + * + * @returns {AttributeEditorWrapper | null} + */ +findClosestAttributeEditor(): AttributeEditorWrapper | null; /** * Returns the wrapper of the first Autosuggest that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Autosuggest. @@ -343,6 +406,15 @@ findAutosuggest(selector?: string): AutosuggestWrapper | null; * @returns {Array} */ findAllAutosuggests(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Autosuggest for the current element, + * or the element itself if it is an instance of Autosuggest. + * If no Autosuggest is found, returns \`null\`. + * + * @returns {AutosuggestWrapper | null} + */ +findClosestAutosuggest(): AutosuggestWrapper | null; /** * Returns the wrapper of the first Badge that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Badge. @@ -362,6 +434,15 @@ findBadge(selector?: string): BadgeWrapper | null; * @returns {Array} */ findAllBadges(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Badge for the current element, + * or the element itself if it is an instance of Badge. + * If no Badge is found, returns \`null\`. + * + * @returns {BadgeWrapper | null} + */ +findClosestBadge(): BadgeWrapper | null; /** * Returns the wrapper of the first BarChart that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first BarChart. @@ -381,6 +462,15 @@ findBarChart(selector?: string): BarChartWrapper | null; * @returns {Array} */ findAllBarCharts(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent BarChart for the current element, + * or the element itself if it is an instance of BarChart. + * If no BarChart is found, returns \`null\`. + * + * @returns {BarChartWrapper | null} + */ +findClosestBarChart(): BarChartWrapper | null; /** * Returns the wrapper of the first Box that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Box. @@ -400,6 +490,15 @@ findBox(selector?: string): BoxWrapper | null; * @returns {Array} */ findAllBoxes(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Box for the current element, + * or the element itself if it is an instance of Box. + * If no Box is found, returns \`null\`. + * + * @returns {BoxWrapper | null} + */ +findClosestBox(): BoxWrapper | null; /** * Returns the wrapper of the first BreadcrumbGroup that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first BreadcrumbGroup. @@ -419,6 +518,15 @@ findBreadcrumbGroup(selector?: string): BreadcrumbGroupWrapper | null; * @returns {Array} */ findAllBreadcrumbGroups(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent BreadcrumbGroup for the current element, + * or the element itself if it is an instance of BreadcrumbGroup. + * If no BreadcrumbGroup is found, returns \`null\`. + * + * @returns {BreadcrumbGroupWrapper | null} + */ +findClosestBreadcrumbGroup(): BreadcrumbGroupWrapper | null; /** * Returns the wrapper of the first Button that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Button. @@ -438,6 +546,15 @@ findButton(selector?: string): ButtonWrapper | null; * @returns {Array} */ findAllButtons(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Button for the current element, + * or the element itself if it is an instance of Button. + * If no Button is found, returns \`null\`. + * + * @returns {ButtonWrapper | null} + */ +findClosestButton(): ButtonWrapper | null; /** * Returns the wrapper of the first ButtonDropdown that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first ButtonDropdown. @@ -457,6 +574,15 @@ findButtonDropdown(selector?: string): ButtonDropdownWrapper | null; * @returns {Array} */ findAllButtonDropdowns(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent ButtonDropdown for the current element, + * or the element itself if it is an instance of ButtonDropdown. + * If no ButtonDropdown is found, returns \`null\`. + * + * @returns {ButtonDropdownWrapper | null} + */ +findClosestButtonDropdown(): ButtonDropdownWrapper | null; /** * Returns the wrapper of the first ButtonGroup that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first ButtonGroup. @@ -476,6 +602,15 @@ findButtonGroup(selector?: string): ButtonGroupWrapper | null; * @returns {Array} */ findAllButtonGroups(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent ButtonGroup for the current element, + * or the element itself if it is an instance of ButtonGroup. + * If no ButtonGroup is found, returns \`null\`. + * + * @returns {ButtonGroupWrapper | null} + */ +findClosestButtonGroup(): ButtonGroupWrapper | null; /** * Returns the wrapper of the first Calendar that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Calendar. @@ -495,6 +630,15 @@ findCalendar(selector?: string): CalendarWrapper | null; * @returns {Array} */ findAllCalendars(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Calendar for the current element, + * or the element itself if it is an instance of Calendar. + * If no Calendar is found, returns \`null\`. + * + * @returns {CalendarWrapper | null} + */ +findClosestCalendar(): CalendarWrapper | null; /** * Returns the wrapper of the first Cards that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Cards. @@ -514,6 +658,15 @@ findCards(selector?: string): CardsWrapper | null; * @returns {Array} */ findAllCards(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Cards for the current element, + * or the element itself if it is an instance of Cards. + * If no Cards is found, returns \`null\`. + * + * @returns {CardsWrapper | null} + */ +findClosestCards(): CardsWrapper | null; /** * Returns the wrapper of the first Checkbox that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Checkbox. @@ -533,6 +686,15 @@ findCheckbox(selector?: string): CheckboxWrapper | null; * @returns {Array} */ findAllCheckboxes(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Checkbox for the current element, + * or the element itself if it is an instance of Checkbox. + * If no Checkbox is found, returns \`null\`. + * + * @returns {CheckboxWrapper | null} + */ +findClosestCheckbox(): CheckboxWrapper | null; /** * Returns the wrapper of the first CodeEditor that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first CodeEditor. @@ -552,6 +714,15 @@ findCodeEditor(selector?: string): CodeEditorWrapper | null; * @returns {Array} */ findAllCodeEditors(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent CodeEditor for the current element, + * or the element itself if it is an instance of CodeEditor. + * If no CodeEditor is found, returns \`null\`. + * + * @returns {CodeEditorWrapper | null} + */ +findClosestCodeEditor(): CodeEditorWrapper | null; /** * Returns the wrapper of the first CollectionPreferences that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first CollectionPreferences. @@ -571,6 +742,15 @@ findCollectionPreferences(selector?: string): CollectionPreferencesWrapper | nul * @returns {Array} */ findAllCollectionPreferences(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent CollectionPreferences for the current element, + * or the element itself if it is an instance of CollectionPreferences. + * If no CollectionPreferences is found, returns \`null\`. + * + * @returns {CollectionPreferencesWrapper | null} + */ +findClosestCollectionPreferences(): CollectionPreferencesWrapper | null; /** * Returns the wrapper of the first ColumnLayout that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first ColumnLayout. @@ -590,6 +770,15 @@ findColumnLayout(selector?: string): ColumnLayoutWrapper | null; * @returns {Array} */ findAllColumnLayouts(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent ColumnLayout for the current element, + * or the element itself if it is an instance of ColumnLayout. + * If no ColumnLayout is found, returns \`null\`. + * + * @returns {ColumnLayoutWrapper | null} + */ +findClosestColumnLayout(): ColumnLayoutWrapper | null; /** * Returns the wrapper of the first Container that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Container. @@ -609,6 +798,15 @@ findContainer(selector?: string): ContainerWrapper | null; * @returns {Array} */ findAllContainers(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Container for the current element, + * or the element itself if it is an instance of Container. + * If no Container is found, returns \`null\`. + * + * @returns {ContainerWrapper | null} + */ +findClosestContainer(): ContainerWrapper | null; /** * Returns the wrapper of the first ContentLayout that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first ContentLayout. @@ -628,6 +826,15 @@ findContentLayout(selector?: string): ContentLayoutWrapper | null; * @returns {Array} */ findAllContentLayouts(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent ContentLayout for the current element, + * or the element itself if it is an instance of ContentLayout. + * If no ContentLayout is found, returns \`null\`. + * + * @returns {ContentLayoutWrapper | null} + */ +findClosestContentLayout(): ContentLayoutWrapper | null; /** * Returns the wrapper of the first CopyToClipboard that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first CopyToClipboard. @@ -647,6 +854,15 @@ findCopyToClipboard(selector?: string): CopyToClipboardWrapper | null; * @returns {Array} */ findAllCopyToClipboards(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent CopyToClipboard for the current element, + * or the element itself if it is an instance of CopyToClipboard. + * If no CopyToClipboard is found, returns \`null\`. + * + * @returns {CopyToClipboardWrapper | null} + */ +findClosestCopyToClipboard(): CopyToClipboardWrapper | null; /** * Returns the wrapper of the first DateInput that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first DateInput. @@ -666,6 +882,15 @@ findDateInput(selector?: string): DateInputWrapper | null; * @returns {Array} */ findAllDateInputs(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent DateInput for the current element, + * or the element itself if it is an instance of DateInput. + * If no DateInput is found, returns \`null\`. + * + * @returns {DateInputWrapper | null} + */ +findClosestDateInput(): DateInputWrapper | null; /** * Returns the wrapper of the first DatePicker that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first DatePicker. @@ -685,6 +910,15 @@ findDatePicker(selector?: string): DatePickerWrapper | null; * @returns {Array} */ findAllDatePickers(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent DatePicker for the current element, + * or the element itself if it is an instance of DatePicker. + * If no DatePicker is found, returns \`null\`. + * + * @returns {DatePickerWrapper | null} + */ +findClosestDatePicker(): DatePickerWrapper | null; /** * Returns the wrapper of the first DateRangePicker that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first DateRangePicker. @@ -704,6 +938,15 @@ findDateRangePicker(selector?: string): DateRangePickerWrapper | null; * @returns {Array} */ findAllDateRangePickers(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent DateRangePicker for the current element, + * or the element itself if it is an instance of DateRangePicker. + * If no DateRangePicker is found, returns \`null\`. + * + * @returns {DateRangePickerWrapper | null} + */ +findClosestDateRangePicker(): DateRangePickerWrapper | null; /** * Returns the wrapper of the first Drawer that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Drawer. @@ -723,6 +966,15 @@ findDrawer(selector?: string): DrawerWrapper | null; * @returns {Array} */ findAllDrawers(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Drawer for the current element, + * or the element itself if it is an instance of Drawer. + * If no Drawer is found, returns \`null\`. + * + * @returns {DrawerWrapper | null} + */ +findClosestDrawer(): DrawerWrapper | null; /** * Returns the wrapper of the first ErrorBoundary that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first ErrorBoundary. @@ -742,6 +994,15 @@ findErrorBoundary(selector?: string): ErrorBoundaryWrapper | null; * @returns {Array} */ findAllErrorBoundaries(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent ErrorBoundary for the current element, + * or the element itself if it is an instance of ErrorBoundary. + * If no ErrorBoundary is found, returns \`null\`. + * + * @returns {ErrorBoundaryWrapper | null} + */ +findClosestErrorBoundary(): ErrorBoundaryWrapper | null; /** * Returns the wrapper of the first ExpandableSection that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first ExpandableSection. @@ -761,6 +1022,15 @@ findExpandableSection(selector?: string): ExpandableSectionWrapper | null; * @returns {Array} */ findAllExpandableSections(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent ExpandableSection for the current element, + * or the element itself if it is an instance of ExpandableSection. + * If no ExpandableSection is found, returns \`null\`. + * + * @returns {ExpandableSectionWrapper | null} + */ +findClosestExpandableSection(): ExpandableSectionWrapper | null; /** * Returns the wrapper of the first FileDropzone that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first FileDropzone. @@ -780,6 +1050,15 @@ findFileDropzone(selector?: string): FileDropzoneWrapper | null; * @returns {Array} */ findAllFileDropzones(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent FileDropzone for the current element, + * or the element itself if it is an instance of FileDropzone. + * If no FileDropzone is found, returns \`null\`. + * + * @returns {FileDropzoneWrapper | null} + */ +findClosestFileDropzone(): FileDropzoneWrapper | null; /** * Returns the wrapper of the first FileInput that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first FileInput. @@ -799,6 +1078,15 @@ findFileInput(selector?: string): FileInputWrapper | null; * @returns {Array} */ findAllFileInputs(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent FileInput for the current element, + * or the element itself if it is an instance of FileInput. + * If no FileInput is found, returns \`null\`. + * + * @returns {FileInputWrapper | null} + */ +findClosestFileInput(): FileInputWrapper | null; /** * Returns the wrapper of the first FileTokenGroup that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first FileTokenGroup. @@ -818,6 +1106,15 @@ findFileTokenGroup(selector?: string): FileTokenGroupWrapper | null; * @returns {Array} */ findAllFileTokenGroups(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent FileTokenGroup for the current element, + * or the element itself if it is an instance of FileTokenGroup. + * If no FileTokenGroup is found, returns \`null\`. + * + * @returns {FileTokenGroupWrapper | null} + */ +findClosestFileTokenGroup(): FileTokenGroupWrapper | null; /** * Returns the wrapper of the first FileUpload that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first FileUpload. @@ -837,6 +1134,15 @@ findFileUpload(selector?: string): FileUploadWrapper | null; * @returns {Array} */ findAllFileUploads(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent FileUpload for the current element, + * or the element itself if it is an instance of FileUpload. + * If no FileUpload is found, returns \`null\`. + * + * @returns {FileUploadWrapper | null} + */ +findClosestFileUpload(): FileUploadWrapper | null; /** * Returns the wrapper of the first Flashbar that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Flashbar. @@ -856,6 +1162,15 @@ findFlashbar(selector?: string): FlashbarWrapper | null; * @returns {Array} */ findAllFlashbars(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Flashbar for the current element, + * or the element itself if it is an instance of Flashbar. + * If no Flashbar is found, returns \`null\`. + * + * @returns {FlashbarWrapper | null} + */ +findClosestFlashbar(): FlashbarWrapper | null; /** * Returns the wrapper of the first Form that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Form. @@ -875,6 +1190,15 @@ findForm(selector?: string): FormWrapper | null; * @returns {Array} */ findAllForms(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Form for the current element, + * or the element itself if it is an instance of Form. + * If no Form is found, returns \`null\`. + * + * @returns {FormWrapper | null} + */ +findClosestForm(): FormWrapper | null; /** * Returns the wrapper of the first FormField that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first FormField. @@ -894,6 +1218,15 @@ findFormField(selector?: string): FormFieldWrapper | null; * @returns {Array} */ findAllFormFields(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent FormField for the current element, + * or the element itself if it is an instance of FormField. + * If no FormField is found, returns \`null\`. + * + * @returns {FormFieldWrapper | null} + */ +findClosestFormField(): FormFieldWrapper | null; /** * Returns the wrapper of the first Grid that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Grid. @@ -913,6 +1246,15 @@ findGrid(selector?: string): GridWrapper | null; * @returns {Array} */ findAllGrids(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Grid for the current element, + * or the element itself if it is an instance of Grid. + * If no Grid is found, returns \`null\`. + * + * @returns {GridWrapper | null} + */ +findClosestGrid(): GridWrapper | null; /** * Returns the wrapper of the first Header that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Header. @@ -932,6 +1274,15 @@ findHeader(selector?: string): HeaderWrapper | null; * @returns {Array} */ findAllHeaders(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Header for the current element, + * or the element itself if it is an instance of Header. + * If no Header is found, returns \`null\`. + * + * @returns {HeaderWrapper | null} + */ +findClosestHeader(): HeaderWrapper | null; /** * Returns the wrapper of the first HelpPanel that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first HelpPanel. @@ -951,6 +1302,15 @@ findHelpPanel(selector?: string): HelpPanelWrapper | null; * @returns {Array} */ findAllHelpPanels(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent HelpPanel for the current element, + * or the element itself if it is an instance of HelpPanel. + * If no HelpPanel is found, returns \`null\`. + * + * @returns {HelpPanelWrapper | null} + */ +findClosestHelpPanel(): HelpPanelWrapper | null; /** * Returns the wrapper of the first Hotspot that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Hotspot. @@ -970,6 +1330,15 @@ findHotspot(selector?: string): HotspotWrapper | null; * @returns {Array} */ findAllHotspots(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Hotspot for the current element, + * or the element itself if it is an instance of Hotspot. + * If no Hotspot is found, returns \`null\`. + * + * @returns {HotspotWrapper | null} + */ +findClosestHotspot(): HotspotWrapper | null; /** * Returns the wrapper of the first Icon that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Icon. @@ -989,6 +1358,15 @@ findIcon(selector?: string): IconWrapper | null; * @returns {Array} */ findAllIcons(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Icon for the current element, + * or the element itself if it is an instance of Icon. + * If no Icon is found, returns \`null\`. + * + * @returns {IconWrapper | null} + */ +findClosestIcon(): IconWrapper | null; /** * Returns the wrapper of the first Input that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Input. @@ -1008,6 +1386,15 @@ findInput(selector?: string): InputWrapper | null; * @returns {Array} */ findAllInputs(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Input for the current element, + * or the element itself if it is an instance of Input. + * If no Input is found, returns \`null\`. + * + * @returns {InputWrapper | null} + */ +findClosestInput(): InputWrapper | null; /** * Returns the wrapper of the first KeyValuePairs that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first KeyValuePairs. @@ -1027,6 +1414,15 @@ findKeyValuePairs(selector?: string): KeyValuePairsWrapper | null; * @returns {Array} */ findAllKeyValuePairs(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent KeyValuePairs for the current element, + * or the element itself if it is an instance of KeyValuePairs. + * If no KeyValuePairs is found, returns \`null\`. + * + * @returns {KeyValuePairsWrapper | null} + */ +findClosestKeyValuePairs(): KeyValuePairsWrapper | null; /** * Returns the wrapper of the first LineChart that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first LineChart. @@ -1046,6 +1442,15 @@ findLineChart(selector?: string): LineChartWrapper | null; * @returns {Array} */ findAllLineCharts(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent LineChart for the current element, + * or the element itself if it is an instance of LineChart. + * If no LineChart is found, returns \`null\`. + * + * @returns {LineChartWrapper | null} + */ +findClosestLineChart(): LineChartWrapper | null; /** * Returns the wrapper of the first Link that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Link. @@ -1065,6 +1470,15 @@ findLink(selector?: string): LinkWrapper | null; * @returns {Array} */ findAllLinks(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Link for the current element, + * or the element itself if it is an instance of Link. + * If no Link is found, returns \`null\`. + * + * @returns {LinkWrapper | null} + */ +findClosestLink(): LinkWrapper | null; /** * Returns the wrapper of the first List that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first List. @@ -1084,6 +1498,15 @@ findList(selector?: string): ListWrapper | null; * @returns {Array} */ findAllLists(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent List for the current element, + * or the element itself if it is an instance of List. + * If no List is found, returns \`null\`. + * + * @returns {ListWrapper | null} + */ +findClosestList(): ListWrapper | null; /** * Returns the wrapper of the first LiveRegion that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first LiveRegion. @@ -1103,6 +1526,15 @@ findLiveRegion(selector?: string): LiveRegionWrapper | null; * @returns {Array} */ findAllLiveRegions(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent LiveRegion for the current element, + * or the element itself if it is an instance of LiveRegion. + * If no LiveRegion is found, returns \`null\`. + * + * @returns {LiveRegionWrapper | null} + */ +findClosestLiveRegion(): LiveRegionWrapper | null; /** * Returns the wrapper of the first MixedLineBarChart that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first MixedLineBarChart. @@ -1122,6 +1554,15 @@ findMixedLineBarChart(selector?: string): MixedLineBarChartWrapper | null; * @returns {Array} */ findAllMixedLineBarCharts(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent MixedLineBarChart for the current element, + * or the element itself if it is an instance of MixedLineBarChart. + * If no MixedLineBarChart is found, returns \`null\`. + * + * @returns {MixedLineBarChartWrapper | null} + */ +findClosestMixedLineBarChart(): MixedLineBarChartWrapper | null; /** * Returns the wrapper of the first Modal that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Modal. @@ -1141,6 +1582,15 @@ findModal(selector?: string): ModalWrapper | null; * @returns {Array} */ findAllModals(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Modal for the current element, + * or the element itself if it is an instance of Modal. + * If no Modal is found, returns \`null\`. + * + * @returns {ModalWrapper | null} + */ +findClosestModal(): ModalWrapper | null; /** * Returns the wrapper of the first Multiselect that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Multiselect. @@ -1160,6 +1610,15 @@ findMultiselect(selector?: string): MultiselectWrapper | null; * @returns {Array} */ findAllMultiselects(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Multiselect for the current element, + * or the element itself if it is an instance of Multiselect. + * If no Multiselect is found, returns \`null\`. + * + * @returns {MultiselectWrapper | null} + */ +findClosestMultiselect(): MultiselectWrapper | null; /** * Returns the wrapper of the first NavigableGroup that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first NavigableGroup. @@ -1179,6 +1638,15 @@ findNavigableGroup(selector?: string): NavigableGroupWrapper | null; * @returns {Array} */ findAllNavigableGroups(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent NavigableGroup for the current element, + * or the element itself if it is an instance of NavigableGroup. + * If no NavigableGroup is found, returns \`null\`. + * + * @returns {NavigableGroupWrapper | null} + */ +findClosestNavigableGroup(): NavigableGroupWrapper | null; /** * Returns the wrapper of the first Pagination that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Pagination. @@ -1198,6 +1666,15 @@ findPagination(selector?: string): PaginationWrapper | null; * @returns {Array} */ findAllPaginations(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Pagination for the current element, + * or the element itself if it is an instance of Pagination. + * If no Pagination is found, returns \`null\`. + * + * @returns {PaginationWrapper | null} + */ +findClosestPagination(): PaginationWrapper | null; /** * Returns the wrapper of the first PanelLayout that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first PanelLayout. @@ -1217,6 +1694,15 @@ findPanelLayout(selector?: string): PanelLayoutWrapper | null; * @returns {Array} */ findAllPanelLayouts(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent PanelLayout for the current element, + * or the element itself if it is an instance of PanelLayout. + * If no PanelLayout is found, returns \`null\`. + * + * @returns {PanelLayoutWrapper | null} + */ +findClosestPanelLayout(): PanelLayoutWrapper | null; /** * Returns the wrapper of the first PieChart that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first PieChart. @@ -1236,6 +1722,15 @@ findPieChart(selector?: string): PieChartWrapper | null; * @returns {Array} */ findAllPieCharts(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent PieChart for the current element, + * or the element itself if it is an instance of PieChart. + * If no PieChart is found, returns \`null\`. + * + * @returns {PieChartWrapper | null} + */ +findClosestPieChart(): PieChartWrapper | null; /** * Returns the wrapper of the first Popover that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Popover. @@ -1255,6 +1750,15 @@ findPopover(selector?: string): PopoverWrapper | null; * @returns {Array} */ findAllPopovers(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Popover for the current element, + * or the element itself if it is an instance of Popover. + * If no Popover is found, returns \`null\`. + * + * @returns {PopoverWrapper | null} + */ +findClosestPopover(): PopoverWrapper | null; /** * Returns the wrapper of the first ProgressBar that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first ProgressBar. @@ -1274,6 +1778,15 @@ findProgressBar(selector?: string): ProgressBarWrapper | null; * @returns {Array} */ findAllProgressBars(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent ProgressBar for the current element, + * or the element itself if it is an instance of ProgressBar. + * If no ProgressBar is found, returns \`null\`. + * + * @returns {ProgressBarWrapper | null} + */ +findClosestProgressBar(): ProgressBarWrapper | null; /** * Returns the wrapper of the first PromptInput that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first PromptInput. @@ -1293,6 +1806,15 @@ findPromptInput(selector?: string): PromptInputWrapper | null; * @returns {Array} */ findAllPromptInputs(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent PromptInput for the current element, + * or the element itself if it is an instance of PromptInput. + * If no PromptInput is found, returns \`null\`. + * + * @returns {PromptInputWrapper | null} + */ +findClosestPromptInput(): PromptInputWrapper | null; /** * Returns the wrapper of the first PropertyFilter that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first PropertyFilter. @@ -1312,6 +1834,15 @@ findPropertyFilter(selector?: string): PropertyFilterWrapper | null; * @returns {Array} */ findAllPropertyFilters(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent PropertyFilter for the current element, + * or the element itself if it is an instance of PropertyFilter. + * If no PropertyFilter is found, returns \`null\`. + * + * @returns {PropertyFilterWrapper | null} + */ +findClosestPropertyFilter(): PropertyFilterWrapper | null; /** * Returns the wrapper of the first RadioButton that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first RadioButton. @@ -1331,6 +1862,15 @@ findRadioButton(selector?: string): RadioButtonWrapper | null; * @returns {Array} */ findAllRadioButtons(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent RadioButton for the current element, + * or the element itself if it is an instance of RadioButton. + * If no RadioButton is found, returns \`null\`. + * + * @returns {RadioButtonWrapper | null} + */ +findClosestRadioButton(): RadioButtonWrapper | null; /** * Returns the wrapper of the first RadioGroup that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first RadioGroup. @@ -1350,6 +1890,15 @@ findRadioGroup(selector?: string): RadioGroupWrapper | null; * @returns {Array} */ findAllRadioGroups(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent RadioGroup for the current element, + * or the element itself if it is an instance of RadioGroup. + * If no RadioGroup is found, returns \`null\`. + * + * @returns {RadioGroupWrapper | null} + */ +findClosestRadioGroup(): RadioGroupWrapper | null; /** * Returns the wrapper of the first S3ResourceSelector that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first S3ResourceSelector. @@ -1369,6 +1918,15 @@ findS3ResourceSelector(selector?: string): S3ResourceSelectorWrapper | null; * @returns {Array} */ findAllS3ResourceSelectors(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent S3ResourceSelector for the current element, + * or the element itself if it is an instance of S3ResourceSelector. + * If no S3ResourceSelector is found, returns \`null\`. + * + * @returns {S3ResourceSelectorWrapper | null} + */ +findClosestS3ResourceSelector(): S3ResourceSelectorWrapper | null; /** * Returns the wrapper of the first SegmentedControl that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first SegmentedControl. @@ -1388,6 +1946,15 @@ findSegmentedControl(selector?: string): SegmentedControlWrapper | null; * @returns {Array} */ findAllSegmentedControls(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent SegmentedControl for the current element, + * or the element itself if it is an instance of SegmentedControl. + * If no SegmentedControl is found, returns \`null\`. + * + * @returns {SegmentedControlWrapper | null} + */ +findClosestSegmentedControl(): SegmentedControlWrapper | null; /** * Returns the wrapper of the first Select that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Select. @@ -1407,6 +1974,15 @@ findSelect(selector?: string): SelectWrapper | null; * @returns {Array} */ findAllSelects(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Select for the current element, + * or the element itself if it is an instance of Select. + * If no Select is found, returns \`null\`. + * + * @returns {SelectWrapper | null} + */ +findClosestSelect(): SelectWrapper | null; /** * Returns the wrapper of the first SideNavigation that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first SideNavigation. @@ -1426,6 +2002,15 @@ findSideNavigation(selector?: string): SideNavigationWrapper | null; * @returns {Array} */ findAllSideNavigations(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent SideNavigation for the current element, + * or the element itself if it is an instance of SideNavigation. + * If no SideNavigation is found, returns \`null\`. + * + * @returns {SideNavigationWrapper | null} + */ +findClosestSideNavigation(): SideNavigationWrapper | null; /** * Returns the wrapper of the first Slider that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Slider. @@ -1445,6 +2030,15 @@ findSlider(selector?: string): SliderWrapper | null; * @returns {Array} */ findAllSliders(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Slider for the current element, + * or the element itself if it is an instance of Slider. + * If no Slider is found, returns \`null\`. + * + * @returns {SliderWrapper | null} + */ +findClosestSlider(): SliderWrapper | null; /** * Returns the wrapper of the first SpaceBetween that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first SpaceBetween. @@ -1464,6 +2058,15 @@ findSpaceBetween(selector?: string): SpaceBetweenWrapper | null; * @returns {Array} */ findAllSpaceBetweens(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent SpaceBetween for the current element, + * or the element itself if it is an instance of SpaceBetween. + * If no SpaceBetween is found, returns \`null\`. + * + * @returns {SpaceBetweenWrapper | null} + */ +findClosestSpaceBetween(): SpaceBetweenWrapper | null; /** * Returns the wrapper of the first Spinner that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Spinner. @@ -1483,6 +2086,15 @@ findSpinner(selector?: string): SpinnerWrapper | null; * @returns {Array} */ findAllSpinners(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Spinner for the current element, + * or the element itself if it is an instance of Spinner. + * If no Spinner is found, returns \`null\`. + * + * @returns {SpinnerWrapper | null} + */ +findClosestSpinner(): SpinnerWrapper | null; /** * Returns the wrapper of the first SplitPanel that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first SplitPanel. @@ -1502,6 +2114,15 @@ findSplitPanel(selector?: string): SplitPanelWrapper | null; * @returns {Array} */ findAllSplitPanels(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent SplitPanel for the current element, + * or the element itself if it is an instance of SplitPanel. + * If no SplitPanel is found, returns \`null\`. + * + * @returns {SplitPanelWrapper | null} + */ +findClosestSplitPanel(): SplitPanelWrapper | null; /** * Returns the wrapper of the first StatusIndicator that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first StatusIndicator. @@ -1521,6 +2142,15 @@ findStatusIndicator(selector?: string): StatusIndicatorWrapper | null; * @returns {Array} */ findAllStatusIndicators(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent StatusIndicator for the current element, + * or the element itself if it is an instance of StatusIndicator. + * If no StatusIndicator is found, returns \`null\`. + * + * @returns {StatusIndicatorWrapper | null} + */ +findClosestStatusIndicator(): StatusIndicatorWrapper | null; /** * Returns the wrapper of the first Steps that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Steps. @@ -1540,6 +2170,15 @@ findSteps(selector?: string): StepsWrapper | null; * @returns {Array} */ findAllSteps(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Steps for the current element, + * or the element itself if it is an instance of Steps. + * If no Steps is found, returns \`null\`. + * + * @returns {StepsWrapper | null} + */ +findClosestSteps(): StepsWrapper | null; /** * Returns the wrapper of the first Table that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Table. @@ -1559,6 +2198,15 @@ findTable(selector?: string): TableWrapper | null; * @returns {Array} */ findAllTables(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Table for the current element, + * or the element itself if it is an instance of Table. + * If no Table is found, returns \`null\`. + * + * @returns {TableWrapper | null} + */ +findClosestTable(): TableWrapper | null; /** * Returns the wrapper of the first Tabs that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Tabs. @@ -1578,6 +2226,15 @@ findTabs(selector?: string): TabsWrapper | null; * @returns {Array} */ findAllTabs(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Tabs for the current element, + * or the element itself if it is an instance of Tabs. + * If no Tabs is found, returns \`null\`. + * + * @returns {TabsWrapper | null} + */ +findClosestTabs(): TabsWrapper | null; /** * Returns the wrapper of the first TagEditor that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first TagEditor. @@ -1597,6 +2254,15 @@ findTagEditor(selector?: string): TagEditorWrapper | null; * @returns {Array} */ findAllTagEditors(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent TagEditor for the current element, + * or the element itself if it is an instance of TagEditor. + * If no TagEditor is found, returns \`null\`. + * + * @returns {TagEditorWrapper | null} + */ +findClosestTagEditor(): TagEditorWrapper | null; /** * Returns the wrapper of the first TextContent that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first TextContent. @@ -1616,6 +2282,15 @@ findTextContent(selector?: string): TextContentWrapper | null; * @returns {Array} */ findAllTextContents(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent TextContent for the current element, + * or the element itself if it is an instance of TextContent. + * If no TextContent is found, returns \`null\`. + * + * @returns {TextContentWrapper | null} + */ +findClosestTextContent(): TextContentWrapper | null; /** * Returns the wrapper of the first TextFilter that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first TextFilter. @@ -1635,6 +2310,15 @@ findTextFilter(selector?: string): TextFilterWrapper | null; * @returns {Array} */ findAllTextFilters(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent TextFilter for the current element, + * or the element itself if it is an instance of TextFilter. + * If no TextFilter is found, returns \`null\`. + * + * @returns {TextFilterWrapper | null} + */ +findClosestTextFilter(): TextFilterWrapper | null; /** * Returns the wrapper of the first Textarea that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Textarea. @@ -1654,6 +2338,15 @@ findTextarea(selector?: string): TextareaWrapper | null; * @returns {Array} */ findAllTextareas(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Textarea for the current element, + * or the element itself if it is an instance of Textarea. + * If no Textarea is found, returns \`null\`. + * + * @returns {TextareaWrapper | null} + */ +findClosestTextarea(): TextareaWrapper | null; /** * Returns the wrapper of the first Tiles that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Tiles. @@ -1673,6 +2366,15 @@ findTiles(selector?: string): TilesWrapper | null; * @returns {Array} */ findAllTiles(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Tiles for the current element, + * or the element itself if it is an instance of Tiles. + * If no Tiles is found, returns \`null\`. + * + * @returns {TilesWrapper | null} + */ +findClosestTiles(): TilesWrapper | null; /** * Returns the wrapper of the first TimeInput that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first TimeInput. @@ -1692,6 +2394,15 @@ findTimeInput(selector?: string): TimeInputWrapper | null; * @returns {Array} */ findAllTimeInputs(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent TimeInput for the current element, + * or the element itself if it is an instance of TimeInput. + * If no TimeInput is found, returns \`null\`. + * + * @returns {TimeInputWrapper | null} + */ +findClosestTimeInput(): TimeInputWrapper | null; /** * Returns the wrapper of the first Toggle that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Toggle. @@ -1711,6 +2422,15 @@ findToggle(selector?: string): ToggleWrapper | null; * @returns {Array} */ findAllToggles(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Toggle for the current element, + * or the element itself if it is an instance of Toggle. + * If no Toggle is found, returns \`null\`. + * + * @returns {ToggleWrapper | null} + */ +findClosestToggle(): ToggleWrapper | null; /** * Returns the wrapper of the first ToggleButton that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first ToggleButton. @@ -1730,6 +2450,15 @@ findToggleButton(selector?: string): ToggleButtonWrapper | null; * @returns {Array} */ findAllToggleButtons(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent ToggleButton for the current element, + * or the element itself if it is an instance of ToggleButton. + * If no ToggleButton is found, returns \`null\`. + * + * @returns {ToggleButtonWrapper | null} + */ +findClosestToggleButton(): ToggleButtonWrapper | null; /** * Returns the wrapper of the first Token that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Token. @@ -1749,6 +2478,15 @@ findToken(selector?: string): TokenWrapper | null; * @returns {Array} */ findAllTokens(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Token for the current element, + * or the element itself if it is an instance of Token. + * If no Token is found, returns \`null\`. + * + * @returns {TokenWrapper | null} + */ +findClosestToken(): TokenWrapper | null; /** * Returns the wrapper of the first TokenGroup that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first TokenGroup. @@ -1768,6 +2506,15 @@ findTokenGroup(selector?: string): TokenGroupWrapper | null; * @returns {Array} */ findAllTokenGroups(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent TokenGroup for the current element, + * or the element itself if it is an instance of TokenGroup. + * If no TokenGroup is found, returns \`null\`. + * + * @returns {TokenGroupWrapper | null} + */ +findClosestTokenGroup(): TokenGroupWrapper | null; /** * Returns the wrapper of the first Tooltip that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Tooltip. @@ -1787,6 +2534,15 @@ findTooltip(selector?: string): TooltipWrapper | null; * @returns {Array} */ findAllTooltips(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Tooltip for the current element, + * or the element itself if it is an instance of Tooltip. + * If no Tooltip is found, returns \`null\`. + * + * @returns {TooltipWrapper | null} + */ +findClosestTooltip(): TooltipWrapper | null; /** * Returns the wrapper of the first TopNavigation that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first TopNavigation. @@ -1806,6 +2562,15 @@ findTopNavigation(selector?: string): TopNavigationWrapper | null; * @returns {Array} */ findAllTopNavigations(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent TopNavigation for the current element, + * or the element itself if it is an instance of TopNavigation. + * If no TopNavigation is found, returns \`null\`. + * + * @returns {TopNavigationWrapper | null} + */ +findClosestTopNavigation(): TopNavigationWrapper | null; /** * Returns the wrapper of the first TreeView that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first TreeView. @@ -1825,6 +2590,15 @@ findTreeView(selector?: string): TreeViewWrapper | null; * @returns {Array} */ findAllTreeViews(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent TreeView for the current element, + * or the element itself if it is an instance of TreeView. + * If no TreeView is found, returns \`null\`. + * + * @returns {TreeViewWrapper | null} + */ +findClosestTreeView(): TreeViewWrapper | null; /** * Returns the wrapper of the first TutorialPanel that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first TutorialPanel. @@ -1844,6 +2618,15 @@ findTutorialPanel(selector?: string): TutorialPanelWrapper | null; * @returns {Array} */ findAllTutorialPanels(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent TutorialPanel for the current element, + * or the element itself if it is an instance of TutorialPanel. + * If no TutorialPanel is found, returns \`null\`. + * + * @returns {TutorialPanelWrapper | null} + */ +findClosestTutorialPanel(): TutorialPanelWrapper | null; /** * Returns the wrapper of the first Wizard that matches the specified CSS selector. * If no CSS selector is specified, returns the wrapper of the first Wizard. @@ -1863,6 +2646,15 @@ findWizard(selector?: string): WizardWrapper | null; * @returns {Array} */ findAllWizards(selector?: string): Array; + +/** + * Returns the wrapper of the closest parent Wizard for the current element, + * or the element itself if it is an instance of Wizard. + * If no Wizard is found, returns \`null\`. + * + * @returns {WizardWrapper | null} + */ +findClosestWizard(): WizardWrapper | null; } } @@ -3012,6 +3804,446 @@ ElementWrapper.prototype.findAllWizards = function(selector) { return this.findAllComponents(WizardWrapper, selector); }; +ElementWrapper.prototype.findClosestAlert = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(AlertWrapper); +}; +ElementWrapper.prototype.findClosestAnchorNavigation = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(AnchorNavigationWrapper); +}; +ElementWrapper.prototype.findClosestAnnotation = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(AnnotationWrapper); +}; +ElementWrapper.prototype.findClosestAppLayout = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(AppLayoutWrapper); +}; +ElementWrapper.prototype.findClosestAppLayoutToolbar = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(AppLayoutToolbarWrapper); +}; +ElementWrapper.prototype.findClosestAreaChart = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(AreaChartWrapper); +}; +ElementWrapper.prototype.findClosestAttributeEditor = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(AttributeEditorWrapper); +}; +ElementWrapper.prototype.findClosestAutosuggest = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(AutosuggestWrapper); +}; +ElementWrapper.prototype.findClosestBadge = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(BadgeWrapper); +}; +ElementWrapper.prototype.findClosestBarChart = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(BarChartWrapper); +}; +ElementWrapper.prototype.findClosestBox = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(BoxWrapper); +}; +ElementWrapper.prototype.findClosestBreadcrumbGroup = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(BreadcrumbGroupWrapper); +}; +ElementWrapper.prototype.findClosestButton = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(ButtonWrapper); +}; +ElementWrapper.prototype.findClosestButtonDropdown = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(ButtonDropdownWrapper); +}; +ElementWrapper.prototype.findClosestButtonGroup = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(ButtonGroupWrapper); +}; +ElementWrapper.prototype.findClosestCalendar = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(CalendarWrapper); +}; +ElementWrapper.prototype.findClosestCards = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(CardsWrapper); +}; +ElementWrapper.prototype.findClosestCheckbox = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(CheckboxWrapper); +}; +ElementWrapper.prototype.findClosestCodeEditor = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(CodeEditorWrapper); +}; +ElementWrapper.prototype.findClosestCollectionPreferences = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(CollectionPreferencesWrapper); +}; +ElementWrapper.prototype.findClosestColumnLayout = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(ColumnLayoutWrapper); +}; +ElementWrapper.prototype.findClosestContainer = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(ContainerWrapper); +}; +ElementWrapper.prototype.findClosestContentLayout = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(ContentLayoutWrapper); +}; +ElementWrapper.prototype.findClosestCopyToClipboard = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(CopyToClipboardWrapper); +}; +ElementWrapper.prototype.findClosestDateInput = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(DateInputWrapper); +}; +ElementWrapper.prototype.findClosestDatePicker = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(DatePickerWrapper); +}; +ElementWrapper.prototype.findClosestDateRangePicker = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(DateRangePickerWrapper); +}; +ElementWrapper.prototype.findClosestDrawer = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(DrawerWrapper); +}; +ElementWrapper.prototype.findClosestErrorBoundary = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(ErrorBoundaryWrapper); +}; +ElementWrapper.prototype.findClosestExpandableSection = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(ExpandableSectionWrapper); +}; +ElementWrapper.prototype.findClosestFileDropzone = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(FileDropzoneWrapper); +}; +ElementWrapper.prototype.findClosestFileInput = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(FileInputWrapper); +}; +ElementWrapper.prototype.findClosestFileTokenGroup = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(FileTokenGroupWrapper); +}; +ElementWrapper.prototype.findClosestFileUpload = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(FileUploadWrapper); +}; +ElementWrapper.prototype.findClosestFlashbar = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(FlashbarWrapper); +}; +ElementWrapper.prototype.findClosestForm = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(FormWrapper); +}; +ElementWrapper.prototype.findClosestFormField = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(FormFieldWrapper); +}; +ElementWrapper.prototype.findClosestGrid = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(GridWrapper); +}; +ElementWrapper.prototype.findClosestHeader = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(HeaderWrapper); +}; +ElementWrapper.prototype.findClosestHelpPanel = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(HelpPanelWrapper); +}; +ElementWrapper.prototype.findClosestHotspot = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(HotspotWrapper); +}; +ElementWrapper.prototype.findClosestIcon = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(IconWrapper); +}; +ElementWrapper.prototype.findClosestInput = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(InputWrapper); +}; +ElementWrapper.prototype.findClosestKeyValuePairs = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(KeyValuePairsWrapper); +}; +ElementWrapper.prototype.findClosestLineChart = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(LineChartWrapper); +}; +ElementWrapper.prototype.findClosestLink = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(LinkWrapper); +}; +ElementWrapper.prototype.findClosestList = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(ListWrapper); +}; +ElementWrapper.prototype.findClosestLiveRegion = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(LiveRegionWrapper); +}; +ElementWrapper.prototype.findClosestMixedLineBarChart = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(MixedLineBarChartWrapper); +}; +ElementWrapper.prototype.findClosestModal = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(ModalWrapper); +}; +ElementWrapper.prototype.findClosestMultiselect = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(MultiselectWrapper); +}; +ElementWrapper.prototype.findClosestNavigableGroup = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(NavigableGroupWrapper); +}; +ElementWrapper.prototype.findClosestPagination = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(PaginationWrapper); +}; +ElementWrapper.prototype.findClosestPanelLayout = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(PanelLayoutWrapper); +}; +ElementWrapper.prototype.findClosestPieChart = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(PieChartWrapper); +}; +ElementWrapper.prototype.findClosestPopover = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(PopoverWrapper); +}; +ElementWrapper.prototype.findClosestProgressBar = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(ProgressBarWrapper); +}; +ElementWrapper.prototype.findClosestPromptInput = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(PromptInputWrapper); +}; +ElementWrapper.prototype.findClosestPropertyFilter = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(PropertyFilterWrapper); +}; +ElementWrapper.prototype.findClosestRadioButton = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(RadioButtonWrapper); +}; +ElementWrapper.prototype.findClosestRadioGroup = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(RadioGroupWrapper); +}; +ElementWrapper.prototype.findClosestS3ResourceSelector = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(S3ResourceSelectorWrapper); +}; +ElementWrapper.prototype.findClosestSegmentedControl = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(SegmentedControlWrapper); +}; +ElementWrapper.prototype.findClosestSelect = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(SelectWrapper); +}; +ElementWrapper.prototype.findClosestSideNavigation = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(SideNavigationWrapper); +}; +ElementWrapper.prototype.findClosestSlider = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(SliderWrapper); +}; +ElementWrapper.prototype.findClosestSpaceBetween = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(SpaceBetweenWrapper); +}; +ElementWrapper.prototype.findClosestSpinner = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(SpinnerWrapper); +}; +ElementWrapper.prototype.findClosestSplitPanel = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(SplitPanelWrapper); +}; +ElementWrapper.prototype.findClosestStatusIndicator = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(StatusIndicatorWrapper); +}; +ElementWrapper.prototype.findClosestSteps = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(StepsWrapper); +}; +ElementWrapper.prototype.findClosestTable = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TableWrapper); +}; +ElementWrapper.prototype.findClosestTabs = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TabsWrapper); +}; +ElementWrapper.prototype.findClosestTagEditor = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TagEditorWrapper); +}; +ElementWrapper.prototype.findClosestTextContent = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TextContentWrapper); +}; +ElementWrapper.prototype.findClosestTextFilter = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TextFilterWrapper); +}; +ElementWrapper.prototype.findClosestTextarea = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TextareaWrapper); +}; +ElementWrapper.prototype.findClosestTiles = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TilesWrapper); +}; +ElementWrapper.prototype.findClosestTimeInput = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TimeInputWrapper); +}; +ElementWrapper.prototype.findClosestToggle = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(ToggleWrapper); +}; +ElementWrapper.prototype.findClosestToggleButton = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(ToggleButtonWrapper); +}; +ElementWrapper.prototype.findClosestToken = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TokenWrapper); +}; +ElementWrapper.prototype.findClosestTokenGroup = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TokenGroupWrapper); +}; +ElementWrapper.prototype.findClosestTooltip = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TooltipWrapper); +}; +ElementWrapper.prototype.findClosestTopNavigation = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TopNavigationWrapper); +}; +ElementWrapper.prototype.findClosestTreeView = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TreeViewWrapper); +}; +ElementWrapper.prototype.findClosestTutorialPanel = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(TutorialPanelWrapper); +}; +ElementWrapper.prototype.findClosestWizard = function() { + // casting to 'any' is needed to avoid this issue with generics + // https://github.com/microsoft/TypeScript/issues/29132 + return (this as any).findClosestComponent(WizardWrapper); +}; export default function wrapper(root: Element = document.body) { if (document && document.body && !document.body.contains(root)) {