diff --git a/build-tools/tasks/test-utils.js b/build-tools/tasks/test-utils.js index bc08604888..922e8e455a 100644 --- a/build-tools/tasks/test-utils.js +++ b/build-tools/tasks/test-utils.js @@ -7,6 +7,7 @@ const { pascalCase } = require('change-case'); const { default: convertToSelectorUtil } = require('@cloudscape-design/test-utils-converter'); const { through, task } = require('../utils/gulp-utils'); const { writeFile, listPublicItems } = require('../utils/files'); +const { pluralizeComponentName } = require('../utils/pluralize'); const themes = require('../utils/themes'); function toWrapper(componentClass) { @@ -15,24 +16,132 @@ function toWrapper(componentClass) { const testUtilsSrcDir = path.resolve('src/test-utils'); const configs = { + common: { + // These components are not meant to be present in multiple instances in a single app. + // For this reason no findAll and findByTestId finders will be generated for them. + noExtraFinders: ['AppLayout', 'TopNavigation'], + buildFinder: ({ componentName }) => ` + ElementWrapper.prototype.find${componentName} = function(selector) { + const rootSelector = \`.$\{${toWrapper(componentName)}.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, ${toWrapper(componentName)}); + };`, + buildExtraFinders: ({ componentName, componentNamePlural }) => ` + ElementWrapper.prototype.findAll${componentNamePlural} = function(selector) { + return this.findAllComponents(${toWrapper(componentName)}, selector); + }; + + ElementWrapper.prototype.find${componentName}ByTestId = function(testId) { + const selector = \`.\${${toWrapper(componentName)}.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ${toWrapper(componentName)}); + };`, + }, dom: { defaultExport: `export default function wrapper(root: Element = document.body) { if (document && document.body && !document.body.contains(root)) { console.warn('[AwsUi] [test-utils] provided element is not part of the document body, interactions may work incorrectly')}; return new ElementWrapper(root); }`, - buildFinderInterface: ({ componentName }) => - `find${componentName}(selector?: string): ${toWrapper(componentName)} | null;`, + buildFinderInterface: ({ componentName }) => ` + /** + * Returns the wrapper of the first ${componentName} that matches the specified CSS selector. + * If no CSS selector is specified, returns the wrapper of the first ${componentName}. + * If no matching ${componentName} is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {${toWrapper(componentName)} | null} + */ + find${componentName}(selector?: string): ${toWrapper(componentName)} | null;`, + buildExtraFinderInterfaces: ({ componentName, componentNamePlural }) => ` + /** + * Returns the wrappers of all ${componentNamePlural} that match the specified CSS selector. + * If no CSS selector is specified, returns all of the ${componentNamePlural} inside the current wrapper. + * If no matching ${componentName} is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array<${toWrapper(componentName)}>} + */ + findAll${componentNamePlural}(selector?: string): Array<${toWrapper(componentName)}>; + /** + * Returns the first ${componentName} that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching ${componentName} is found, returns \`null\`. + * + * @param {string} testId + * @returns {${toWrapper(componentName)} | null} + */ + find${componentName}ByTestId(testId: string): ${toWrapper(componentName)} | null;`, }, selectors: { defaultExport: `export default function wrapper(root: string = 'body') { return new ElementWrapper(root); }`, - buildFinderInterface: ({ componentName }) => - `find${componentName}(selector?: string): ${toWrapper(componentName)};`, + buildFinderInterface: ({ componentName, componentNamePlural }) => ` + /** + * Returns a wrapper that matches the ${componentNamePlural} with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches ${componentNamePlural}. + * + * @param {string} [selector] CSS Selector + * @returns {${toWrapper(componentName)}} + */ + find${componentName}(selector?: string): ${toWrapper(componentName)};`, + buildExtraFinderInterfaces: ({ componentName, componentNamePlural }) => ` + /** + * Returns a multi-element wrapper that matches ${componentNamePlural} with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches ${componentNamePlural}. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper<${toWrapper(componentName)}>} + */ + findAll${componentNamePlural}(selector?: string): MultiElementWrapper<${toWrapper(componentName)}>; + /** + * Returns a wrapper that matches the first ${componentName} with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {${toWrapper(componentName)}} + */ + find${componentName}ByTestId(testId: string): ${toWrapper(componentName)};`, }, }; +function generateFindersInterfaces({ testUtilMetaData, testUtilType, configs }) { + const { buildFinderInterface, buildExtraFinderInterfaces } = configs[testUtilType]; + const { noExtraFinders } = configs.common; + + const findersInterfaces = testUtilMetaData.map(metadata => { + if (noExtraFinders.includes(metadata.componentName)) { + return buildFinderInterface(metadata); + } + + return [buildFinderInterface(metadata), buildExtraFinderInterfaces(metadata)].join('\n'); + }); + + // we need to redeclare the interface in its original definition, extending a re-export will not work + // https://github.com/microsoft/TypeScript/issues/12607 + const interfaces = `declare module '@cloudscape-design/test-utils-core/dist/${testUtilType}' { + interface ElementWrapper { + ${findersInterfaces.join('\n')} + } + }`; + + return interfaces; +} + +function generateFindersImplementations({ testUtilMetaData, configs }) { + const { noExtraFinders, buildFinder, buildExtraFinders } = configs.common; + + const findersImplementations = testUtilMetaData.map(metadata => { + if (noExtraFinders.includes(metadata.componentName)) { + return buildFinder(metadata); + } + + return [buildFinder(metadata), buildExtraFinders(metadata)].join('\n'); + }); + + return findersImplementations.join('\n'); +} + function generateIndexFileContent(testUtilType, testUtilMetaData) { const config = configs[testUtilType]; if (config === undefined) { throw new Error('Unknown test util type'); } - const { defaultExport, buildFinderInterface } = config; return [ // language=TypeScript @@ -47,24 +156,9 @@ function generateIndexFileContent(testUtilType, testUtilMetaData) { export { ${componentName}Wrapper }; `; }), - // we need to redeclare the interface in its original definition, extending a re-export will not work - // https://github.com/microsoft/TypeScript/issues/12607 - `declare module '@cloudscape-design/test-utils-core/dist/${testUtilType}' { - interface ElementWrapper { - ${testUtilMetaData.map(metaData => buildFinderInterface(metaData)).join('\n')} - } - }`, - ...testUtilMetaData.map(({ componentName }) => { - const wrapperName = toWrapper(componentName); - // language=TypeScript - return `ElementWrapper.prototype.find${componentName} = function(selector) { - const rootSelector = \`.$\{${wrapperName}.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, ${wrapperName}); - };`; - }), - defaultExport, + generateFindersInterfaces({ testUtilMetaData, testUtilType, configs }), + generateFindersImplementations({ testUtilMetaData, configs }), + config.defaultExport, ].join('\n'); } @@ -77,9 +171,11 @@ function generateTestUtilMetaData(testUtilType) { const componentNameKebab = componentFolderName; const componentName = pascalCase(componentNameKebab); + const componentNamePlural = pluralizeComponentName(componentName); const componentMetaData = { componentName, + componentNamePlural, relPathtestUtilFile, }; diff --git a/build-tools/utils/pluralize.js b/build-tools/utils/pluralize.js new file mode 100644 index 0000000000..affc84b951 --- /dev/null +++ b/build-tools/utils/pluralize.js @@ -0,0 +1,90 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +const pluralizationMap = { + Alert: 'Alerts', + AnchorNavigation: 'AnchorNavigations', + Annotation: 'Annotations', + AppLayout: 'AppLayouts', + AreaChart: 'AreaCharts', + AttributeEditor: 'AttributeEditors', + Autosuggest: 'Autosuggests', + Badge: 'Badges', + BarChart: 'BarCharts', + Box: 'Boxes', + BreadcrumbGroup: 'BreadcrumbGroups', + Button: 'Buttons', + ButtonDropdown: 'ButtonDropdowns', + ButtonGroup: 'ButtonGroups', + Calendar: 'Calendars', + Cards: 'Cards', + Checkbox: 'Checkboxes', + CodeEditor: 'CodeEditors', + CollectionPreferences: 'CollectionPreferences', + ColumnLayout: 'ColumnLayouts', + Container: 'Containers', + ContentLayout: 'ContentLayouts', + CopyToClipboard: 'CopyToClipboards', + DateInput: 'DateInputs', + DatePicker: 'DatePickers', + DateRangePicker: 'DateRangePickers', + Drawer: 'Drawers', + ExpandableSection: 'ExpandableSections', + FileUpload: 'FileUploads', + Flashbar: 'Flashbars', + Form: 'Forms', + FormField: 'FormFields', + Grid: 'Grids', + Header: 'Headers', + HelpPanel: 'HelpPanels', + Hotspot: 'Hotspots', + Icon: 'Icons', + Input: 'Inputs', + KeyValuePairs: 'KeyValuePairs', + LineChart: 'LineCharts', + Link: 'Links', + LiveRegion: 'LiveRegions', + MixedLineBarChart: 'MixedLineBarCharts', + Modal: 'Modals', + Multiselect: 'Multiselects', + Pagination: 'Paginations', + PieChart: 'PieCharts', + Popover: 'Popovers', + ProgressBar: 'ProgressBars', + PromptInput: 'PromptInputs', + PropertyFilter: 'PropertyFilters', + RadioGroup: 'RadioGroups', + S3ResourceSelector: 'S3ResourceSelectors', + SegmentedControl: 'SegmentedControls', + Select: 'Selects', + SideNavigation: 'SideNavigations', + Slider: 'Sliders', + SpaceBetween: 'SpaceBetweens', + Spinner: 'Spinners', + SplitPanel: 'SplitPanels', + StatusIndicator: 'StatusIndicators', + Steps: 'Steps', + Table: 'Tables', + Tabs: 'Tabs', + TagEditor: 'TagEditors', + TextContent: 'TextContents', + TextFilter: 'TextFilters', + Textarea: 'Textareas', + Tiles: 'Tiles', + TimeInput: 'TimeInputs', + Toggle: 'Toggles', + ToggleButton: 'ToggleButtons', + TokenGroup: 'TokenGroups', + TopNavigation: 'TopNavigations', + TutorialPanel: 'TutorialPanels', + Wizard: 'Wizards', +}; + +function pluralizeComponentName(componentName) { + if (!(componentName in pluralizationMap)) { + throw new Error(`Could not find the plural case for ${componentName}.`); + } + + return pluralizationMap[componentName]; +} + +module.exports = { pluralizeComponentName }; diff --git a/package-lock.json b/package-lock.json index 7e513fb680..3a5795d37a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@dnd-kit/sortable": "^7.0.2", "@dnd-kit/utilities": "^3.2.1", "@juggle/resize-observer": "^3.3.1", + "@types/pluralize": "^0.0.33", "ace-builds": "^1.34.0", "balanced-match": "^1.0.2", "clsx": "^1.1.0", @@ -3948,6 +3949,11 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/pluralize": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/pluralize/-/pluralize-0.0.33.tgz", + "integrity": "sha512-JOqsl+ZoCpP4e8TDke9W79FDcSgPAR0l6pixx2JHkhnRjvShyYiAYw2LVsnA7K08Y6DeOnaU6ujmENO4os/cYg==" + }, "node_modules/@types/pngjs": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/@types/pngjs/-/pngjs-6.0.5.tgz", @@ -14706,8 +14712,9 @@ }, "node_modules/pluralize": { "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", "dev": true, - "license": "MIT", "engines": { "node": ">=4" } diff --git a/package.json b/package.json index 4abc584b4e..78185bdff3 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "@dnd-kit/sortable": "^7.0.2", "@dnd-kit/utilities": "^3.2.1", "@juggle/resize-observer": "^3.3.1", + "@types/pluralize": "^0.0.33", "ace-builds": "^1.34.0", "balanced-match": "^1.0.2", "clsx": "^1.1.0", diff --git a/src/__tests__/functional-tests/test-utils.test.tsx b/src/__tests__/functional-tests/test-utils.test.tsx index 905a9f885d..e98335fcdc 100644 --- a/src/__tests__/functional-tests/test-utils.test.tsx +++ b/src/__tests__/functional-tests/test-utils.test.tsx @@ -7,9 +7,79 @@ import React from 'react'; import { render } from 'react-dom'; import { render as renderTestingLibrary } from '@testing-library/react'; +import { pascalCase } from 'change-case'; +import { Modal } from '../../../lib/components'; import Button from '../../../lib/components/button'; -import createWrapper from '../../../lib/components/test-utils/dom'; +import * as dom from '../../../lib/components/test-utils/dom'; +import * as selectors from '../../../lib/components/test-utils/selectors'; +import { getRequiredPropsForComponent } from '../required-props-for-components'; +import { getAllComponents, requireComponent } from '../utils'; + +const createWrapperDom = dom.default; +const createWrapperSelectors = selectors.default; + +const componentsWithNoExtraFinders = ['top-navigation', 'app-layout']; +const componentsWithExceptions = ['annotation-context', ...componentsWithNoExtraFinders]; +const components = getAllComponents().filter(component => !componentsWithExceptions.includes(component)); + +const RENDER_COMPONENTS_DEFAULT_PROPS: Record[] = [ + { + 'data-testid': 'first-item', + 'data-name': 'first item', + }, + { + 'data-testid': 'second-item', + 'data-name': 'second item', + }, +]; + +function renderModal(props = RENDER_COMPONENTS_DEFAULT_PROPS) { + const root = document.createElement('div'); + document.body.appendChild(root); + + return renderTestingLibrary( +
+ {props.map(({ ...customProps }, index) => ( + + ))} +
, + { container: root } + ); +} + +function renderComponents(componentName: string, props = RENDER_COMPONENTS_DEFAULT_PROPS) { + if (componentName === 'modal') { + return renderModal(props); + } + + const { default: Component } = requireComponent(componentName); + const defaultProps = getRequiredPropsForComponent(componentName); + return renderTestingLibrary( +
+ {props.map(({ ...customProps }, index) => ( + + ))} +
+ ); +} + +function getComponentSelectors(componentName: string) { + const componentNamePascalCase = pascalCase(componentName); + const findAllRegex = new RegExp(`findAll${componentNamePascalCase}.*`); + + // The same set of selector functions are present in both dom and selectors. + // For this reason, looking into DOM is representative of both groups. + const wrapperPropsList = Object.keys(dom.ElementWrapper.prototype); + + // Every component has the same set of selector functions. + // For this reason, casting the function names into the Alert component. + const findName = `find${componentNamePascalCase}` as 'findAlert'; + const findAllName = wrapperPropsList.find(selector => findAllRegex.test(selector)) as 'findAllAlerts'; + const findByTestIdName = `find${componentNamePascalCase}ByTestId` as 'findAlertByTestId'; + + return { findName, findAllName, findByTestIdName }; +} describe('createWrapper', () => { let spy: jest.SpyInstance; @@ -27,23 +97,169 @@ describe('createWrapper', () => { document.body.appendChild(container); render(React.createElement(Button), container); - createWrapper(container); + createWrapperDom(container); expect(spy).not.toBeCalled(); }); + test('given detached node when creating a wrapper then a warning is printed', () => { const container = document.createElement('div'); render(React.createElement(Button), container); - createWrapper(container); + createWrapperDom(container); expect(spy).toBeCalledTimes(1); }); + test('given node rendered with "@testing-library/react" when creating a wrapper then no warning is printed', () => { const { container } = renderTestingLibrary(React.createElement(Button)); - createWrapper(container); + createWrapperDom(container); expect(spy).not.toBeCalled(); }); }); + +describe.each(components)('ElementWrapper selectors for %s component', componentName => { + const { findName, findAllName, findByTestIdName } = getComponentSelectors(componentName); + + describe('dom wrapper', () => { + test(`${findName} returns the first ${componentName}`, () => { + const { container } = renderComponents(componentName); + const wrapper = createWrapperDom(container); + const element = wrapper[findName]()!.getElement(); + + expect(element).toHaveAttribute('data-name', 'first item'); + }); + + test(`${findAllName} returns all of the ${componentName} components`, () => { + const { container } = renderComponents(componentName); + const wrapper = createWrapperDom(container); + const elementNameAttributes = wrapper[findAllName]().map(component => + component!.getElement().getAttribute('data-name') + ); + + expect(elementNameAttributes).toEqual(['first item', 'second item']); + }); + + test(`${findAllName} returns only the matching ${componentName} components, when a selector is specified`, () => { + const { container } = renderComponents(componentName, [ + { className: 'first-type', 'data-name': 'first item' }, + { className: 'second-type', 'data-name': 'second item' }, + { className: 'second-type', 'data-name': 'third item' }, + ]); + const wrapper = createWrapperDom(container); + const elementNameAttributes = wrapper[findAllName]('.second-type').map(component => + component!.getElement().getAttribute('data-name') + ); + + expect(elementNameAttributes).toEqual(['second item', 'third item']); + }); + + test(`${findByTestIdName} returns the ${componentName} with matching test id`, () => { + const { container } = renderComponents(componentName); + const wrapper = createWrapperDom(container); + const element = wrapper[findByTestIdName]('second-item')!.getElement(); + + expect(element).toHaveAttribute('data-name', 'second item'); + }); + + test(`${findByTestIdName} returns the correct ${componentName}, even when test id contains double quotes`, () => { + const { container } = renderComponents(componentName, [{ 'data-testid': '"test-id-with-quotes"' }]); + const wrapper = createWrapperDom(container); + + expect(wrapper[findByTestIdName]('"test-id-with-quotes"')).toBeTruthy(); + }); + }); + + describe('selectors wrapper', () => { + test(`${findName} returns a selector that matches the ${componentName}`, () => { + const { container } = renderComponents(componentName); + const wrapper = createWrapperSelectors(); + const selector = wrapper[findName]().toSelector(); + const element = container.querySelector(selector); + + expect(element).toHaveAttribute('data-name', 'first item'); + }); + + test(`${findAllName} returns a selector that matches the ${componentName} with nth-child index`, () => { + const { container } = renderComponents(componentName); + const wrapper = createWrapperSelectors(); + const selector = wrapper[findAllName]().get(2).toSelector(); + const element = container.querySelector(selector); + + expect(element).toHaveAttribute('data-name', 'second item'); + }); + + test(`${findAllName} appends the specified selector to the default ${componentName} selectors`, () => { + const { container } = renderComponents(componentName, [ + { className: 'first-type', 'data-name': 'first item' }, + { className: 'second-type', 'data-name': 'second item' }, + ]); + const wrapper = createWrapperSelectors(); + const firstElement = container.querySelector(wrapper[findAllName]('.second-type').get(1).toSelector()); + const secondElement = container.querySelector(wrapper[findAllName]('.second-type').get(2).toSelector()); + + expect(firstElement).toBeFalsy(); + expect(secondElement).toBeTruthy(); + }); + + test(`${findByTestIdName} returns selector matching the ${componentName} with test id`, () => { + const { container } = renderComponents(componentName); + const wrapper = createWrapperSelectors(); + const selector = wrapper[findByTestIdName]('second-item').toSelector(); + const element = container.querySelector(selector); + + expect(element).toHaveAttribute('data-name', 'second item'); + }); + + test(`${findByTestIdName} returns selector matching the ${componentName}, even when test id contains double quotes`, () => { + const { container } = renderComponents(componentName, [{ 'data-testid': '"test-id-with-quotes"' }]); + const wrapper = createWrapperSelectors(); + const selector = wrapper[findByTestIdName]('"test-id-with-quotes"').toSelector(); + const element = container.querySelector(selector); + + expect(element).toBeTruthy(); + }); + }); +}); + +describe.each(componentsWithNoExtraFinders)('ElementWrapper selectors for %s component', componentName => { + const { findName, findAllName, findByTestIdName } = getComponentSelectors(componentName); + const renderOnlyOneInstance = () => renderComponents(componentName, [{}]); + + describe('dom wrapper', () => { + test(`${findName} returns the first ${componentName}`, () => { + const { container } = renderOnlyOneInstance(); + const wrapper = createWrapperDom(container); + const element = wrapper[findName]()!.getElement(); + + expect(element).toBeTruthy(); + }); + + test('it does not have findAll or findByTestId finders', () => { + const wrapper = createWrapperDom(); + + expect(findAllName).toBeUndefined(); + expect(wrapper[findByTestIdName]).toBeFalsy(); + }); + }); + + describe('selectors wrapper', () => { + test(`${findName} returns a selector that matches the ${componentName}`, () => { + const { container } = renderOnlyOneInstance(); + const wrapper = createWrapperSelectors(); + const selector = wrapper[findName]().toSelector(); + const element = container.querySelector(selector); + + expect(element).toBeTruthy(); + }); + + test('it does not have findAll or findByTestId finders', () => { + const wrapper = createWrapperDom(); + + expect(findAllName).toBeUndefined(); + expect(wrapper[findByTestIdName]).toBeFalsy(); + }); + }); +}); 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 f41edd874d..1bc96261a1 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 @@ -310,1386 +310,6826 @@ export { ElementWrapper }; declare module '@cloudscape-design/test-utils-core/dist/dom' { interface ElementWrapper { - findAlert(selector?: string): AlertWrapper | null; -findAnchorNavigation(selector?: string): AnchorNavigationWrapper | null; -findAnnotation(selector?: string): AnnotationWrapper | null; -findAppLayout(selector?: string): AppLayoutWrapper | null; -findAreaChart(selector?: string): AreaChartWrapper | null; -findAttributeEditor(selector?: string): AttributeEditorWrapper | null; -findAutosuggest(selector?: string): AutosuggestWrapper | null; -findBadge(selector?: string): BadgeWrapper | null; -findBarChart(selector?: string): BarChartWrapper | null; -findBox(selector?: string): BoxWrapper | null; -findBreadcrumbGroup(selector?: string): BreadcrumbGroupWrapper | null; -findButton(selector?: string): ButtonWrapper | null; -findButtonDropdown(selector?: string): ButtonDropdownWrapper | null; -findButtonGroup(selector?: string): ButtonGroupWrapper | null; -findCalendar(selector?: string): CalendarWrapper | null; -findCards(selector?: string): CardsWrapper | null; -findCheckbox(selector?: string): CheckboxWrapper | null; -findCodeEditor(selector?: string): CodeEditorWrapper | null; -findCollectionPreferences(selector?: string): CollectionPreferencesWrapper | null; -findColumnLayout(selector?: string): ColumnLayoutWrapper | null; -findContainer(selector?: string): ContainerWrapper | null; -findContentLayout(selector?: string): ContentLayoutWrapper | null; -findCopyToClipboard(selector?: string): CopyToClipboardWrapper | null; -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; -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; -findHeader(selector?: string): HeaderWrapper | null; -findHelpPanel(selector?: string): HelpPanelWrapper | null; -findHotspot(selector?: string): HotspotWrapper | null; -findIcon(selector?: string): IconWrapper | null; -findInput(selector?: string): InputWrapper | null; -findKeyValuePairs(selector?: string): KeyValuePairsWrapper | null; -findLineChart(selector?: string): LineChartWrapper | null; -findLink(selector?: string): LinkWrapper | null; -findLiveRegion(selector?: string): LiveRegionWrapper | null; -findMixedLineBarChart(selector?: string): MixedLineBarChartWrapper | null; -findModal(selector?: string): ModalWrapper | null; -findMultiselect(selector?: string): MultiselectWrapper | null; -findPagination(selector?: string): PaginationWrapper | null; -findPieChart(selector?: string): PieChartWrapper | null; -findPopover(selector?: string): PopoverWrapper | null; -findProgressBar(selector?: string): ProgressBarWrapper | null; -findPromptInput(selector?: string): PromptInputWrapper | null; -findPropertyFilter(selector?: string): PropertyFilterWrapper | null; -findRadioGroup(selector?: string): RadioGroupWrapper | null; -findS3ResourceSelector(selector?: string): S3ResourceSelectorWrapper | null; -findSegmentedControl(selector?: string): SegmentedControlWrapper | null; -findSelect(selector?: string): SelectWrapper | null; -findSideNavigation(selector?: string): SideNavigationWrapper | null; -findSlider(selector?: string): SliderWrapper | null; -findSpaceBetween(selector?: string): SpaceBetweenWrapper | null; -findSpinner(selector?: string): SpinnerWrapper | null; -findSplitPanel(selector?: string): SplitPanelWrapper | null; -findStatusIndicator(selector?: string): StatusIndicatorWrapper | null; -findSteps(selector?: string): StepsWrapper | null; -findTable(selector?: string): TableWrapper | null; -findTabs(selector?: string): TabsWrapper | null; -findTagEditor(selector?: string): TagEditorWrapper | null; -findTextContent(selector?: string): TextContentWrapper | null; -findTextFilter(selector?: string): TextFilterWrapper | null; -findTextarea(selector?: string): TextareaWrapper | null; -findTiles(selector?: string): TilesWrapper | null; -findTimeInput(selector?: string): TimeInputWrapper | null; -findToggle(selector?: string): ToggleWrapper | null; -findToggleButton(selector?: string): ToggleButtonWrapper | null; -findTokenGroup(selector?: string): TokenGroupWrapper | null; -findTopNavigation(selector?: string): TopNavigationWrapper | null; -findTutorialPanel(selector?: string): TutorialPanelWrapper | null; -findWizard(selector?: string): WizardWrapper | null; + + /** + * Returns the wrapper of the first Alert that matches the specified CSS selector. + * If no CSS selector is specified, returns the wrapper of the first Alert. + * If no matching Alert is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {AlertWrapper | null} + */ + findAlert(selector?: string): AlertWrapper | null; + + /** + * Returns the wrappers of all Alerts that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Alerts inside the current wrapper. + * If no matching Alert is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllAlerts(selector?: string): Array; + /** + * Returns the first Alert that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Alert is found, returns \`null\`. + * + * @param {string} testId + * @returns {AlertWrapper | null} + */ + findAlertByTestId(testId: string): 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. + * If no matching AnchorNavigation is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {AnchorNavigationWrapper | null} + */ + findAnchorNavigation(selector?: string): AnchorNavigationWrapper | null; + + /** + * Returns the wrappers of all AnchorNavigations that match the specified CSS selector. + * If no CSS selector is specified, returns all of the AnchorNavigations inside the current wrapper. + * If no matching AnchorNavigation is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllAnchorNavigations(selector?: string): Array; + /** + * Returns the first AnchorNavigation that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching AnchorNavigation is found, returns \`null\`. + * + * @param {string} testId + * @returns {AnchorNavigationWrapper | null} + */ + findAnchorNavigationByTestId(testId: string): 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. + * If no matching Annotation is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {AnnotationWrapper | null} + */ + findAnnotation(selector?: string): AnnotationWrapper | null; + + /** + * Returns the wrappers of all Annotations that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Annotations inside the current wrapper. + * If no matching Annotation is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllAnnotations(selector?: string): Array; + /** + * Returns the first Annotation that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Annotation is found, returns \`null\`. + * + * @param {string} testId + * @returns {AnnotationWrapper | null} + */ + findAnnotationByTestId(testId: string): 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. + * If no matching AppLayout is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {AppLayoutWrapper | null} + */ + findAppLayout(selector?: string): AppLayoutWrapper | 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. + * If no matching AreaChart is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {AreaChartWrapper | null} + */ + findAreaChart(selector?: string): AreaChartWrapper | null; + + /** + * Returns the wrappers of all AreaCharts that match the specified CSS selector. + * If no CSS selector is specified, returns all of the AreaCharts inside the current wrapper. + * If no matching AreaChart is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllAreaCharts(selector?: string): Array; + /** + * Returns the first AreaChart that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching AreaChart is found, returns \`null\`. + * + * @param {string} testId + * @returns {AreaChartWrapper | null} + */ + findAreaChartByTestId(testId: string): 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. + * If no matching AttributeEditor is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {AttributeEditorWrapper | null} + */ + findAttributeEditor(selector?: string): AttributeEditorWrapper | null; + + /** + * Returns the wrappers of all AttributeEditors that match the specified CSS selector. + * If no CSS selector is specified, returns all of the AttributeEditors inside the current wrapper. + * If no matching AttributeEditor is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllAttributeEditors(selector?: string): Array; + /** + * Returns the first AttributeEditor that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching AttributeEditor is found, returns \`null\`. + * + * @param {string} testId + * @returns {AttributeEditorWrapper | null} + */ + findAttributeEditorByTestId(testId: string): 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. + * If no matching Autosuggest is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {AutosuggestWrapper | null} + */ + findAutosuggest(selector?: string): AutosuggestWrapper | null; + + /** + * Returns the wrappers of all Autosuggests that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Autosuggests inside the current wrapper. + * If no matching Autosuggest is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllAutosuggests(selector?: string): Array; + /** + * Returns the first Autosuggest that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Autosuggest is found, returns \`null\`. + * + * @param {string} testId + * @returns {AutosuggestWrapper | null} + */ + findAutosuggestByTestId(testId: string): 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. + * If no matching Badge is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {BadgeWrapper | null} + */ + findBadge(selector?: string): BadgeWrapper | null; + + /** + * Returns the wrappers of all Badges that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Badges inside the current wrapper. + * If no matching Badge is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllBadges(selector?: string): Array; + /** + * Returns the first Badge that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Badge is found, returns \`null\`. + * + * @param {string} testId + * @returns {BadgeWrapper | null} + */ + findBadgeByTestId(testId: string): 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. + * If no matching BarChart is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {BarChartWrapper | null} + */ + findBarChart(selector?: string): BarChartWrapper | null; + + /** + * Returns the wrappers of all BarCharts that match the specified CSS selector. + * If no CSS selector is specified, returns all of the BarCharts inside the current wrapper. + * If no matching BarChart is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllBarCharts(selector?: string): Array; + /** + * Returns the first BarChart that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching BarChart is found, returns \`null\`. + * + * @param {string} testId + * @returns {BarChartWrapper | null} + */ + findBarChartByTestId(testId: string): 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. + * If no matching Box is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {BoxWrapper | null} + */ + findBox(selector?: string): BoxWrapper | null; + + /** + * Returns the wrappers of all Boxes that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Boxes inside the current wrapper. + * If no matching Box is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllBoxes(selector?: string): Array; + /** + * Returns the first Box that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Box is found, returns \`null\`. + * + * @param {string} testId + * @returns {BoxWrapper | null} + */ + findBoxByTestId(testId: string): 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. + * If no matching BreadcrumbGroup is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {BreadcrumbGroupWrapper | null} + */ + findBreadcrumbGroup(selector?: string): BreadcrumbGroupWrapper | null; + + /** + * Returns the wrappers of all BreadcrumbGroups that match the specified CSS selector. + * If no CSS selector is specified, returns all of the BreadcrumbGroups inside the current wrapper. + * If no matching BreadcrumbGroup is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllBreadcrumbGroups(selector?: string): Array; + /** + * Returns the first BreadcrumbGroup that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching BreadcrumbGroup is found, returns \`null\`. + * + * @param {string} testId + * @returns {BreadcrumbGroupWrapper | null} + */ + findBreadcrumbGroupByTestId(testId: string): 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. + * If no matching Button is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {ButtonWrapper | null} + */ + findButton(selector?: string): ButtonWrapper | null; + + /** + * Returns the wrappers of all Buttons that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Buttons inside the current wrapper. + * If no matching Button is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllButtons(selector?: string): Array; + /** + * Returns the first Button that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Button is found, returns \`null\`. + * + * @param {string} testId + * @returns {ButtonWrapper | null} + */ + findButtonByTestId(testId: string): 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. + * If no matching ButtonDropdown is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {ButtonDropdownWrapper | null} + */ + findButtonDropdown(selector?: string): ButtonDropdownWrapper | null; + + /** + * Returns the wrappers of all ButtonDropdowns that match the specified CSS selector. + * If no CSS selector is specified, returns all of the ButtonDropdowns inside the current wrapper. + * If no matching ButtonDropdown is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllButtonDropdowns(selector?: string): Array; + /** + * Returns the first ButtonDropdown that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching ButtonDropdown is found, returns \`null\`. + * + * @param {string} testId + * @returns {ButtonDropdownWrapper | null} + */ + findButtonDropdownByTestId(testId: string): 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. + * If no matching ButtonGroup is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {ButtonGroupWrapper | null} + */ + findButtonGroup(selector?: string): ButtonGroupWrapper | null; + + /** + * Returns the wrappers of all ButtonGroups that match the specified CSS selector. + * If no CSS selector is specified, returns all of the ButtonGroups inside the current wrapper. + * If no matching ButtonGroup is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllButtonGroups(selector?: string): Array; + /** + * Returns the first ButtonGroup that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching ButtonGroup is found, returns \`null\`. + * + * @param {string} testId + * @returns {ButtonGroupWrapper | null} + */ + findButtonGroupByTestId(testId: string): 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. + * If no matching Calendar is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {CalendarWrapper | null} + */ + findCalendar(selector?: string): CalendarWrapper | null; + + /** + * Returns the wrappers of all Calendars that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Calendars inside the current wrapper. + * If no matching Calendar is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllCalendars(selector?: string): Array; + /** + * Returns the first Calendar that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Calendar is found, returns \`null\`. + * + * @param {string} testId + * @returns {CalendarWrapper | null} + */ + findCalendarByTestId(testId: string): 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. + * If no matching Cards is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {CardsWrapper | null} + */ + findCards(selector?: string): CardsWrapper | null; + + /** + * Returns the wrappers of all Cards that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Cards inside the current wrapper. + * If no matching Cards is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllCards(selector?: string): Array; + /** + * Returns the first Cards that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Cards is found, returns \`null\`. + * + * @param {string} testId + * @returns {CardsWrapper | null} + */ + findCardsByTestId(testId: string): 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. + * If no matching Checkbox is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {CheckboxWrapper | null} + */ + findCheckbox(selector?: string): CheckboxWrapper | null; + + /** + * Returns the wrappers of all Checkboxes that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Checkboxes inside the current wrapper. + * If no matching Checkbox is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllCheckboxes(selector?: string): Array; + /** + * Returns the first Checkbox that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Checkbox is found, returns \`null\`. + * + * @param {string} testId + * @returns {CheckboxWrapper | null} + */ + findCheckboxByTestId(testId: string): 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. + * If no matching CodeEditor is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {CodeEditorWrapper | null} + */ + findCodeEditor(selector?: string): CodeEditorWrapper | null; + + /** + * Returns the wrappers of all CodeEditors that match the specified CSS selector. + * If no CSS selector is specified, returns all of the CodeEditors inside the current wrapper. + * If no matching CodeEditor is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllCodeEditors(selector?: string): Array; + /** + * Returns the first CodeEditor that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching CodeEditor is found, returns \`null\`. + * + * @param {string} testId + * @returns {CodeEditorWrapper | null} + */ + findCodeEditorByTestId(testId: string): 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. + * If no matching CollectionPreferences is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {CollectionPreferencesWrapper | null} + */ + findCollectionPreferences(selector?: string): CollectionPreferencesWrapper | null; + + /** + * Returns the wrappers of all CollectionPreferences that match the specified CSS selector. + * If no CSS selector is specified, returns all of the CollectionPreferences inside the current wrapper. + * If no matching CollectionPreferences is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllCollectionPreferences(selector?: string): Array; + /** + * Returns the first CollectionPreferences that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching CollectionPreferences is found, returns \`null\`. + * + * @param {string} testId + * @returns {CollectionPreferencesWrapper | null} + */ + findCollectionPreferencesByTestId(testId: string): 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. + * If no matching ColumnLayout is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {ColumnLayoutWrapper | null} + */ + findColumnLayout(selector?: string): ColumnLayoutWrapper | null; + + /** + * Returns the wrappers of all ColumnLayouts that match the specified CSS selector. + * If no CSS selector is specified, returns all of the ColumnLayouts inside the current wrapper. + * If no matching ColumnLayout is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllColumnLayouts(selector?: string): Array; + /** + * Returns the first ColumnLayout that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching ColumnLayout is found, returns \`null\`. + * + * @param {string} testId + * @returns {ColumnLayoutWrapper | null} + */ + findColumnLayoutByTestId(testId: string): 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. + * If no matching Container is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {ContainerWrapper | null} + */ + findContainer(selector?: string): ContainerWrapper | null; + + /** + * Returns the wrappers of all Containers that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Containers inside the current wrapper. + * If no matching Container is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllContainers(selector?: string): Array; + /** + * Returns the first Container that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Container is found, returns \`null\`. + * + * @param {string} testId + * @returns {ContainerWrapper | null} + */ + findContainerByTestId(testId: string): 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. + * If no matching ContentLayout is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {ContentLayoutWrapper | null} + */ + findContentLayout(selector?: string): ContentLayoutWrapper | null; + + /** + * Returns the wrappers of all ContentLayouts that match the specified CSS selector. + * If no CSS selector is specified, returns all of the ContentLayouts inside the current wrapper. + * If no matching ContentLayout is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllContentLayouts(selector?: string): Array; + /** + * Returns the first ContentLayout that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching ContentLayout is found, returns \`null\`. + * + * @param {string} testId + * @returns {ContentLayoutWrapper | null} + */ + findContentLayoutByTestId(testId: string): 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. + * If no matching CopyToClipboard is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {CopyToClipboardWrapper | null} + */ + findCopyToClipboard(selector?: string): CopyToClipboardWrapper | null; + + /** + * Returns the wrappers of all CopyToClipboards that match the specified CSS selector. + * If no CSS selector is specified, returns all of the CopyToClipboards inside the current wrapper. + * If no matching CopyToClipboard is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllCopyToClipboards(selector?: string): Array; + /** + * Returns the first CopyToClipboard that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching CopyToClipboard is found, returns \`null\`. + * + * @param {string} testId + * @returns {CopyToClipboardWrapper | null} + */ + findCopyToClipboardByTestId(testId: string): 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. + * If no matching DateInput is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {DateInputWrapper | null} + */ + findDateInput(selector?: string): DateInputWrapper | null; + + /** + * Returns the wrappers of all DateInputs that match the specified CSS selector. + * If no CSS selector is specified, returns all of the DateInputs inside the current wrapper. + * If no matching DateInput is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllDateInputs(selector?: string): Array; + /** + * Returns the first DateInput that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching DateInput is found, returns \`null\`. + * + * @param {string} testId + * @returns {DateInputWrapper | null} + */ + findDateInputByTestId(testId: string): 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. + * If no matching DatePicker is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {DatePickerWrapper | null} + */ + findDatePicker(selector?: string): DatePickerWrapper | null; + + /** + * Returns the wrappers of all DatePickers that match the specified CSS selector. + * If no CSS selector is specified, returns all of the DatePickers inside the current wrapper. + * If no matching DatePicker is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllDatePickers(selector?: string): Array; + /** + * Returns the first DatePicker that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching DatePicker is found, returns \`null\`. + * + * @param {string} testId + * @returns {DatePickerWrapper | null} + */ + findDatePickerByTestId(testId: string): 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. + * If no matching DateRangePicker is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {DateRangePickerWrapper | null} + */ + findDateRangePicker(selector?: string): DateRangePickerWrapper | null; + + /** + * Returns the wrappers of all DateRangePickers that match the specified CSS selector. + * If no CSS selector is specified, returns all of the DateRangePickers inside the current wrapper. + * If no matching DateRangePicker is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllDateRangePickers(selector?: string): Array; + /** + * Returns the first DateRangePicker that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching DateRangePicker is found, returns \`null\`. + * + * @param {string} testId + * @returns {DateRangePickerWrapper | null} + */ + findDateRangePickerByTestId(testId: string): 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. + * If no matching Drawer is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {DrawerWrapper | null} + */ + findDrawer(selector?: string): DrawerWrapper | null; + + /** + * Returns the wrappers of all Drawers that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Drawers inside the current wrapper. + * If no matching Drawer is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllDrawers(selector?: string): Array; + /** + * Returns the first Drawer that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Drawer is found, returns \`null\`. + * + * @param {string} testId + * @returns {DrawerWrapper | null} + */ + findDrawerByTestId(testId: string): DrawerWrapper | 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. + * If no matching ExpandableSection is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {ExpandableSectionWrapper | null} + */ + findExpandableSection(selector?: string): ExpandableSectionWrapper | null; + + /** + * Returns the wrappers of all ExpandableSections that match the specified CSS selector. + * If no CSS selector is specified, returns all of the ExpandableSections inside the current wrapper. + * If no matching ExpandableSection is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllExpandableSections(selector?: string): Array; + /** + * Returns the first ExpandableSection that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching ExpandableSection is found, returns \`null\`. + * + * @param {string} testId + * @returns {ExpandableSectionWrapper | null} + */ + findExpandableSectionByTestId(testId: string): ExpandableSectionWrapper | 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. + * If no matching FileUpload is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {FileUploadWrapper | null} + */ + findFileUpload(selector?: string): FileUploadWrapper | null; + + /** + * Returns the wrappers of all FileUploads that match the specified CSS selector. + * If no CSS selector is specified, returns all of the FileUploads inside the current wrapper. + * If no matching FileUpload is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllFileUploads(selector?: string): Array; + /** + * Returns the first FileUpload that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching FileUpload is found, returns \`null\`. + * + * @param {string} testId + * @returns {FileUploadWrapper | null} + */ + findFileUploadByTestId(testId: string): 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. + * If no matching Flashbar is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {FlashbarWrapper | null} + */ + findFlashbar(selector?: string): FlashbarWrapper | null; + + /** + * Returns the wrappers of all Flashbars that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Flashbars inside the current wrapper. + * If no matching Flashbar is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllFlashbars(selector?: string): Array; + /** + * Returns the first Flashbar that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Flashbar is found, returns \`null\`. + * + * @param {string} testId + * @returns {FlashbarWrapper | null} + */ + findFlashbarByTestId(testId: string): 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. + * If no matching Form is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {FormWrapper | null} + */ + findForm(selector?: string): FormWrapper | null; + + /** + * Returns the wrappers of all Forms that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Forms inside the current wrapper. + * If no matching Form is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllForms(selector?: string): Array; + /** + * Returns the first Form that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Form is found, returns \`null\`. + * + * @param {string} testId + * @returns {FormWrapper | null} + */ + findFormByTestId(testId: string): 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. + * If no matching FormField is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {FormFieldWrapper | null} + */ + findFormField(selector?: string): FormFieldWrapper | null; + + /** + * Returns the wrappers of all FormFields that match the specified CSS selector. + * If no CSS selector is specified, returns all of the FormFields inside the current wrapper. + * If no matching FormField is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllFormFields(selector?: string): Array; + /** + * Returns the first FormField that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching FormField is found, returns \`null\`. + * + * @param {string} testId + * @returns {FormFieldWrapper | null} + */ + findFormFieldByTestId(testId: string): 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. + * If no matching Grid is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {GridWrapper | null} + */ + findGrid(selector?: string): GridWrapper | null; + + /** + * Returns the wrappers of all Grids that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Grids inside the current wrapper. + * If no matching Grid is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllGrids(selector?: string): Array; + /** + * Returns the first Grid that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Grid is found, returns \`null\`. + * + * @param {string} testId + * @returns {GridWrapper | null} + */ + findGridByTestId(testId: string): 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. + * If no matching Header is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {HeaderWrapper | null} + */ + findHeader(selector?: string): HeaderWrapper | null; + + /** + * Returns the wrappers of all Headers that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Headers inside the current wrapper. + * If no matching Header is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllHeaders(selector?: string): Array; + /** + * Returns the first Header that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Header is found, returns \`null\`. + * + * @param {string} testId + * @returns {HeaderWrapper | null} + */ + findHeaderByTestId(testId: string): 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. + * If no matching HelpPanel is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {HelpPanelWrapper | null} + */ + findHelpPanel(selector?: string): HelpPanelWrapper | null; + + /** + * Returns the wrappers of all HelpPanels that match the specified CSS selector. + * If no CSS selector is specified, returns all of the HelpPanels inside the current wrapper. + * If no matching HelpPanel is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllHelpPanels(selector?: string): Array; + /** + * Returns the first HelpPanel that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching HelpPanel is found, returns \`null\`. + * + * @param {string} testId + * @returns {HelpPanelWrapper | null} + */ + findHelpPanelByTestId(testId: string): 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. + * If no matching Hotspot is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {HotspotWrapper | null} + */ + findHotspot(selector?: string): HotspotWrapper | null; + + /** + * Returns the wrappers of all Hotspots that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Hotspots inside the current wrapper. + * If no matching Hotspot is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllHotspots(selector?: string): Array; + /** + * Returns the first Hotspot that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Hotspot is found, returns \`null\`. + * + * @param {string} testId + * @returns {HotspotWrapper | null} + */ + findHotspotByTestId(testId: string): 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. + * If no matching Icon is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {IconWrapper | null} + */ + findIcon(selector?: string): IconWrapper | null; + + /** + * Returns the wrappers of all Icons that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Icons inside the current wrapper. + * If no matching Icon is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllIcons(selector?: string): Array; + /** + * Returns the first Icon that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Icon is found, returns \`null\`. + * + * @param {string} testId + * @returns {IconWrapper | null} + */ + findIconByTestId(testId: string): 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. + * If no matching Input is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {InputWrapper | null} + */ + findInput(selector?: string): InputWrapper | null; + + /** + * Returns the wrappers of all Inputs that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Inputs inside the current wrapper. + * If no matching Input is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllInputs(selector?: string): Array; + /** + * Returns the first Input that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Input is found, returns \`null\`. + * + * @param {string} testId + * @returns {InputWrapper | null} + */ + findInputByTestId(testId: string): 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. + * If no matching KeyValuePairs is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {KeyValuePairsWrapper | null} + */ + findKeyValuePairs(selector?: string): KeyValuePairsWrapper | null; + + /** + * Returns the wrappers of all KeyValuePairs that match the specified CSS selector. + * If no CSS selector is specified, returns all of the KeyValuePairs inside the current wrapper. + * If no matching KeyValuePairs is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllKeyValuePairs(selector?: string): Array; + /** + * Returns the first KeyValuePairs that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching KeyValuePairs is found, returns \`null\`. + * + * @param {string} testId + * @returns {KeyValuePairsWrapper | null} + */ + findKeyValuePairsByTestId(testId: string): 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. + * If no matching LineChart is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {LineChartWrapper | null} + */ + findLineChart(selector?: string): LineChartWrapper | null; + + /** + * Returns the wrappers of all LineCharts that match the specified CSS selector. + * If no CSS selector is specified, returns all of the LineCharts inside the current wrapper. + * If no matching LineChart is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllLineCharts(selector?: string): Array; + /** + * Returns the first LineChart that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching LineChart is found, returns \`null\`. + * + * @param {string} testId + * @returns {LineChartWrapper | null} + */ + findLineChartByTestId(testId: string): 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. + * If no matching Link is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {LinkWrapper | null} + */ + findLink(selector?: string): LinkWrapper | null; + + /** + * Returns the wrappers of all Links that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Links inside the current wrapper. + * If no matching Link is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllLinks(selector?: string): Array; + /** + * Returns the first Link that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Link is found, returns \`null\`. + * + * @param {string} testId + * @returns {LinkWrapper | null} + */ + findLinkByTestId(testId: string): LinkWrapper | 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. + * If no matching LiveRegion is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {LiveRegionWrapper | null} + */ + findLiveRegion(selector?: string): LiveRegionWrapper | null; + + /** + * Returns the wrappers of all LiveRegions that match the specified CSS selector. + * If no CSS selector is specified, returns all of the LiveRegions inside the current wrapper. + * If no matching LiveRegion is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllLiveRegions(selector?: string): Array; + /** + * Returns the first LiveRegion that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching LiveRegion is found, returns \`null\`. + * + * @param {string} testId + * @returns {LiveRegionWrapper | null} + */ + findLiveRegionByTestId(testId: string): 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. + * If no matching MixedLineBarChart is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {MixedLineBarChartWrapper | null} + */ + findMixedLineBarChart(selector?: string): MixedLineBarChartWrapper | null; + + /** + * Returns the wrappers of all MixedLineBarCharts that match the specified CSS selector. + * If no CSS selector is specified, returns all of the MixedLineBarCharts inside the current wrapper. + * If no matching MixedLineBarChart is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllMixedLineBarCharts(selector?: string): Array; + /** + * Returns the first MixedLineBarChart that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching MixedLineBarChart is found, returns \`null\`. + * + * @param {string} testId + * @returns {MixedLineBarChartWrapper | null} + */ + findMixedLineBarChartByTestId(testId: string): 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. + * If no matching Modal is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {ModalWrapper | null} + */ + findModal(selector?: string): ModalWrapper | null; + + /** + * Returns the wrappers of all Modals that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Modals inside the current wrapper. + * If no matching Modal is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllModals(selector?: string): Array; + /** + * Returns the first Modal that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Modal is found, returns \`null\`. + * + * @param {string} testId + * @returns {ModalWrapper | null} + */ + findModalByTestId(testId: string): 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. + * If no matching Multiselect is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {MultiselectWrapper | null} + */ + findMultiselect(selector?: string): MultiselectWrapper | null; + + /** + * Returns the wrappers of all Multiselects that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Multiselects inside the current wrapper. + * If no matching Multiselect is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllMultiselects(selector?: string): Array; + /** + * Returns the first Multiselect that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Multiselect is found, returns \`null\`. + * + * @param {string} testId + * @returns {MultiselectWrapper | null} + */ + findMultiselectByTestId(testId: string): MultiselectWrapper | 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. + * If no matching Pagination is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {PaginationWrapper | null} + */ + findPagination(selector?: string): PaginationWrapper | null; + + /** + * Returns the wrappers of all Paginations that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Paginations inside the current wrapper. + * If no matching Pagination is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllPaginations(selector?: string): Array; + /** + * Returns the first Pagination that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Pagination is found, returns \`null\`. + * + * @param {string} testId + * @returns {PaginationWrapper | null} + */ + findPaginationByTestId(testId: string): PaginationWrapper | 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. + * If no matching PieChart is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {PieChartWrapper | null} + */ + findPieChart(selector?: string): PieChartWrapper | null; + + /** + * Returns the wrappers of all PieCharts that match the specified CSS selector. + * If no CSS selector is specified, returns all of the PieCharts inside the current wrapper. + * If no matching PieChart is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllPieCharts(selector?: string): Array; + /** + * Returns the first PieChart that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching PieChart is found, returns \`null\`. + * + * @param {string} testId + * @returns {PieChartWrapper | null} + */ + findPieChartByTestId(testId: string): 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. + * If no matching Popover is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {PopoverWrapper | null} + */ + findPopover(selector?: string): PopoverWrapper | null; + + /** + * Returns the wrappers of all Popovers that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Popovers inside the current wrapper. + * If no matching Popover is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllPopovers(selector?: string): Array; + /** + * Returns the first Popover that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Popover is found, returns \`null\`. + * + * @param {string} testId + * @returns {PopoverWrapper | null} + */ + findPopoverByTestId(testId: string): 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. + * If no matching ProgressBar is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {ProgressBarWrapper | null} + */ + findProgressBar(selector?: string): ProgressBarWrapper | null; + + /** + * Returns the wrappers of all ProgressBars that match the specified CSS selector. + * If no CSS selector is specified, returns all of the ProgressBars inside the current wrapper. + * If no matching ProgressBar is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllProgressBars(selector?: string): Array; + /** + * Returns the first ProgressBar that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching ProgressBar is found, returns \`null\`. + * + * @param {string} testId + * @returns {ProgressBarWrapper | null} + */ + findProgressBarByTestId(testId: string): 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. + * If no matching PromptInput is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {PromptInputWrapper | null} + */ + findPromptInput(selector?: string): PromptInputWrapper | null; + + /** + * Returns the wrappers of all PromptInputs that match the specified CSS selector. + * If no CSS selector is specified, returns all of the PromptInputs inside the current wrapper. + * If no matching PromptInput is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllPromptInputs(selector?: string): Array; + /** + * Returns the first PromptInput that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching PromptInput is found, returns \`null\`. + * + * @param {string} testId + * @returns {PromptInputWrapper | null} + */ + findPromptInputByTestId(testId: string): 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. + * If no matching PropertyFilter is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {PropertyFilterWrapper | null} + */ + findPropertyFilter(selector?: string): PropertyFilterWrapper | null; + + /** + * Returns the wrappers of all PropertyFilters that match the specified CSS selector. + * If no CSS selector is specified, returns all of the PropertyFilters inside the current wrapper. + * If no matching PropertyFilter is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllPropertyFilters(selector?: string): Array; + /** + * Returns the first PropertyFilter that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching PropertyFilter is found, returns \`null\`. + * + * @param {string} testId + * @returns {PropertyFilterWrapper | null} + */ + findPropertyFilterByTestId(testId: string): PropertyFilterWrapper | 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. + * If no matching RadioGroup is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {RadioGroupWrapper | null} + */ + findRadioGroup(selector?: string): RadioGroupWrapper | null; + + /** + * Returns the wrappers of all RadioGroups that match the specified CSS selector. + * If no CSS selector is specified, returns all of the RadioGroups inside the current wrapper. + * If no matching RadioGroup is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllRadioGroups(selector?: string): Array; + /** + * Returns the first RadioGroup that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching RadioGroup is found, returns \`null\`. + * + * @param {string} testId + * @returns {RadioGroupWrapper | null} + */ + findRadioGroupByTestId(testId: string): 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. + * If no matching S3ResourceSelector is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {S3ResourceSelectorWrapper | null} + */ + findS3ResourceSelector(selector?: string): S3ResourceSelectorWrapper | null; + + /** + * Returns the wrappers of all S3ResourceSelectors that match the specified CSS selector. + * If no CSS selector is specified, returns all of the S3ResourceSelectors inside the current wrapper. + * If no matching S3ResourceSelector is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllS3ResourceSelectors(selector?: string): Array; + /** + * Returns the first S3ResourceSelector that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching S3ResourceSelector is found, returns \`null\`. + * + * @param {string} testId + * @returns {S3ResourceSelectorWrapper | null} + */ + findS3ResourceSelectorByTestId(testId: string): 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. + * If no matching SegmentedControl is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {SegmentedControlWrapper | null} + */ + findSegmentedControl(selector?: string): SegmentedControlWrapper | null; + + /** + * Returns the wrappers of all SegmentedControls that match the specified CSS selector. + * If no CSS selector is specified, returns all of the SegmentedControls inside the current wrapper. + * If no matching SegmentedControl is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllSegmentedControls(selector?: string): Array; + /** + * Returns the first SegmentedControl that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching SegmentedControl is found, returns \`null\`. + * + * @param {string} testId + * @returns {SegmentedControlWrapper | null} + */ + findSegmentedControlByTestId(testId: string): 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. + * If no matching Select is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {SelectWrapper | null} + */ + findSelect(selector?: string): SelectWrapper | null; + + /** + * Returns the wrappers of all Selects that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Selects inside the current wrapper. + * If no matching Select is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllSelects(selector?: string): Array; + /** + * Returns the first Select that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Select is found, returns \`null\`. + * + * @param {string} testId + * @returns {SelectWrapper | null} + */ + findSelectByTestId(testId: string): 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. + * If no matching SideNavigation is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {SideNavigationWrapper | null} + */ + findSideNavigation(selector?: string): SideNavigationWrapper | null; + + /** + * Returns the wrappers of all SideNavigations that match the specified CSS selector. + * If no CSS selector is specified, returns all of the SideNavigations inside the current wrapper. + * If no matching SideNavigation is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllSideNavigations(selector?: string): Array; + /** + * Returns the first SideNavigation that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching SideNavigation is found, returns \`null\`. + * + * @param {string} testId + * @returns {SideNavigationWrapper | null} + */ + findSideNavigationByTestId(testId: string): 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. + * If no matching Slider is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {SliderWrapper | null} + */ + findSlider(selector?: string): SliderWrapper | null; + + /** + * Returns the wrappers of all Sliders that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Sliders inside the current wrapper. + * If no matching Slider is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllSliders(selector?: string): Array; + /** + * Returns the first Slider that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Slider is found, returns \`null\`. + * + * @param {string} testId + * @returns {SliderWrapper | null} + */ + findSliderByTestId(testId: string): 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. + * If no matching SpaceBetween is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {SpaceBetweenWrapper | null} + */ + findSpaceBetween(selector?: string): SpaceBetweenWrapper | null; + + /** + * Returns the wrappers of all SpaceBetweens that match the specified CSS selector. + * If no CSS selector is specified, returns all of the SpaceBetweens inside the current wrapper. + * If no matching SpaceBetween is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllSpaceBetweens(selector?: string): Array; + /** + * Returns the first SpaceBetween that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching SpaceBetween is found, returns \`null\`. + * + * @param {string} testId + * @returns {SpaceBetweenWrapper | null} + */ + findSpaceBetweenByTestId(testId: string): 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. + * If no matching Spinner is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {SpinnerWrapper | null} + */ + findSpinner(selector?: string): SpinnerWrapper | null; + + /** + * Returns the wrappers of all Spinners that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Spinners inside the current wrapper. + * If no matching Spinner is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllSpinners(selector?: string): Array; + /** + * Returns the first Spinner that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Spinner is found, returns \`null\`. + * + * @param {string} testId + * @returns {SpinnerWrapper | null} + */ + findSpinnerByTestId(testId: string): 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. + * If no matching SplitPanel is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {SplitPanelWrapper | null} + */ + findSplitPanel(selector?: string): SplitPanelWrapper | null; + + /** + * Returns the wrappers of all SplitPanels that match the specified CSS selector. + * If no CSS selector is specified, returns all of the SplitPanels inside the current wrapper. + * If no matching SplitPanel is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllSplitPanels(selector?: string): Array; + /** + * Returns the first SplitPanel that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching SplitPanel is found, returns \`null\`. + * + * @param {string} testId + * @returns {SplitPanelWrapper | null} + */ + findSplitPanelByTestId(testId: string): 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. + * If no matching StatusIndicator is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {StatusIndicatorWrapper | null} + */ + findStatusIndicator(selector?: string): StatusIndicatorWrapper | null; + + /** + * Returns the wrappers of all StatusIndicators that match the specified CSS selector. + * If no CSS selector is specified, returns all of the StatusIndicators inside the current wrapper. + * If no matching StatusIndicator is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllStatusIndicators(selector?: string): Array; + /** + * Returns the first StatusIndicator that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching StatusIndicator is found, returns \`null\`. + * + * @param {string} testId + * @returns {StatusIndicatorWrapper | null} + */ + findStatusIndicatorByTestId(testId: string): 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. + * If no matching Steps is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {StepsWrapper | null} + */ + findSteps(selector?: string): StepsWrapper | null; + + /** + * Returns the wrappers of all Steps that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Steps inside the current wrapper. + * If no matching Steps is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllSteps(selector?: string): Array; + /** + * Returns the first Steps that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Steps is found, returns \`null\`. + * + * @param {string} testId + * @returns {StepsWrapper | null} + */ + findStepsByTestId(testId: string): 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. + * If no matching Table is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {TableWrapper | null} + */ + findTable(selector?: string): TableWrapper | null; + + /** + * Returns the wrappers of all Tables that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Tables inside the current wrapper. + * If no matching Table is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllTables(selector?: string): Array; + /** + * Returns the first Table that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Table is found, returns \`null\`. + * + * @param {string} testId + * @returns {TableWrapper | null} + */ + findTableByTestId(testId: string): 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. + * If no matching Tabs is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {TabsWrapper | null} + */ + findTabs(selector?: string): TabsWrapper | null; + + /** + * Returns the wrappers of all Tabs that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Tabs inside the current wrapper. + * If no matching Tabs is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllTabs(selector?: string): Array; + /** + * Returns the first Tabs that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Tabs is found, returns \`null\`. + * + * @param {string} testId + * @returns {TabsWrapper | null} + */ + findTabsByTestId(testId: string): 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. + * If no matching TagEditor is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {TagEditorWrapper | null} + */ + findTagEditor(selector?: string): TagEditorWrapper | null; + + /** + * Returns the wrappers of all TagEditors that match the specified CSS selector. + * If no CSS selector is specified, returns all of the TagEditors inside the current wrapper. + * If no matching TagEditor is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllTagEditors(selector?: string): Array; + /** + * Returns the first TagEditor that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching TagEditor is found, returns \`null\`. + * + * @param {string} testId + * @returns {TagEditorWrapper | null} + */ + findTagEditorByTestId(testId: string): 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. + * If no matching TextContent is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {TextContentWrapper | null} + */ + findTextContent(selector?: string): TextContentWrapper | null; + + /** + * Returns the wrappers of all TextContents that match the specified CSS selector. + * If no CSS selector is specified, returns all of the TextContents inside the current wrapper. + * If no matching TextContent is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllTextContents(selector?: string): Array; + /** + * Returns the first TextContent that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching TextContent is found, returns \`null\`. + * + * @param {string} testId + * @returns {TextContentWrapper | null} + */ + findTextContentByTestId(testId: string): 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. + * If no matching TextFilter is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {TextFilterWrapper | null} + */ + findTextFilter(selector?: string): TextFilterWrapper | null; + + /** + * Returns the wrappers of all TextFilters that match the specified CSS selector. + * If no CSS selector is specified, returns all of the TextFilters inside the current wrapper. + * If no matching TextFilter is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllTextFilters(selector?: string): Array; + /** + * Returns the first TextFilter that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching TextFilter is found, returns \`null\`. + * + * @param {string} testId + * @returns {TextFilterWrapper | null} + */ + findTextFilterByTestId(testId: string): 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. + * If no matching Textarea is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {TextareaWrapper | null} + */ + findTextarea(selector?: string): TextareaWrapper | null; + + /** + * Returns the wrappers of all Textareas that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Textareas inside the current wrapper. + * If no matching Textarea is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllTextareas(selector?: string): Array; + /** + * Returns the first Textarea that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Textarea is found, returns \`null\`. + * + * @param {string} testId + * @returns {TextareaWrapper | null} + */ + findTextareaByTestId(testId: string): 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. + * If no matching Tiles is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {TilesWrapper | null} + */ + findTiles(selector?: string): TilesWrapper | null; + + /** + * Returns the wrappers of all Tiles that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Tiles inside the current wrapper. + * If no matching Tiles is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllTiles(selector?: string): Array; + /** + * Returns the first Tiles that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Tiles is found, returns \`null\`. + * + * @param {string} testId + * @returns {TilesWrapper | null} + */ + findTilesByTestId(testId: string): 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. + * If no matching TimeInput is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {TimeInputWrapper | null} + */ + findTimeInput(selector?: string): TimeInputWrapper | null; + + /** + * Returns the wrappers of all TimeInputs that match the specified CSS selector. + * If no CSS selector is specified, returns all of the TimeInputs inside the current wrapper. + * If no matching TimeInput is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllTimeInputs(selector?: string): Array; + /** + * Returns the first TimeInput that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching TimeInput is found, returns \`null\`. + * + * @param {string} testId + * @returns {TimeInputWrapper | null} + */ + findTimeInputByTestId(testId: string): 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. + * If no matching Toggle is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {ToggleWrapper | null} + */ + findToggle(selector?: string): ToggleWrapper | null; + + /** + * Returns the wrappers of all Toggles that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Toggles inside the current wrapper. + * If no matching Toggle is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllToggles(selector?: string): Array; + /** + * Returns the first Toggle that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Toggle is found, returns \`null\`. + * + * @param {string} testId + * @returns {ToggleWrapper | null} + */ + findToggleByTestId(testId: string): 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. + * If no matching ToggleButton is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {ToggleButtonWrapper | null} + */ + findToggleButton(selector?: string): ToggleButtonWrapper | null; + + /** + * Returns the wrappers of all ToggleButtons that match the specified CSS selector. + * If no CSS selector is specified, returns all of the ToggleButtons inside the current wrapper. + * If no matching ToggleButton is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllToggleButtons(selector?: string): Array; + /** + * Returns the first ToggleButton that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching ToggleButton is found, returns \`null\`. + * + * @param {string} testId + * @returns {ToggleButtonWrapper | null} + */ + findToggleButtonByTestId(testId: string): ToggleButtonWrapper | 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. + * If no matching TokenGroup is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {TokenGroupWrapper | null} + */ + findTokenGroup(selector?: string): TokenGroupWrapper | null; + + /** + * Returns the wrappers of all TokenGroups that match the specified CSS selector. + * If no CSS selector is specified, returns all of the TokenGroups inside the current wrapper. + * If no matching TokenGroup is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllTokenGroups(selector?: string): Array; + /** + * Returns the first TokenGroup that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching TokenGroup is found, returns \`null\`. + * + * @param {string} testId + * @returns {TokenGroupWrapper | null} + */ + findTokenGroupByTestId(testId: string): TokenGroupWrapper | 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. + * If no matching TopNavigation is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {TopNavigationWrapper | null} + */ + findTopNavigation(selector?: string): TopNavigationWrapper | 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. + * If no matching TutorialPanel is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {TutorialPanelWrapper | null} + */ + findTutorialPanel(selector?: string): TutorialPanelWrapper | null; + + /** + * Returns the wrappers of all TutorialPanels that match the specified CSS selector. + * If no CSS selector is specified, returns all of the TutorialPanels inside the current wrapper. + * If no matching TutorialPanel is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllTutorialPanels(selector?: string): Array; + /** + * Returns the first TutorialPanel that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching TutorialPanel is found, returns \`null\`. + * + * @param {string} testId + * @returns {TutorialPanelWrapper | null} + */ + findTutorialPanelByTestId(testId: string): 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. + * If no matching Wizard is found, returns \`null\`. + * + * @param {string} [selector] CSS Selector + * @returns {WizardWrapper | null} + */ + findWizard(selector?: string): WizardWrapper | null; + + /** + * Returns the wrappers of all Wizards that match the specified CSS selector. + * If no CSS selector is specified, returns all of the Wizards inside the current wrapper. + * If no matching Wizard is found, returns an empty array. + * + * @param {string} [selector] CSS Selector + * @returns {Array} + */ + findAllWizards(selector?: string): Array; + /** + * Returns the first Wizard that matches the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * If no matching Wizard is found, returns \`null\`. + * + * @param {string} testId + * @returns {WizardWrapper | null} + */ + findWizardByTestId(testId: string): WizardWrapper | null; } - } -ElementWrapper.prototype.findAlert = function(selector) { - const rootSelector = \`.\${AlertWrapper.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, AlertWrapper); - }; -ElementWrapper.prototype.findAnchorNavigation = function(selector) { - const rootSelector = \`.\${AnchorNavigationWrapper.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, AnchorNavigationWrapper); - }; -ElementWrapper.prototype.findAnnotation = function(selector) { - const rootSelector = \`.\${AnnotationWrapper.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, AnnotationWrapper); - }; -ElementWrapper.prototype.findAppLayout = function(selector) { - const rootSelector = \`.\${AppLayoutWrapper.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, AppLayoutWrapper); - }; -ElementWrapper.prototype.findAreaChart = function(selector) { - const rootSelector = \`.\${AreaChartWrapper.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, AreaChartWrapper); - }; -ElementWrapper.prototype.findAttributeEditor = function(selector) { - const rootSelector = \`.\${AttributeEditorWrapper.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, AttributeEditorWrapper); - }; -ElementWrapper.prototype.findAutosuggest = function(selector) { - const rootSelector = \`.\${AutosuggestWrapper.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, AutosuggestWrapper); - }; -ElementWrapper.prototype.findBadge = function(selector) { - const rootSelector = \`.\${BadgeWrapper.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, BadgeWrapper); - }; -ElementWrapper.prototype.findBarChart = function(selector) { - const rootSelector = \`.\${BarChartWrapper.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, BarChartWrapper); - }; -ElementWrapper.prototype.findBox = function(selector) { - const rootSelector = \`.\${BoxWrapper.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, BoxWrapper); - }; -ElementWrapper.prototype.findBreadcrumbGroup = function(selector) { - const rootSelector = \`.\${BreadcrumbGroupWrapper.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, BreadcrumbGroupWrapper); - }; -ElementWrapper.prototype.findButton = function(selector) { - const rootSelector = \`.\${ButtonWrapper.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, ButtonWrapper); - }; -ElementWrapper.prototype.findButtonDropdown = function(selector) { - const rootSelector = \`.\${ButtonDropdownWrapper.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, ButtonDropdownWrapper); - }; -ElementWrapper.prototype.findButtonGroup = function(selector) { - const rootSelector = \`.\${ButtonGroupWrapper.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, ButtonGroupWrapper); - }; -ElementWrapper.prototype.findCalendar = function(selector) { - const rootSelector = \`.\${CalendarWrapper.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, CalendarWrapper); - }; -ElementWrapper.prototype.findCards = function(selector) { - const rootSelector = \`.\${CardsWrapper.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, CardsWrapper); - }; -ElementWrapper.prototype.findCheckbox = function(selector) { - const rootSelector = \`.\${CheckboxWrapper.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, CheckboxWrapper); - }; -ElementWrapper.prototype.findCodeEditor = function(selector) { - const rootSelector = \`.\${CodeEditorWrapper.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, CodeEditorWrapper); - }; -ElementWrapper.prototype.findCollectionPreferences = function(selector) { - const rootSelector = \`.\${CollectionPreferencesWrapper.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, CollectionPreferencesWrapper); - }; -ElementWrapper.prototype.findColumnLayout = function(selector) { - const rootSelector = \`.\${ColumnLayoutWrapper.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, ColumnLayoutWrapper); - }; -ElementWrapper.prototype.findContainer = function(selector) { - const rootSelector = \`.\${ContainerWrapper.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, ContainerWrapper); - }; -ElementWrapper.prototype.findContentLayout = function(selector) { - const rootSelector = \`.\${ContentLayoutWrapper.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, ContentLayoutWrapper); - }; -ElementWrapper.prototype.findCopyToClipboard = function(selector) { - const rootSelector = \`.\${CopyToClipboardWrapper.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, CopyToClipboardWrapper); - }; -ElementWrapper.prototype.findDateInput = function(selector) { - const rootSelector = \`.\${DateInputWrapper.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, DateInputWrapper); - }; -ElementWrapper.prototype.findDatePicker = function(selector) { - const rootSelector = \`.\${DatePickerWrapper.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, DatePickerWrapper); - }; -ElementWrapper.prototype.findDateRangePicker = function(selector) { - const rootSelector = \`.\${DateRangePickerWrapper.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, DateRangePickerWrapper); - }; -ElementWrapper.prototype.findDrawer = function(selector) { - const rootSelector = \`.\${DrawerWrapper.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, DrawerWrapper); - }; -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.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 - return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, FileUploadWrapper); - }; -ElementWrapper.prototype.findFlashbar = function(selector) { - const rootSelector = \`.\${FlashbarWrapper.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, FlashbarWrapper); - }; -ElementWrapper.prototype.findForm = function(selector) { - const rootSelector = \`.\${FormWrapper.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, FormWrapper); - }; -ElementWrapper.prototype.findFormField = function(selector) { - const rootSelector = \`.\${FormFieldWrapper.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, FormFieldWrapper); - }; -ElementWrapper.prototype.findGrid = function(selector) { - const rootSelector = \`.\${GridWrapper.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, GridWrapper); - }; -ElementWrapper.prototype.findHeader = function(selector) { - const rootSelector = \`.\${HeaderWrapper.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, HeaderWrapper); - }; -ElementWrapper.prototype.findHelpPanel = function(selector) { - const rootSelector = \`.\${HelpPanelWrapper.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, HelpPanelWrapper); - }; -ElementWrapper.prototype.findHotspot = function(selector) { - const rootSelector = \`.\${HotspotWrapper.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, HotspotWrapper); - }; -ElementWrapper.prototype.findIcon = function(selector) { - const rootSelector = \`.\${IconWrapper.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, IconWrapper); - }; -ElementWrapper.prototype.findInput = function(selector) { - const rootSelector = \`.\${InputWrapper.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, InputWrapper); - }; -ElementWrapper.prototype.findKeyValuePairs = function(selector) { - const rootSelector = \`.\${KeyValuePairsWrapper.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, KeyValuePairsWrapper); - }; -ElementWrapper.prototype.findLineChart = function(selector) { - const rootSelector = \`.\${LineChartWrapper.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, LineChartWrapper); - }; -ElementWrapper.prototype.findLink = function(selector) { - const rootSelector = \`.\${LinkWrapper.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, LinkWrapper); - }; -ElementWrapper.prototype.findLiveRegion = function(selector) { - const rootSelector = \`.\${LiveRegionWrapper.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, LiveRegionWrapper); - }; -ElementWrapper.prototype.findMixedLineBarChart = function(selector) { - const rootSelector = \`.\${MixedLineBarChartWrapper.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, MixedLineBarChartWrapper); - }; -ElementWrapper.prototype.findModal = function(selector) { - const rootSelector = \`.\${ModalWrapper.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, ModalWrapper); - }; -ElementWrapper.prototype.findMultiselect = function(selector) { - const rootSelector = \`.\${MultiselectWrapper.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, MultiselectWrapper); - }; -ElementWrapper.prototype.findPagination = function(selector) { - const rootSelector = \`.\${PaginationWrapper.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, PaginationWrapper); - }; -ElementWrapper.prototype.findPieChart = function(selector) { - const rootSelector = \`.\${PieChartWrapper.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, PieChartWrapper); - }; -ElementWrapper.prototype.findPopover = function(selector) { - const rootSelector = \`.\${PopoverWrapper.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, PopoverWrapper); - }; -ElementWrapper.prototype.findProgressBar = function(selector) { - const rootSelector = \`.\${ProgressBarWrapper.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, ProgressBarWrapper); - }; -ElementWrapper.prototype.findPromptInput = function(selector) { - const rootSelector = \`.\${PromptInputWrapper.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, PromptInputWrapper); - }; -ElementWrapper.prototype.findPropertyFilter = function(selector) { - const rootSelector = \`.\${PropertyFilterWrapper.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, PropertyFilterWrapper); - }; -ElementWrapper.prototype.findRadioGroup = function(selector) { - const rootSelector = \`.\${RadioGroupWrapper.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, RadioGroupWrapper); - }; -ElementWrapper.prototype.findS3ResourceSelector = function(selector) { - const rootSelector = \`.\${S3ResourceSelectorWrapper.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, S3ResourceSelectorWrapper); - }; -ElementWrapper.prototype.findSegmentedControl = function(selector) { - const rootSelector = \`.\${SegmentedControlWrapper.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, SegmentedControlWrapper); - }; -ElementWrapper.prototype.findSelect = function(selector) { - const rootSelector = \`.\${SelectWrapper.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, SelectWrapper); - }; -ElementWrapper.prototype.findSideNavigation = function(selector) { - const rootSelector = \`.\${SideNavigationWrapper.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, SideNavigationWrapper); - }; -ElementWrapper.prototype.findSlider = function(selector) { - const rootSelector = \`.\${SliderWrapper.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, SliderWrapper); - }; -ElementWrapper.prototype.findSpaceBetween = function(selector) { - const rootSelector = \`.\${SpaceBetweenWrapper.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, SpaceBetweenWrapper); - }; -ElementWrapper.prototype.findSpinner = function(selector) { - const rootSelector = \`.\${SpinnerWrapper.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, SpinnerWrapper); - }; -ElementWrapper.prototype.findSplitPanel = function(selector) { - const rootSelector = \`.\${SplitPanelWrapper.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, SplitPanelWrapper); - }; -ElementWrapper.prototype.findStatusIndicator = function(selector) { - const rootSelector = \`.\${StatusIndicatorWrapper.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, StatusIndicatorWrapper); - }; -ElementWrapper.prototype.findSteps = function(selector) { - const rootSelector = \`.\${StepsWrapper.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, StepsWrapper); - }; -ElementWrapper.prototype.findTable = function(selector) { - const rootSelector = \`.\${TableWrapper.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, TableWrapper); - }; -ElementWrapper.prototype.findTabs = function(selector) { - const rootSelector = \`.\${TabsWrapper.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, TabsWrapper); - }; -ElementWrapper.prototype.findTagEditor = function(selector) { - const rootSelector = \`.\${TagEditorWrapper.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, TagEditorWrapper); - }; -ElementWrapper.prototype.findTextContent = function(selector) { - const rootSelector = \`.\${TextContentWrapper.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, TextContentWrapper); - }; -ElementWrapper.prototype.findTextFilter = function(selector) { - const rootSelector = \`.\${TextFilterWrapper.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, TextFilterWrapper); - }; -ElementWrapper.prototype.findTextarea = function(selector) { - const rootSelector = \`.\${TextareaWrapper.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, TextareaWrapper); - }; -ElementWrapper.prototype.findTiles = function(selector) { - const rootSelector = \`.\${TilesWrapper.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, TilesWrapper); - }; -ElementWrapper.prototype.findTimeInput = function(selector) { - const rootSelector = \`.\${TimeInputWrapper.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, TimeInputWrapper); - }; -ElementWrapper.prototype.findToggle = function(selector) { - const rootSelector = \`.\${ToggleWrapper.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, ToggleWrapper); - }; -ElementWrapper.prototype.findToggleButton = function(selector) { - const rootSelector = \`.\${ToggleButtonWrapper.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, ToggleButtonWrapper); - }; -ElementWrapper.prototype.findTokenGroup = function(selector) { - const rootSelector = \`.\${TokenGroupWrapper.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, TokenGroupWrapper); - }; -ElementWrapper.prototype.findTopNavigation = function(selector) { - const rootSelector = \`.\${TopNavigationWrapper.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, TopNavigationWrapper); - }; -ElementWrapper.prototype.findTutorialPanel = function(selector) { - const rootSelector = \`.\${TutorialPanelWrapper.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, TutorialPanelWrapper); - }; -ElementWrapper.prototype.findWizard = function(selector) { - const rootSelector = \`.\${WizardWrapper.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, WizardWrapper); - }; -export default function wrapper(root: Element = document.body) { if (document && document.body && !document.body.contains(root)) { console.warn('[AwsUi] [test-utils] provided element is not part of the document body, interactions may work incorrectly')}; return new ElementWrapper(root); }" -`; + } -exports[`Generate test utils ElementWrapper selectors ElementWrapper matches the snapshot 1`] = ` -"import { ElementWrapper } from '@cloudscape-design/test-utils-core/selectors'; -import { appendSelector } from '@cloudscape-design/test-utils-core/utils'; -export { ElementWrapper }; + ElementWrapper.prototype.findAlert = function(selector) { + const rootSelector = \`.\${AlertWrapper.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, AlertWrapper); + }; - import AlertWrapper from './alert'; - export { AlertWrapper }; - + ElementWrapper.prototype.findAllAlerts = function(selector) { + return this.findAllComponents(AlertWrapper, selector); + }; - import AnchorNavigationWrapper from './anchor-navigation'; - export { AnchorNavigationWrapper }; - + ElementWrapper.prototype.findAlertByTestId = function(testId) { + const selector = \`.\${AlertWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, AlertWrapper); + }; - import AnnotationWrapper from './annotation'; - export { AnnotationWrapper }; - + ElementWrapper.prototype.findAnchorNavigation = function(selector) { + const rootSelector = \`.\${AnchorNavigationWrapper.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, AnchorNavigationWrapper); + }; - import AppLayoutWrapper from './app-layout'; - export { AppLayoutWrapper }; - + ElementWrapper.prototype.findAllAnchorNavigations = function(selector) { + return this.findAllComponents(AnchorNavigationWrapper, selector); + }; - import AreaChartWrapper from './area-chart'; - export { AreaChartWrapper }; - + ElementWrapper.prototype.findAnchorNavigationByTestId = function(testId) { + const selector = \`.\${AnchorNavigationWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, AnchorNavigationWrapper); + }; - import AttributeEditorWrapper from './attribute-editor'; - export { AttributeEditorWrapper }; - + ElementWrapper.prototype.findAnnotation = function(selector) { + const rootSelector = \`.\${AnnotationWrapper.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, AnnotationWrapper); + }; - import AutosuggestWrapper from './autosuggest'; - export { AutosuggestWrapper }; - + ElementWrapper.prototype.findAllAnnotations = function(selector) { + return this.findAllComponents(AnnotationWrapper, selector); + }; - import BadgeWrapper from './badge'; - export { BadgeWrapper }; - + ElementWrapper.prototype.findAnnotationByTestId = function(testId) { + const selector = \`.\${AnnotationWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, AnnotationWrapper); + }; - import BarChartWrapper from './bar-chart'; - export { BarChartWrapper }; - + ElementWrapper.prototype.findAppLayout = function(selector) { + const rootSelector = \`.\${AppLayoutWrapper.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, AppLayoutWrapper); + }; - import BoxWrapper from './box'; - export { BoxWrapper }; - + ElementWrapper.prototype.findAreaChart = function(selector) { + const rootSelector = \`.\${AreaChartWrapper.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, AreaChartWrapper); + }; - import BreadcrumbGroupWrapper from './breadcrumb-group'; - export { BreadcrumbGroupWrapper }; - + ElementWrapper.prototype.findAllAreaCharts = function(selector) { + return this.findAllComponents(AreaChartWrapper, selector); + }; - import ButtonWrapper from './button'; - export { ButtonWrapper }; - + ElementWrapper.prototype.findAreaChartByTestId = function(testId) { + const selector = \`.\${AreaChartWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, AreaChartWrapper); + }; - import ButtonDropdownWrapper from './button-dropdown'; - export { ButtonDropdownWrapper }; - + ElementWrapper.prototype.findAttributeEditor = function(selector) { + const rootSelector = \`.\${AttributeEditorWrapper.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, AttributeEditorWrapper); + }; - import ButtonGroupWrapper from './button-group'; - export { ButtonGroupWrapper }; - + ElementWrapper.prototype.findAllAttributeEditors = function(selector) { + return this.findAllComponents(AttributeEditorWrapper, selector); + }; - import CalendarWrapper from './calendar'; - export { CalendarWrapper }; - + ElementWrapper.prototype.findAttributeEditorByTestId = function(testId) { + const selector = \`.\${AttributeEditorWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, AttributeEditorWrapper); + }; - import CardsWrapper from './cards'; - export { CardsWrapper }; - + ElementWrapper.prototype.findAutosuggest = function(selector) { + const rootSelector = \`.\${AutosuggestWrapper.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, AutosuggestWrapper); + }; - import CheckboxWrapper from './checkbox'; - export { CheckboxWrapper }; - + ElementWrapper.prototype.findAllAutosuggests = function(selector) { + return this.findAllComponents(AutosuggestWrapper, selector); + }; - import CodeEditorWrapper from './code-editor'; - export { CodeEditorWrapper }; - + ElementWrapper.prototype.findAutosuggestByTestId = function(testId) { + const selector = \`.\${AutosuggestWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, AutosuggestWrapper); + }; - import CollectionPreferencesWrapper from './collection-preferences'; - export { CollectionPreferencesWrapper }; - + ElementWrapper.prototype.findBadge = function(selector) { + const rootSelector = \`.\${BadgeWrapper.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, BadgeWrapper); + }; - import ColumnLayoutWrapper from './column-layout'; - export { ColumnLayoutWrapper }; - + ElementWrapper.prototype.findAllBadges = function(selector) { + return this.findAllComponents(BadgeWrapper, selector); + }; - import ContainerWrapper from './container'; - export { ContainerWrapper }; - + ElementWrapper.prototype.findBadgeByTestId = function(testId) { + const selector = \`.\${BadgeWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, BadgeWrapper); + }; - import ContentLayoutWrapper from './content-layout'; - export { ContentLayoutWrapper }; - + ElementWrapper.prototype.findBarChart = function(selector) { + const rootSelector = \`.\${BarChartWrapper.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, BarChartWrapper); + }; - import CopyToClipboardWrapper from './copy-to-clipboard'; - export { CopyToClipboardWrapper }; - + ElementWrapper.prototype.findAllBarCharts = function(selector) { + return this.findAllComponents(BarChartWrapper, selector); + }; - import DateInputWrapper from './date-input'; - export { DateInputWrapper }; - + ElementWrapper.prototype.findBarChartByTestId = function(testId) { + const selector = \`.\${BarChartWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, BarChartWrapper); + }; - import DatePickerWrapper from './date-picker'; - export { DatePickerWrapper }; - + ElementWrapper.prototype.findBox = function(selector) { + const rootSelector = \`.\${BoxWrapper.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, BoxWrapper); + }; - import DateRangePickerWrapper from './date-range-picker'; - export { DateRangePickerWrapper }; - + ElementWrapper.prototype.findAllBoxes = function(selector) { + return this.findAllComponents(BoxWrapper, selector); + }; - import DrawerWrapper from './drawer'; - export { DrawerWrapper }; - + ElementWrapper.prototype.findBoxByTestId = function(testId) { + const selector = \`.\${BoxWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, BoxWrapper); + }; - import ExpandableSectionWrapper from './expandable-section'; - export { ExpandableSectionWrapper }; - + ElementWrapper.prototype.findBreadcrumbGroup = function(selector) { + const rootSelector = \`.\${BreadcrumbGroupWrapper.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, BreadcrumbGroupWrapper); + }; - import FileUploadWrapper from './file-upload'; - export { FileUploadWrapper }; - + ElementWrapper.prototype.findAllBreadcrumbGroups = function(selector) { + return this.findAllComponents(BreadcrumbGroupWrapper, selector); + }; - import FlashbarWrapper from './flashbar'; - export { FlashbarWrapper }; - + ElementWrapper.prototype.findBreadcrumbGroupByTestId = function(testId) { + const selector = \`.\${BreadcrumbGroupWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, BreadcrumbGroupWrapper); + }; - import FormWrapper from './form'; - export { FormWrapper }; - + ElementWrapper.prototype.findButton = function(selector) { + const rootSelector = \`.\${ButtonWrapper.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, ButtonWrapper); + }; - import FormFieldWrapper from './form-field'; - export { FormFieldWrapper }; - + ElementWrapper.prototype.findAllButtons = function(selector) { + return this.findAllComponents(ButtonWrapper, selector); + }; - import GridWrapper from './grid'; - export { GridWrapper }; - + ElementWrapper.prototype.findButtonByTestId = function(testId) { + const selector = \`.\${ButtonWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ButtonWrapper); + }; - import HeaderWrapper from './header'; - export { HeaderWrapper }; - + ElementWrapper.prototype.findButtonDropdown = function(selector) { + const rootSelector = \`.\${ButtonDropdownWrapper.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, ButtonDropdownWrapper); + }; - import HelpPanelWrapper from './help-panel'; - export { HelpPanelWrapper }; - + ElementWrapper.prototype.findAllButtonDropdowns = function(selector) { + return this.findAllComponents(ButtonDropdownWrapper, selector); + }; - import HotspotWrapper from './hotspot'; - export { HotspotWrapper }; - + ElementWrapper.prototype.findButtonDropdownByTestId = function(testId) { + const selector = \`.\${ButtonDropdownWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ButtonDropdownWrapper); + }; - import IconWrapper from './icon'; - export { IconWrapper }; - + ElementWrapper.prototype.findButtonGroup = function(selector) { + const rootSelector = \`.\${ButtonGroupWrapper.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, ButtonGroupWrapper); + }; - import InputWrapper from './input'; - export { InputWrapper }; - + ElementWrapper.prototype.findAllButtonGroups = function(selector) { + return this.findAllComponents(ButtonGroupWrapper, selector); + }; - import KeyValuePairsWrapper from './key-value-pairs'; - export { KeyValuePairsWrapper }; - + ElementWrapper.prototype.findButtonGroupByTestId = function(testId) { + const selector = \`.\${ButtonGroupWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ButtonGroupWrapper); + }; - import LineChartWrapper from './line-chart'; - export { LineChartWrapper }; - + ElementWrapper.prototype.findCalendar = function(selector) { + const rootSelector = \`.\${CalendarWrapper.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, CalendarWrapper); + }; - import LinkWrapper from './link'; - export { LinkWrapper }; - + ElementWrapper.prototype.findAllCalendars = function(selector) { + return this.findAllComponents(CalendarWrapper, selector); + }; - import LiveRegionWrapper from './live-region'; - export { LiveRegionWrapper }; - + ElementWrapper.prototype.findCalendarByTestId = function(testId) { + const selector = \`.\${CalendarWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, CalendarWrapper); + }; - import MixedLineBarChartWrapper from './mixed-line-bar-chart'; - export { MixedLineBarChartWrapper }; - + ElementWrapper.prototype.findCards = function(selector) { + const rootSelector = \`.\${CardsWrapper.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, CardsWrapper); + }; - import ModalWrapper from './modal'; - export { ModalWrapper }; - + ElementWrapper.prototype.findAllCards = function(selector) { + return this.findAllComponents(CardsWrapper, selector); + }; - import MultiselectWrapper from './multiselect'; - export { MultiselectWrapper }; - + ElementWrapper.prototype.findCardsByTestId = function(testId) { + const selector = \`.\${CardsWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, CardsWrapper); + }; - import PaginationWrapper from './pagination'; - export { PaginationWrapper }; - + ElementWrapper.prototype.findCheckbox = function(selector) { + const rootSelector = \`.\${CheckboxWrapper.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, CheckboxWrapper); + }; - import PieChartWrapper from './pie-chart'; - export { PieChartWrapper }; - + ElementWrapper.prototype.findAllCheckboxes = function(selector) { + return this.findAllComponents(CheckboxWrapper, selector); + }; - import PopoverWrapper from './popover'; - export { PopoverWrapper }; - + ElementWrapper.prototype.findCheckboxByTestId = function(testId) { + const selector = \`.\${CheckboxWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, CheckboxWrapper); + }; - import ProgressBarWrapper from './progress-bar'; - export { ProgressBarWrapper }; - + ElementWrapper.prototype.findCodeEditor = function(selector) { + const rootSelector = \`.\${CodeEditorWrapper.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, CodeEditorWrapper); + }; - import PromptInputWrapper from './prompt-input'; - export { PromptInputWrapper }; - + ElementWrapper.prototype.findAllCodeEditors = function(selector) { + return this.findAllComponents(CodeEditorWrapper, selector); + }; - import PropertyFilterWrapper from './property-filter'; - export { PropertyFilterWrapper }; - + ElementWrapper.prototype.findCodeEditorByTestId = function(testId) { + const selector = \`.\${CodeEditorWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, CodeEditorWrapper); + }; - import RadioGroupWrapper from './radio-group'; - export { RadioGroupWrapper }; - + ElementWrapper.prototype.findCollectionPreferences = function(selector) { + const rootSelector = \`.\${CollectionPreferencesWrapper.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, CollectionPreferencesWrapper); + }; - import S3ResourceSelectorWrapper from './s3-resource-selector'; - export { S3ResourceSelectorWrapper }; - + ElementWrapper.prototype.findAllCollectionPreferences = function(selector) { + return this.findAllComponents(CollectionPreferencesWrapper, selector); + }; - import SegmentedControlWrapper from './segmented-control'; - export { SegmentedControlWrapper }; - + ElementWrapper.prototype.findCollectionPreferencesByTestId = function(testId) { + const selector = \`.\${CollectionPreferencesWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, CollectionPreferencesWrapper); + }; - import SelectWrapper from './select'; - export { SelectWrapper }; - + ElementWrapper.prototype.findColumnLayout = function(selector) { + const rootSelector = \`.\${ColumnLayoutWrapper.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, ColumnLayoutWrapper); + }; - import SideNavigationWrapper from './side-navigation'; - export { SideNavigationWrapper }; - + ElementWrapper.prototype.findAllColumnLayouts = function(selector) { + return this.findAllComponents(ColumnLayoutWrapper, selector); + }; - import SliderWrapper from './slider'; - export { SliderWrapper }; - + ElementWrapper.prototype.findColumnLayoutByTestId = function(testId) { + const selector = \`.\${ColumnLayoutWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ColumnLayoutWrapper); + }; - import SpaceBetweenWrapper from './space-between'; - export { SpaceBetweenWrapper }; - + ElementWrapper.prototype.findContainer = function(selector) { + const rootSelector = \`.\${ContainerWrapper.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, ContainerWrapper); + }; - import SpinnerWrapper from './spinner'; - export { SpinnerWrapper }; - + ElementWrapper.prototype.findAllContainers = function(selector) { + return this.findAllComponents(ContainerWrapper, selector); + }; - import SplitPanelWrapper from './split-panel'; - export { SplitPanelWrapper }; - + ElementWrapper.prototype.findContainerByTestId = function(testId) { + const selector = \`.\${ContainerWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ContainerWrapper); + }; - import StatusIndicatorWrapper from './status-indicator'; - export { StatusIndicatorWrapper }; - + ElementWrapper.prototype.findContentLayout = function(selector) { + const rootSelector = \`.\${ContentLayoutWrapper.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, ContentLayoutWrapper); + }; - import StepsWrapper from './steps'; - export { StepsWrapper }; - + ElementWrapper.prototype.findAllContentLayouts = function(selector) { + return this.findAllComponents(ContentLayoutWrapper, selector); + }; - import TableWrapper from './table'; - export { TableWrapper }; - + ElementWrapper.prototype.findContentLayoutByTestId = function(testId) { + const selector = \`.\${ContentLayoutWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ContentLayoutWrapper); + }; - import TabsWrapper from './tabs'; - export { TabsWrapper }; - + ElementWrapper.prototype.findCopyToClipboard = function(selector) { + const rootSelector = \`.\${CopyToClipboardWrapper.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, CopyToClipboardWrapper); + }; - import TagEditorWrapper from './tag-editor'; - export { TagEditorWrapper }; - + ElementWrapper.prototype.findAllCopyToClipboards = function(selector) { + return this.findAllComponents(CopyToClipboardWrapper, selector); + }; - import TextContentWrapper from './text-content'; - export { TextContentWrapper }; - + ElementWrapper.prototype.findCopyToClipboardByTestId = function(testId) { + const selector = \`.\${CopyToClipboardWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, CopyToClipboardWrapper); + }; - import TextFilterWrapper from './text-filter'; - export { TextFilterWrapper }; - + ElementWrapper.prototype.findDateInput = function(selector) { + const rootSelector = \`.\${DateInputWrapper.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, DateInputWrapper); + }; - import TextareaWrapper from './textarea'; - export { TextareaWrapper }; - + ElementWrapper.prototype.findAllDateInputs = function(selector) { + return this.findAllComponents(DateInputWrapper, selector); + }; + + ElementWrapper.prototype.findDateInputByTestId = function(testId) { + const selector = \`.\${DateInputWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, DateInputWrapper); + }; + + ElementWrapper.prototype.findDatePicker = function(selector) { + const rootSelector = \`.\${DatePickerWrapper.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, DatePickerWrapper); + }; + + ElementWrapper.prototype.findAllDatePickers = function(selector) { + return this.findAllComponents(DatePickerWrapper, selector); + }; + + ElementWrapper.prototype.findDatePickerByTestId = function(testId) { + const selector = \`.\${DatePickerWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, DatePickerWrapper); + }; + + ElementWrapper.prototype.findDateRangePicker = function(selector) { + const rootSelector = \`.\${DateRangePickerWrapper.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, DateRangePickerWrapper); + }; + + ElementWrapper.prototype.findAllDateRangePickers = function(selector) { + return this.findAllComponents(DateRangePickerWrapper, selector); + }; + + ElementWrapper.prototype.findDateRangePickerByTestId = function(testId) { + const selector = \`.\${DateRangePickerWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, DateRangePickerWrapper); + }; + + ElementWrapper.prototype.findDrawer = function(selector) { + const rootSelector = \`.\${DrawerWrapper.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, DrawerWrapper); + }; + + ElementWrapper.prototype.findAllDrawers = function(selector) { + return this.findAllComponents(DrawerWrapper, selector); + }; + + ElementWrapper.prototype.findDrawerByTestId = function(testId) { + const selector = \`.\${DrawerWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, DrawerWrapper); + }; + + 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.findAllExpandableSections = function(selector) { + return this.findAllComponents(ExpandableSectionWrapper, selector); + }; + + ElementWrapper.prototype.findExpandableSectionByTestId = function(testId) { + const selector = \`.\${ExpandableSectionWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ExpandableSectionWrapper); + }; + + 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 + return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, FileUploadWrapper); + }; + + ElementWrapper.prototype.findAllFileUploads = function(selector) { + return this.findAllComponents(FileUploadWrapper, selector); + }; + + ElementWrapper.prototype.findFileUploadByTestId = function(testId) { + const selector = \`.\${FileUploadWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, FileUploadWrapper); + }; + + ElementWrapper.prototype.findFlashbar = function(selector) { + const rootSelector = \`.\${FlashbarWrapper.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, FlashbarWrapper); + }; + + ElementWrapper.prototype.findAllFlashbars = function(selector) { + return this.findAllComponents(FlashbarWrapper, selector); + }; + + ElementWrapper.prototype.findFlashbarByTestId = function(testId) { + const selector = \`.\${FlashbarWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, FlashbarWrapper); + }; + + ElementWrapper.prototype.findForm = function(selector) { + const rootSelector = \`.\${FormWrapper.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, FormWrapper); + }; + + ElementWrapper.prototype.findAllForms = function(selector) { + return this.findAllComponents(FormWrapper, selector); + }; + + ElementWrapper.prototype.findFormByTestId = function(testId) { + const selector = \`.\${FormWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, FormWrapper); + }; + + ElementWrapper.prototype.findFormField = function(selector) { + const rootSelector = \`.\${FormFieldWrapper.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, FormFieldWrapper); + }; + + ElementWrapper.prototype.findAllFormFields = function(selector) { + return this.findAllComponents(FormFieldWrapper, selector); + }; + + ElementWrapper.prototype.findFormFieldByTestId = function(testId) { + const selector = \`.\${FormFieldWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, FormFieldWrapper); + }; + + ElementWrapper.prototype.findGrid = function(selector) { + const rootSelector = \`.\${GridWrapper.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, GridWrapper); + }; + + ElementWrapper.prototype.findAllGrids = function(selector) { + return this.findAllComponents(GridWrapper, selector); + }; + + ElementWrapper.prototype.findGridByTestId = function(testId) { + const selector = \`.\${GridWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, GridWrapper); + }; + + ElementWrapper.prototype.findHeader = function(selector) { + const rootSelector = \`.\${HeaderWrapper.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, HeaderWrapper); + }; + + ElementWrapper.prototype.findAllHeaders = function(selector) { + return this.findAllComponents(HeaderWrapper, selector); + }; + + ElementWrapper.prototype.findHeaderByTestId = function(testId) { + const selector = \`.\${HeaderWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, HeaderWrapper); + }; + + ElementWrapper.prototype.findHelpPanel = function(selector) { + const rootSelector = \`.\${HelpPanelWrapper.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, HelpPanelWrapper); + }; + + ElementWrapper.prototype.findAllHelpPanels = function(selector) { + return this.findAllComponents(HelpPanelWrapper, selector); + }; + + ElementWrapper.prototype.findHelpPanelByTestId = function(testId) { + const selector = \`.\${HelpPanelWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, HelpPanelWrapper); + }; + + ElementWrapper.prototype.findHotspot = function(selector) { + const rootSelector = \`.\${HotspotWrapper.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, HotspotWrapper); + }; + + ElementWrapper.prototype.findAllHotspots = function(selector) { + return this.findAllComponents(HotspotWrapper, selector); + }; + + ElementWrapper.prototype.findHotspotByTestId = function(testId) { + const selector = \`.\${HotspotWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, HotspotWrapper); + }; + + ElementWrapper.prototype.findIcon = function(selector) { + const rootSelector = \`.\${IconWrapper.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, IconWrapper); + }; + + ElementWrapper.prototype.findAllIcons = function(selector) { + return this.findAllComponents(IconWrapper, selector); + }; + + ElementWrapper.prototype.findIconByTestId = function(testId) { + const selector = \`.\${IconWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, IconWrapper); + }; + + ElementWrapper.prototype.findInput = function(selector) { + const rootSelector = \`.\${InputWrapper.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, InputWrapper); + }; + + ElementWrapper.prototype.findAllInputs = function(selector) { + return this.findAllComponents(InputWrapper, selector); + }; + + ElementWrapper.prototype.findInputByTestId = function(testId) { + const selector = \`.\${InputWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, InputWrapper); + }; + + ElementWrapper.prototype.findKeyValuePairs = function(selector) { + const rootSelector = \`.\${KeyValuePairsWrapper.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, KeyValuePairsWrapper); + }; + + ElementWrapper.prototype.findAllKeyValuePairs = function(selector) { + return this.findAllComponents(KeyValuePairsWrapper, selector); + }; + + ElementWrapper.prototype.findKeyValuePairsByTestId = function(testId) { + const selector = \`.\${KeyValuePairsWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, KeyValuePairsWrapper); + }; + + ElementWrapper.prototype.findLineChart = function(selector) { + const rootSelector = \`.\${LineChartWrapper.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, LineChartWrapper); + }; + + ElementWrapper.prototype.findAllLineCharts = function(selector) { + return this.findAllComponents(LineChartWrapper, selector); + }; + + ElementWrapper.prototype.findLineChartByTestId = function(testId) { + const selector = \`.\${LineChartWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, LineChartWrapper); + }; + + ElementWrapper.prototype.findLink = function(selector) { + const rootSelector = \`.\${LinkWrapper.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, LinkWrapper); + }; + + ElementWrapper.prototype.findAllLinks = function(selector) { + return this.findAllComponents(LinkWrapper, selector); + }; + + ElementWrapper.prototype.findLinkByTestId = function(testId) { + const selector = \`.\${LinkWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, LinkWrapper); + }; + + ElementWrapper.prototype.findLiveRegion = function(selector) { + const rootSelector = \`.\${LiveRegionWrapper.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, LiveRegionWrapper); + }; + + ElementWrapper.prototype.findAllLiveRegions = function(selector) { + return this.findAllComponents(LiveRegionWrapper, selector); + }; + + ElementWrapper.prototype.findLiveRegionByTestId = function(testId) { + const selector = \`.\${LiveRegionWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, LiveRegionWrapper); + }; + + ElementWrapper.prototype.findMixedLineBarChart = function(selector) { + const rootSelector = \`.\${MixedLineBarChartWrapper.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, MixedLineBarChartWrapper); + }; + + ElementWrapper.prototype.findAllMixedLineBarCharts = function(selector) { + return this.findAllComponents(MixedLineBarChartWrapper, selector); + }; + + ElementWrapper.prototype.findMixedLineBarChartByTestId = function(testId) { + const selector = \`.\${MixedLineBarChartWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, MixedLineBarChartWrapper); + }; + + ElementWrapper.prototype.findModal = function(selector) { + const rootSelector = \`.\${ModalWrapper.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, ModalWrapper); + }; + + ElementWrapper.prototype.findAllModals = function(selector) { + return this.findAllComponents(ModalWrapper, selector); + }; + + ElementWrapper.prototype.findModalByTestId = function(testId) { + const selector = \`.\${ModalWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ModalWrapper); + }; + + ElementWrapper.prototype.findMultiselect = function(selector) { + const rootSelector = \`.\${MultiselectWrapper.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, MultiselectWrapper); + }; + + ElementWrapper.prototype.findAllMultiselects = function(selector) { + return this.findAllComponents(MultiselectWrapper, selector); + }; + + ElementWrapper.prototype.findMultiselectByTestId = function(testId) { + const selector = \`.\${MultiselectWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, MultiselectWrapper); + }; + + ElementWrapper.prototype.findPagination = function(selector) { + const rootSelector = \`.\${PaginationWrapper.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, PaginationWrapper); + }; + + ElementWrapper.prototype.findAllPaginations = function(selector) { + return this.findAllComponents(PaginationWrapper, selector); + }; + + ElementWrapper.prototype.findPaginationByTestId = function(testId) { + const selector = \`.\${PaginationWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, PaginationWrapper); + }; + + ElementWrapper.prototype.findPieChart = function(selector) { + const rootSelector = \`.\${PieChartWrapper.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, PieChartWrapper); + }; + + ElementWrapper.prototype.findAllPieCharts = function(selector) { + return this.findAllComponents(PieChartWrapper, selector); + }; + + ElementWrapper.prototype.findPieChartByTestId = function(testId) { + const selector = \`.\${PieChartWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, PieChartWrapper); + }; + + ElementWrapper.prototype.findPopover = function(selector) { + const rootSelector = \`.\${PopoverWrapper.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, PopoverWrapper); + }; + + ElementWrapper.prototype.findAllPopovers = function(selector) { + return this.findAllComponents(PopoverWrapper, selector); + }; + + ElementWrapper.prototype.findPopoverByTestId = function(testId) { + const selector = \`.\${PopoverWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, PopoverWrapper); + }; + + ElementWrapper.prototype.findProgressBar = function(selector) { + const rootSelector = \`.\${ProgressBarWrapper.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, ProgressBarWrapper); + }; + + ElementWrapper.prototype.findAllProgressBars = function(selector) { + return this.findAllComponents(ProgressBarWrapper, selector); + }; + + ElementWrapper.prototype.findProgressBarByTestId = function(testId) { + const selector = \`.\${ProgressBarWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ProgressBarWrapper); + }; + + ElementWrapper.prototype.findPromptInput = function(selector) { + const rootSelector = \`.\${PromptInputWrapper.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, PromptInputWrapper); + }; + + ElementWrapper.prototype.findAllPromptInputs = function(selector) { + return this.findAllComponents(PromptInputWrapper, selector); + }; + + ElementWrapper.prototype.findPromptInputByTestId = function(testId) { + const selector = \`.\${PromptInputWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, PromptInputWrapper); + }; + + ElementWrapper.prototype.findPropertyFilter = function(selector) { + const rootSelector = \`.\${PropertyFilterWrapper.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, PropertyFilterWrapper); + }; + + ElementWrapper.prototype.findAllPropertyFilters = function(selector) { + return this.findAllComponents(PropertyFilterWrapper, selector); + }; + + ElementWrapper.prototype.findPropertyFilterByTestId = function(testId) { + const selector = \`.\${PropertyFilterWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, PropertyFilterWrapper); + }; + + ElementWrapper.prototype.findRadioGroup = function(selector) { + const rootSelector = \`.\${RadioGroupWrapper.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, RadioGroupWrapper); + }; + + ElementWrapper.prototype.findAllRadioGroups = function(selector) { + return this.findAllComponents(RadioGroupWrapper, selector); + }; + + ElementWrapper.prototype.findRadioGroupByTestId = function(testId) { + const selector = \`.\${RadioGroupWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, RadioGroupWrapper); + }; + + ElementWrapper.prototype.findS3ResourceSelector = function(selector) { + const rootSelector = \`.\${S3ResourceSelectorWrapper.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, S3ResourceSelectorWrapper); + }; + + ElementWrapper.prototype.findAllS3ResourceSelectors = function(selector) { + return this.findAllComponents(S3ResourceSelectorWrapper, selector); + }; + + ElementWrapper.prototype.findS3ResourceSelectorByTestId = function(testId) { + const selector = \`.\${S3ResourceSelectorWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, S3ResourceSelectorWrapper); + }; + + ElementWrapper.prototype.findSegmentedControl = function(selector) { + const rootSelector = \`.\${SegmentedControlWrapper.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, SegmentedControlWrapper); + }; + + ElementWrapper.prototype.findAllSegmentedControls = function(selector) { + return this.findAllComponents(SegmentedControlWrapper, selector); + }; + + ElementWrapper.prototype.findSegmentedControlByTestId = function(testId) { + const selector = \`.\${SegmentedControlWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SegmentedControlWrapper); + }; + + ElementWrapper.prototype.findSelect = function(selector) { + const rootSelector = \`.\${SelectWrapper.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, SelectWrapper); + }; + + ElementWrapper.prototype.findAllSelects = function(selector) { + return this.findAllComponents(SelectWrapper, selector); + }; + + ElementWrapper.prototype.findSelectByTestId = function(testId) { + const selector = \`.\${SelectWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SelectWrapper); + }; + + ElementWrapper.prototype.findSideNavigation = function(selector) { + const rootSelector = \`.\${SideNavigationWrapper.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, SideNavigationWrapper); + }; + + ElementWrapper.prototype.findAllSideNavigations = function(selector) { + return this.findAllComponents(SideNavigationWrapper, selector); + }; + + ElementWrapper.prototype.findSideNavigationByTestId = function(testId) { + const selector = \`.\${SideNavigationWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SideNavigationWrapper); + }; + + ElementWrapper.prototype.findSlider = function(selector) { + const rootSelector = \`.\${SliderWrapper.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, SliderWrapper); + }; + + ElementWrapper.prototype.findAllSliders = function(selector) { + return this.findAllComponents(SliderWrapper, selector); + }; + + ElementWrapper.prototype.findSliderByTestId = function(testId) { + const selector = \`.\${SliderWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SliderWrapper); + }; + + ElementWrapper.prototype.findSpaceBetween = function(selector) { + const rootSelector = \`.\${SpaceBetweenWrapper.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, SpaceBetweenWrapper); + }; + + ElementWrapper.prototype.findAllSpaceBetweens = function(selector) { + return this.findAllComponents(SpaceBetweenWrapper, selector); + }; + + ElementWrapper.prototype.findSpaceBetweenByTestId = function(testId) { + const selector = \`.\${SpaceBetweenWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SpaceBetweenWrapper); + }; + + ElementWrapper.prototype.findSpinner = function(selector) { + const rootSelector = \`.\${SpinnerWrapper.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, SpinnerWrapper); + }; + + ElementWrapper.prototype.findAllSpinners = function(selector) { + return this.findAllComponents(SpinnerWrapper, selector); + }; + + ElementWrapper.prototype.findSpinnerByTestId = function(testId) { + const selector = \`.\${SpinnerWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SpinnerWrapper); + }; + + ElementWrapper.prototype.findSplitPanel = function(selector) { + const rootSelector = \`.\${SplitPanelWrapper.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, SplitPanelWrapper); + }; + + ElementWrapper.prototype.findAllSplitPanels = function(selector) { + return this.findAllComponents(SplitPanelWrapper, selector); + }; + + ElementWrapper.prototype.findSplitPanelByTestId = function(testId) { + const selector = \`.\${SplitPanelWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SplitPanelWrapper); + }; + + ElementWrapper.prototype.findStatusIndicator = function(selector) { + const rootSelector = \`.\${StatusIndicatorWrapper.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, StatusIndicatorWrapper); + }; + + ElementWrapper.prototype.findAllStatusIndicators = function(selector) { + return this.findAllComponents(StatusIndicatorWrapper, selector); + }; + + ElementWrapper.prototype.findStatusIndicatorByTestId = function(testId) { + const selector = \`.\${StatusIndicatorWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, StatusIndicatorWrapper); + }; + + ElementWrapper.prototype.findSteps = function(selector) { + const rootSelector = \`.\${StepsWrapper.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, StepsWrapper); + }; + + ElementWrapper.prototype.findAllSteps = function(selector) { + return this.findAllComponents(StepsWrapper, selector); + }; + + ElementWrapper.prototype.findStepsByTestId = function(testId) { + const selector = \`.\${StepsWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, StepsWrapper); + }; + + ElementWrapper.prototype.findTable = function(selector) { + const rootSelector = \`.\${TableWrapper.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, TableWrapper); + }; + + ElementWrapper.prototype.findAllTables = function(selector) { + return this.findAllComponents(TableWrapper, selector); + }; + + ElementWrapper.prototype.findTableByTestId = function(testId) { + const selector = \`.\${TableWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TableWrapper); + }; + + ElementWrapper.prototype.findTabs = function(selector) { + const rootSelector = \`.\${TabsWrapper.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, TabsWrapper); + }; + + ElementWrapper.prototype.findAllTabs = function(selector) { + return this.findAllComponents(TabsWrapper, selector); + }; + + ElementWrapper.prototype.findTabsByTestId = function(testId) { + const selector = \`.\${TabsWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TabsWrapper); + }; + + ElementWrapper.prototype.findTagEditor = function(selector) { + const rootSelector = \`.\${TagEditorWrapper.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, TagEditorWrapper); + }; + + ElementWrapper.prototype.findAllTagEditors = function(selector) { + return this.findAllComponents(TagEditorWrapper, selector); + }; + + ElementWrapper.prototype.findTagEditorByTestId = function(testId) { + const selector = \`.\${TagEditorWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TagEditorWrapper); + }; + + ElementWrapper.prototype.findTextContent = function(selector) { + const rootSelector = \`.\${TextContentWrapper.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, TextContentWrapper); + }; + + ElementWrapper.prototype.findAllTextContents = function(selector) { + return this.findAllComponents(TextContentWrapper, selector); + }; + + ElementWrapper.prototype.findTextContentByTestId = function(testId) { + const selector = \`.\${TextContentWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TextContentWrapper); + }; + + ElementWrapper.prototype.findTextFilter = function(selector) { + const rootSelector = \`.\${TextFilterWrapper.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, TextFilterWrapper); + }; + + ElementWrapper.prototype.findAllTextFilters = function(selector) { + return this.findAllComponents(TextFilterWrapper, selector); + }; + + ElementWrapper.prototype.findTextFilterByTestId = function(testId) { + const selector = \`.\${TextFilterWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TextFilterWrapper); + }; + + ElementWrapper.prototype.findTextarea = function(selector) { + const rootSelector = \`.\${TextareaWrapper.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, TextareaWrapper); + }; + + ElementWrapper.prototype.findAllTextareas = function(selector) { + return this.findAllComponents(TextareaWrapper, selector); + }; + + ElementWrapper.prototype.findTextareaByTestId = function(testId) { + const selector = \`.\${TextareaWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TextareaWrapper); + }; + + ElementWrapper.prototype.findTiles = function(selector) { + const rootSelector = \`.\${TilesWrapper.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, TilesWrapper); + }; + + ElementWrapper.prototype.findAllTiles = function(selector) { + return this.findAllComponents(TilesWrapper, selector); + }; + + ElementWrapper.prototype.findTilesByTestId = function(testId) { + const selector = \`.\${TilesWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TilesWrapper); + }; + + ElementWrapper.prototype.findTimeInput = function(selector) { + const rootSelector = \`.\${TimeInputWrapper.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, TimeInputWrapper); + }; + + ElementWrapper.prototype.findAllTimeInputs = function(selector) { + return this.findAllComponents(TimeInputWrapper, selector); + }; + + ElementWrapper.prototype.findTimeInputByTestId = function(testId) { + const selector = \`.\${TimeInputWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TimeInputWrapper); + }; + + ElementWrapper.prototype.findToggle = function(selector) { + const rootSelector = \`.\${ToggleWrapper.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, ToggleWrapper); + }; + + ElementWrapper.prototype.findAllToggles = function(selector) { + return this.findAllComponents(ToggleWrapper, selector); + }; + + ElementWrapper.prototype.findToggleByTestId = function(testId) { + const selector = \`.\${ToggleWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ToggleWrapper); + }; + + ElementWrapper.prototype.findToggleButton = function(selector) { + const rootSelector = \`.\${ToggleButtonWrapper.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, ToggleButtonWrapper); + }; + + ElementWrapper.prototype.findAllToggleButtons = function(selector) { + return this.findAllComponents(ToggleButtonWrapper, selector); + }; + + ElementWrapper.prototype.findToggleButtonByTestId = function(testId) { + const selector = \`.\${ToggleButtonWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ToggleButtonWrapper); + }; + + ElementWrapper.prototype.findTokenGroup = function(selector) { + const rootSelector = \`.\${TokenGroupWrapper.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, TokenGroupWrapper); + }; + + ElementWrapper.prototype.findAllTokenGroups = function(selector) { + return this.findAllComponents(TokenGroupWrapper, selector); + }; + + ElementWrapper.prototype.findTokenGroupByTestId = function(testId) { + const selector = \`.\${TokenGroupWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TokenGroupWrapper); + }; + + ElementWrapper.prototype.findTopNavigation = function(selector) { + const rootSelector = \`.\${TopNavigationWrapper.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, TopNavigationWrapper); + }; + + ElementWrapper.prototype.findTutorialPanel = function(selector) { + const rootSelector = \`.\${TutorialPanelWrapper.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, TutorialPanelWrapper); + }; + + ElementWrapper.prototype.findAllTutorialPanels = function(selector) { + return this.findAllComponents(TutorialPanelWrapper, selector); + }; + + ElementWrapper.prototype.findTutorialPanelByTestId = function(testId) { + const selector = \`.\${TutorialPanelWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TutorialPanelWrapper); + }; + + ElementWrapper.prototype.findWizard = function(selector) { + const rootSelector = \`.\${WizardWrapper.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, WizardWrapper); + }; + + ElementWrapper.prototype.findAllWizards = function(selector) { + return this.findAllComponents(WizardWrapper, selector); + }; + + ElementWrapper.prototype.findWizardByTestId = function(testId) { + const selector = \`.\${WizardWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, WizardWrapper); + }; +export default function wrapper(root: Element = document.body) { if (document && document.body && !document.body.contains(root)) { console.warn('[AwsUi] [test-utils] provided element is not part of the document body, interactions may work incorrectly')}; return new ElementWrapper(root); }" +`; + +exports[`Generate test utils ElementWrapper selectors ElementWrapper matches the snapshot 1`] = ` +"import { ElementWrapper } from '@cloudscape-design/test-utils-core/selectors'; +import { appendSelector } from '@cloudscape-design/test-utils-core/utils'; +export { ElementWrapper }; + + import AlertWrapper from './alert'; + export { AlertWrapper }; + + + import AnchorNavigationWrapper from './anchor-navigation'; + export { AnchorNavigationWrapper }; + + + import AnnotationWrapper from './annotation'; + export { AnnotationWrapper }; + + + import AppLayoutWrapper from './app-layout'; + export { AppLayoutWrapper }; + + + import AreaChartWrapper from './area-chart'; + export { AreaChartWrapper }; + + + import AttributeEditorWrapper from './attribute-editor'; + export { AttributeEditorWrapper }; + + + import AutosuggestWrapper from './autosuggest'; + export { AutosuggestWrapper }; + + + import BadgeWrapper from './badge'; + export { BadgeWrapper }; + + + import BarChartWrapper from './bar-chart'; + export { BarChartWrapper }; + + + import BoxWrapper from './box'; + export { BoxWrapper }; + + + import BreadcrumbGroupWrapper from './breadcrumb-group'; + export { BreadcrumbGroupWrapper }; + + + import ButtonWrapper from './button'; + export { ButtonWrapper }; + + + import ButtonDropdownWrapper from './button-dropdown'; + export { ButtonDropdownWrapper }; + + + import ButtonGroupWrapper from './button-group'; + export { ButtonGroupWrapper }; + + + import CalendarWrapper from './calendar'; + export { CalendarWrapper }; + + + import CardsWrapper from './cards'; + export { CardsWrapper }; + + + import CheckboxWrapper from './checkbox'; + export { CheckboxWrapper }; + + + import CodeEditorWrapper from './code-editor'; + export { CodeEditorWrapper }; + + + import CollectionPreferencesWrapper from './collection-preferences'; + export { CollectionPreferencesWrapper }; + + + import ColumnLayoutWrapper from './column-layout'; + export { ColumnLayoutWrapper }; + + + import ContainerWrapper from './container'; + export { ContainerWrapper }; + + + import ContentLayoutWrapper from './content-layout'; + export { ContentLayoutWrapper }; + + + import CopyToClipboardWrapper from './copy-to-clipboard'; + export { CopyToClipboardWrapper }; + + + import DateInputWrapper from './date-input'; + export { DateInputWrapper }; + + + import DatePickerWrapper from './date-picker'; + export { DatePickerWrapper }; + + + import DateRangePickerWrapper from './date-range-picker'; + export { DateRangePickerWrapper }; + + + import DrawerWrapper from './drawer'; + export { DrawerWrapper }; + + + import ExpandableSectionWrapper from './expandable-section'; + export { ExpandableSectionWrapper }; + + + import FileUploadWrapper from './file-upload'; + export { FileUploadWrapper }; + + + import FlashbarWrapper from './flashbar'; + export { FlashbarWrapper }; + + + import FormWrapper from './form'; + export { FormWrapper }; + + + import FormFieldWrapper from './form-field'; + export { FormFieldWrapper }; + + + import GridWrapper from './grid'; + export { GridWrapper }; + + + import HeaderWrapper from './header'; + export { HeaderWrapper }; + + + import HelpPanelWrapper from './help-panel'; + export { HelpPanelWrapper }; + + + import HotspotWrapper from './hotspot'; + export { HotspotWrapper }; + + + import IconWrapper from './icon'; + export { IconWrapper }; + + + import InputWrapper from './input'; + export { InputWrapper }; + + + import KeyValuePairsWrapper from './key-value-pairs'; + export { KeyValuePairsWrapper }; + + + import LineChartWrapper from './line-chart'; + export { LineChartWrapper }; + + + import LinkWrapper from './link'; + export { LinkWrapper }; + + + import LiveRegionWrapper from './live-region'; + export { LiveRegionWrapper }; + + + import MixedLineBarChartWrapper from './mixed-line-bar-chart'; + export { MixedLineBarChartWrapper }; + + + import ModalWrapper from './modal'; + export { ModalWrapper }; + + + import MultiselectWrapper from './multiselect'; + export { MultiselectWrapper }; + + + import PaginationWrapper from './pagination'; + export { PaginationWrapper }; + + + import PieChartWrapper from './pie-chart'; + export { PieChartWrapper }; + + + import PopoverWrapper from './popover'; + export { PopoverWrapper }; + + + import ProgressBarWrapper from './progress-bar'; + export { ProgressBarWrapper }; + + + import PromptInputWrapper from './prompt-input'; + export { PromptInputWrapper }; + + + import PropertyFilterWrapper from './property-filter'; + export { PropertyFilterWrapper }; + + + import RadioGroupWrapper from './radio-group'; + export { RadioGroupWrapper }; + + + import S3ResourceSelectorWrapper from './s3-resource-selector'; + export { S3ResourceSelectorWrapper }; + + + import SegmentedControlWrapper from './segmented-control'; + export { SegmentedControlWrapper }; + + + import SelectWrapper from './select'; + export { SelectWrapper }; + + + import SideNavigationWrapper from './side-navigation'; + export { SideNavigationWrapper }; + + + import SliderWrapper from './slider'; + export { SliderWrapper }; + + + import SpaceBetweenWrapper from './space-between'; + export { SpaceBetweenWrapper }; + + + import SpinnerWrapper from './spinner'; + export { SpinnerWrapper }; + + + import SplitPanelWrapper from './split-panel'; + export { SplitPanelWrapper }; + + + import StatusIndicatorWrapper from './status-indicator'; + export { StatusIndicatorWrapper }; + + + import StepsWrapper from './steps'; + export { StepsWrapper }; + + + import TableWrapper from './table'; + export { TableWrapper }; + + + import TabsWrapper from './tabs'; + export { TabsWrapper }; + + + import TagEditorWrapper from './tag-editor'; + export { TagEditorWrapper }; + + + import TextContentWrapper from './text-content'; + export { TextContentWrapper }; + + + import TextFilterWrapper from './text-filter'; + export { TextFilterWrapper }; + + + import TextareaWrapper from './textarea'; + export { TextareaWrapper }; + import TilesWrapper from './tiles'; export { TilesWrapper }; - import TimeInputWrapper from './time-input'; - export { TimeInputWrapper }; - + import TimeInputWrapper from './time-input'; + export { TimeInputWrapper }; + + + import ToggleWrapper from './toggle'; + export { ToggleWrapper }; + + + import ToggleButtonWrapper from './toggle-button'; + export { ToggleButtonWrapper }; + + + import TokenGroupWrapper from './token-group'; + export { TokenGroupWrapper }; + + + import TopNavigationWrapper from './top-navigation'; + export { TopNavigationWrapper }; + + + import TutorialPanelWrapper from './tutorial-panel'; + export { TutorialPanelWrapper }; + + + import WizardWrapper from './wizard'; + export { WizardWrapper }; + +declare module '@cloudscape-design/test-utils-core/dist/selectors' { + interface ElementWrapper { + + /** + * Returns a wrapper that matches the Alerts with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Alerts. + * + * @param {string} [selector] CSS Selector + * @returns {AlertWrapper} + */ + findAlert(selector?: string): AlertWrapper; + + /** + * Returns a multi-element wrapper that matches Alerts with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Alerts. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllAlerts(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Alert with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {AlertWrapper} + */ + findAlertByTestId(testId: string): AlertWrapper; + + /** + * Returns a wrapper that matches the AnchorNavigations with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches AnchorNavigations. + * + * @param {string} [selector] CSS Selector + * @returns {AnchorNavigationWrapper} + */ + findAnchorNavigation(selector?: string): AnchorNavigationWrapper; + + /** + * Returns a multi-element wrapper that matches AnchorNavigations with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches AnchorNavigations. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllAnchorNavigations(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first AnchorNavigation with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {AnchorNavigationWrapper} + */ + findAnchorNavigationByTestId(testId: string): AnchorNavigationWrapper; + + /** + * Returns a wrapper that matches the Annotations with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Annotations. + * + * @param {string} [selector] CSS Selector + * @returns {AnnotationWrapper} + */ + findAnnotation(selector?: string): AnnotationWrapper; + + /** + * Returns a multi-element wrapper that matches Annotations with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Annotations. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllAnnotations(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Annotation with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {AnnotationWrapper} + */ + findAnnotationByTestId(testId: string): AnnotationWrapper; + + /** + * Returns a wrapper that matches the AppLayouts with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches AppLayouts. + * + * @param {string} [selector] CSS Selector + * @returns {AppLayoutWrapper} + */ + findAppLayout(selector?: string): AppLayoutWrapper; + + /** + * Returns a wrapper that matches the AreaCharts with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches AreaCharts. + * + * @param {string} [selector] CSS Selector + * @returns {AreaChartWrapper} + */ + findAreaChart(selector?: string): AreaChartWrapper; + + /** + * Returns a multi-element wrapper that matches AreaCharts with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches AreaCharts. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllAreaCharts(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first AreaChart with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {AreaChartWrapper} + */ + findAreaChartByTestId(testId: string): AreaChartWrapper; + + /** + * Returns a wrapper that matches the AttributeEditors with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches AttributeEditors. + * + * @param {string} [selector] CSS Selector + * @returns {AttributeEditorWrapper} + */ + findAttributeEditor(selector?: string): AttributeEditorWrapper; + + /** + * Returns a multi-element wrapper that matches AttributeEditors with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches AttributeEditors. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllAttributeEditors(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first AttributeEditor with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {AttributeEditorWrapper} + */ + findAttributeEditorByTestId(testId: string): AttributeEditorWrapper; + + /** + * Returns a wrapper that matches the Autosuggests with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Autosuggests. + * + * @param {string} [selector] CSS Selector + * @returns {AutosuggestWrapper} + */ + findAutosuggest(selector?: string): AutosuggestWrapper; + + /** + * Returns a multi-element wrapper that matches Autosuggests with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Autosuggests. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllAutosuggests(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Autosuggest with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {AutosuggestWrapper} + */ + findAutosuggestByTestId(testId: string): AutosuggestWrapper; + + /** + * Returns a wrapper that matches the Badges with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Badges. + * + * @param {string} [selector] CSS Selector + * @returns {BadgeWrapper} + */ + findBadge(selector?: string): BadgeWrapper; + + /** + * Returns a multi-element wrapper that matches Badges with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Badges. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllBadges(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Badge with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {BadgeWrapper} + */ + findBadgeByTestId(testId: string): BadgeWrapper; + + /** + * Returns a wrapper that matches the BarCharts with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches BarCharts. + * + * @param {string} [selector] CSS Selector + * @returns {BarChartWrapper} + */ + findBarChart(selector?: string): BarChartWrapper; + + /** + * Returns a multi-element wrapper that matches BarCharts with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches BarCharts. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllBarCharts(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first BarChart with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {BarChartWrapper} + */ + findBarChartByTestId(testId: string): BarChartWrapper; + + /** + * Returns a wrapper that matches the Boxes with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Boxes. + * + * @param {string} [selector] CSS Selector + * @returns {BoxWrapper} + */ + findBox(selector?: string): BoxWrapper; + + /** + * Returns a multi-element wrapper that matches Boxes with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Boxes. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllBoxes(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Box with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {BoxWrapper} + */ + findBoxByTestId(testId: string): BoxWrapper; + + /** + * Returns a wrapper that matches the BreadcrumbGroups with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches BreadcrumbGroups. + * + * @param {string} [selector] CSS Selector + * @returns {BreadcrumbGroupWrapper} + */ + findBreadcrumbGroup(selector?: string): BreadcrumbGroupWrapper; + + /** + * Returns a multi-element wrapper that matches BreadcrumbGroups with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches BreadcrumbGroups. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllBreadcrumbGroups(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first BreadcrumbGroup with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {BreadcrumbGroupWrapper} + */ + findBreadcrumbGroupByTestId(testId: string): BreadcrumbGroupWrapper; + + /** + * Returns a wrapper that matches the Buttons with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Buttons. + * + * @param {string} [selector] CSS Selector + * @returns {ButtonWrapper} + */ + findButton(selector?: string): ButtonWrapper; + + /** + * Returns a multi-element wrapper that matches Buttons with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Buttons. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllButtons(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Button with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {ButtonWrapper} + */ + findButtonByTestId(testId: string): ButtonWrapper; + + /** + * Returns a wrapper that matches the ButtonDropdowns with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches ButtonDropdowns. + * + * @param {string} [selector] CSS Selector + * @returns {ButtonDropdownWrapper} + */ + findButtonDropdown(selector?: string): ButtonDropdownWrapper; + + /** + * Returns a multi-element wrapper that matches ButtonDropdowns with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches ButtonDropdowns. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllButtonDropdowns(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first ButtonDropdown with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {ButtonDropdownWrapper} + */ + findButtonDropdownByTestId(testId: string): ButtonDropdownWrapper; + + /** + * Returns a wrapper that matches the ButtonGroups with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches ButtonGroups. + * + * @param {string} [selector] CSS Selector + * @returns {ButtonGroupWrapper} + */ + findButtonGroup(selector?: string): ButtonGroupWrapper; + + /** + * Returns a multi-element wrapper that matches ButtonGroups with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches ButtonGroups. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllButtonGroups(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first ButtonGroup with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {ButtonGroupWrapper} + */ + findButtonGroupByTestId(testId: string): ButtonGroupWrapper; + + /** + * Returns a wrapper that matches the Calendars with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Calendars. + * + * @param {string} [selector] CSS Selector + * @returns {CalendarWrapper} + */ + findCalendar(selector?: string): CalendarWrapper; + + /** + * Returns a multi-element wrapper that matches Calendars with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Calendars. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllCalendars(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Calendar with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {CalendarWrapper} + */ + findCalendarByTestId(testId: string): CalendarWrapper; + + /** + * Returns a wrapper that matches the Cards with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Cards. + * + * @param {string} [selector] CSS Selector + * @returns {CardsWrapper} + */ + findCards(selector?: string): CardsWrapper; + + /** + * Returns a multi-element wrapper that matches Cards with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Cards. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllCards(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Cards with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {CardsWrapper} + */ + findCardsByTestId(testId: string): CardsWrapper; + + /** + * Returns a wrapper that matches the Checkboxes with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Checkboxes. + * + * @param {string} [selector] CSS Selector + * @returns {CheckboxWrapper} + */ + findCheckbox(selector?: string): CheckboxWrapper; + + /** + * Returns a multi-element wrapper that matches Checkboxes with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Checkboxes. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllCheckboxes(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Checkbox with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {CheckboxWrapper} + */ + findCheckboxByTestId(testId: string): CheckboxWrapper; + + /** + * Returns a wrapper that matches the CodeEditors with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches CodeEditors. + * + * @param {string} [selector] CSS Selector + * @returns {CodeEditorWrapper} + */ + findCodeEditor(selector?: string): CodeEditorWrapper; + + /** + * Returns a multi-element wrapper that matches CodeEditors with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches CodeEditors. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllCodeEditors(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first CodeEditor with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {CodeEditorWrapper} + */ + findCodeEditorByTestId(testId: string): CodeEditorWrapper; + + /** + * Returns a wrapper that matches the CollectionPreferences with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches CollectionPreferences. + * + * @param {string} [selector] CSS Selector + * @returns {CollectionPreferencesWrapper} + */ + findCollectionPreferences(selector?: string): CollectionPreferencesWrapper; + + /** + * Returns a multi-element wrapper that matches CollectionPreferences with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches CollectionPreferences. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllCollectionPreferences(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first CollectionPreferences with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {CollectionPreferencesWrapper} + */ + findCollectionPreferencesByTestId(testId: string): CollectionPreferencesWrapper; + + /** + * Returns a wrapper that matches the ColumnLayouts with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches ColumnLayouts. + * + * @param {string} [selector] CSS Selector + * @returns {ColumnLayoutWrapper} + */ + findColumnLayout(selector?: string): ColumnLayoutWrapper; + + /** + * Returns a multi-element wrapper that matches ColumnLayouts with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches ColumnLayouts. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllColumnLayouts(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first ColumnLayout with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {ColumnLayoutWrapper} + */ + findColumnLayoutByTestId(testId: string): ColumnLayoutWrapper; + + /** + * Returns a wrapper that matches the Containers with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Containers. + * + * @param {string} [selector] CSS Selector + * @returns {ContainerWrapper} + */ + findContainer(selector?: string): ContainerWrapper; + + /** + * Returns a multi-element wrapper that matches Containers with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Containers. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllContainers(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Container with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {ContainerWrapper} + */ + findContainerByTestId(testId: string): ContainerWrapper; + + /** + * Returns a wrapper that matches the ContentLayouts with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches ContentLayouts. + * + * @param {string} [selector] CSS Selector + * @returns {ContentLayoutWrapper} + */ + findContentLayout(selector?: string): ContentLayoutWrapper; + + /** + * Returns a multi-element wrapper that matches ContentLayouts with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches ContentLayouts. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllContentLayouts(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first ContentLayout with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {ContentLayoutWrapper} + */ + findContentLayoutByTestId(testId: string): ContentLayoutWrapper; + + /** + * Returns a wrapper that matches the CopyToClipboards with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches CopyToClipboards. + * + * @param {string} [selector] CSS Selector + * @returns {CopyToClipboardWrapper} + */ + findCopyToClipboard(selector?: string): CopyToClipboardWrapper; + + /** + * Returns a multi-element wrapper that matches CopyToClipboards with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches CopyToClipboards. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllCopyToClipboards(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first CopyToClipboard with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {CopyToClipboardWrapper} + */ + findCopyToClipboardByTestId(testId: string): CopyToClipboardWrapper; + + /** + * Returns a wrapper that matches the DateInputs with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches DateInputs. + * + * @param {string} [selector] CSS Selector + * @returns {DateInputWrapper} + */ + findDateInput(selector?: string): DateInputWrapper; + + /** + * Returns a multi-element wrapper that matches DateInputs with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches DateInputs. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllDateInputs(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first DateInput with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {DateInputWrapper} + */ + findDateInputByTestId(testId: string): DateInputWrapper; + + /** + * Returns a wrapper that matches the DatePickers with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches DatePickers. + * + * @param {string} [selector] CSS Selector + * @returns {DatePickerWrapper} + */ + findDatePicker(selector?: string): DatePickerWrapper; + + /** + * Returns a multi-element wrapper that matches DatePickers with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches DatePickers. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllDatePickers(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first DatePicker with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {DatePickerWrapper} + */ + findDatePickerByTestId(testId: string): DatePickerWrapper; + + /** + * Returns a wrapper that matches the DateRangePickers with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches DateRangePickers. + * + * @param {string} [selector] CSS Selector + * @returns {DateRangePickerWrapper} + */ + findDateRangePicker(selector?: string): DateRangePickerWrapper; + + /** + * Returns a multi-element wrapper that matches DateRangePickers with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches DateRangePickers. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllDateRangePickers(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first DateRangePicker with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {DateRangePickerWrapper} + */ + findDateRangePickerByTestId(testId: string): DateRangePickerWrapper; + + /** + * Returns a wrapper that matches the Drawers with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Drawers. + * + * @param {string} [selector] CSS Selector + * @returns {DrawerWrapper} + */ + findDrawer(selector?: string): DrawerWrapper; + + /** + * Returns a multi-element wrapper that matches Drawers with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Drawers. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllDrawers(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Drawer with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {DrawerWrapper} + */ + findDrawerByTestId(testId: string): DrawerWrapper; + + /** + * Returns a wrapper that matches the ExpandableSections with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches ExpandableSections. + * + * @param {string} [selector] CSS Selector + * @returns {ExpandableSectionWrapper} + */ + findExpandableSection(selector?: string): ExpandableSectionWrapper; + + /** + * Returns a multi-element wrapper that matches ExpandableSections with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches ExpandableSections. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllExpandableSections(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first ExpandableSection with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {ExpandableSectionWrapper} + */ + findExpandableSectionByTestId(testId: string): ExpandableSectionWrapper; + + /** + * Returns a wrapper that matches the FileUploads with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches FileUploads. + * + * @param {string} [selector] CSS Selector + * @returns {FileUploadWrapper} + */ + findFileUpload(selector?: string): FileUploadWrapper; + + /** + * Returns a multi-element wrapper that matches FileUploads with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches FileUploads. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllFileUploads(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first FileUpload with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {FileUploadWrapper} + */ + findFileUploadByTestId(testId: string): FileUploadWrapper; + + /** + * Returns a wrapper that matches the Flashbars with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Flashbars. + * + * @param {string} [selector] CSS Selector + * @returns {FlashbarWrapper} + */ + findFlashbar(selector?: string): FlashbarWrapper; + + /** + * Returns a multi-element wrapper that matches Flashbars with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Flashbars. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllFlashbars(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Flashbar with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {FlashbarWrapper} + */ + findFlashbarByTestId(testId: string): FlashbarWrapper; + + /** + * Returns a wrapper that matches the Forms with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Forms. + * + * @param {string} [selector] CSS Selector + * @returns {FormWrapper} + */ + findForm(selector?: string): FormWrapper; + + /** + * Returns a multi-element wrapper that matches Forms with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Forms. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllForms(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Form with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {FormWrapper} + */ + findFormByTestId(testId: string): FormWrapper; + + /** + * Returns a wrapper that matches the FormFields with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches FormFields. + * + * @param {string} [selector] CSS Selector + * @returns {FormFieldWrapper} + */ + findFormField(selector?: string): FormFieldWrapper; + + /** + * Returns a multi-element wrapper that matches FormFields with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches FormFields. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllFormFields(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first FormField with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {FormFieldWrapper} + */ + findFormFieldByTestId(testId: string): FormFieldWrapper; + + /** + * Returns a wrapper that matches the Grids with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Grids. + * + * @param {string} [selector] CSS Selector + * @returns {GridWrapper} + */ + findGrid(selector?: string): GridWrapper; + + /** + * Returns a multi-element wrapper that matches Grids with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Grids. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllGrids(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Grid with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {GridWrapper} + */ + findGridByTestId(testId: string): GridWrapper; + + /** + * Returns a wrapper that matches the Headers with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Headers. + * + * @param {string} [selector] CSS Selector + * @returns {HeaderWrapper} + */ + findHeader(selector?: string): HeaderWrapper; + + /** + * Returns a multi-element wrapper that matches Headers with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Headers. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllHeaders(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Header with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {HeaderWrapper} + */ + findHeaderByTestId(testId: string): HeaderWrapper; + + /** + * Returns a wrapper that matches the HelpPanels with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches HelpPanels. + * + * @param {string} [selector] CSS Selector + * @returns {HelpPanelWrapper} + */ + findHelpPanel(selector?: string): HelpPanelWrapper; + + /** + * Returns a multi-element wrapper that matches HelpPanels with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches HelpPanels. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllHelpPanels(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first HelpPanel with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {HelpPanelWrapper} + */ + findHelpPanelByTestId(testId: string): HelpPanelWrapper; + + /** + * Returns a wrapper that matches the Hotspots with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Hotspots. + * + * @param {string} [selector] CSS Selector + * @returns {HotspotWrapper} + */ + findHotspot(selector?: string): HotspotWrapper; + + /** + * Returns a multi-element wrapper that matches Hotspots with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Hotspots. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllHotspots(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Hotspot with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {HotspotWrapper} + */ + findHotspotByTestId(testId: string): HotspotWrapper; + + /** + * Returns a wrapper that matches the Icons with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Icons. + * + * @param {string} [selector] CSS Selector + * @returns {IconWrapper} + */ + findIcon(selector?: string): IconWrapper; + + /** + * Returns a multi-element wrapper that matches Icons with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Icons. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllIcons(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Icon with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {IconWrapper} + */ + findIconByTestId(testId: string): IconWrapper; + + /** + * Returns a wrapper that matches the Inputs with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Inputs. + * + * @param {string} [selector] CSS Selector + * @returns {InputWrapper} + */ + findInput(selector?: string): InputWrapper; + + /** + * Returns a multi-element wrapper that matches Inputs with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Inputs. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllInputs(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Input with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {InputWrapper} + */ + findInputByTestId(testId: string): InputWrapper; + + /** + * Returns a wrapper that matches the KeyValuePairs with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches KeyValuePairs. + * + * @param {string} [selector] CSS Selector + * @returns {KeyValuePairsWrapper} + */ + findKeyValuePairs(selector?: string): KeyValuePairsWrapper; + + /** + * Returns a multi-element wrapper that matches KeyValuePairs with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches KeyValuePairs. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllKeyValuePairs(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first KeyValuePairs with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {KeyValuePairsWrapper} + */ + findKeyValuePairsByTestId(testId: string): KeyValuePairsWrapper; + + /** + * Returns a wrapper that matches the LineCharts with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches LineCharts. + * + * @param {string} [selector] CSS Selector + * @returns {LineChartWrapper} + */ + findLineChart(selector?: string): LineChartWrapper; + + /** + * Returns a multi-element wrapper that matches LineCharts with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches LineCharts. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllLineCharts(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first LineChart with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {LineChartWrapper} + */ + findLineChartByTestId(testId: string): LineChartWrapper; + + /** + * Returns a wrapper that matches the Links with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Links. + * + * @param {string} [selector] CSS Selector + * @returns {LinkWrapper} + */ + findLink(selector?: string): LinkWrapper; + + /** + * Returns a multi-element wrapper that matches Links with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Links. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllLinks(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Link with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {LinkWrapper} + */ + findLinkByTestId(testId: string): LinkWrapper; + + /** + * Returns a wrapper that matches the LiveRegions with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches LiveRegions. + * + * @param {string} [selector] CSS Selector + * @returns {LiveRegionWrapper} + */ + findLiveRegion(selector?: string): LiveRegionWrapper; + + /** + * Returns a multi-element wrapper that matches LiveRegions with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches LiveRegions. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllLiveRegions(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first LiveRegion with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {LiveRegionWrapper} + */ + findLiveRegionByTestId(testId: string): LiveRegionWrapper; + + /** + * Returns a wrapper that matches the MixedLineBarCharts with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches MixedLineBarCharts. + * + * @param {string} [selector] CSS Selector + * @returns {MixedLineBarChartWrapper} + */ + findMixedLineBarChart(selector?: string): MixedLineBarChartWrapper; + + /** + * Returns a multi-element wrapper that matches MixedLineBarCharts with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches MixedLineBarCharts. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllMixedLineBarCharts(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first MixedLineBarChart with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {MixedLineBarChartWrapper} + */ + findMixedLineBarChartByTestId(testId: string): MixedLineBarChartWrapper; + + /** + * Returns a wrapper that matches the Modals with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Modals. + * + * @param {string} [selector] CSS Selector + * @returns {ModalWrapper} + */ + findModal(selector?: string): ModalWrapper; + + /** + * Returns a multi-element wrapper that matches Modals with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Modals. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllModals(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Modal with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {ModalWrapper} + */ + findModalByTestId(testId: string): ModalWrapper; + + /** + * Returns a wrapper that matches the Multiselects with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Multiselects. + * + * @param {string} [selector] CSS Selector + * @returns {MultiselectWrapper} + */ + findMultiselect(selector?: string): MultiselectWrapper; + + /** + * Returns a multi-element wrapper that matches Multiselects with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Multiselects. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllMultiselects(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Multiselect with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {MultiselectWrapper} + */ + findMultiselectByTestId(testId: string): MultiselectWrapper; + + /** + * Returns a wrapper that matches the Paginations with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Paginations. + * + * @param {string} [selector] CSS Selector + * @returns {PaginationWrapper} + */ + findPagination(selector?: string): PaginationWrapper; + + /** + * Returns a multi-element wrapper that matches Paginations with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Paginations. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllPaginations(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Pagination with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {PaginationWrapper} + */ + findPaginationByTestId(testId: string): PaginationWrapper; + + /** + * Returns a wrapper that matches the PieCharts with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches PieCharts. + * + * @param {string} [selector] CSS Selector + * @returns {PieChartWrapper} + */ + findPieChart(selector?: string): PieChartWrapper; + + /** + * Returns a multi-element wrapper that matches PieCharts with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches PieCharts. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllPieCharts(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first PieChart with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {PieChartWrapper} + */ + findPieChartByTestId(testId: string): PieChartWrapper; + + /** + * Returns a wrapper that matches the Popovers with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Popovers. + * + * @param {string} [selector] CSS Selector + * @returns {PopoverWrapper} + */ + findPopover(selector?: string): PopoverWrapper; + + /** + * Returns a multi-element wrapper that matches Popovers with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Popovers. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllPopovers(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Popover with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {PopoverWrapper} + */ + findPopoverByTestId(testId: string): PopoverWrapper; + + /** + * Returns a wrapper that matches the ProgressBars with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches ProgressBars. + * + * @param {string} [selector] CSS Selector + * @returns {ProgressBarWrapper} + */ + findProgressBar(selector?: string): ProgressBarWrapper; + + /** + * Returns a multi-element wrapper that matches ProgressBars with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches ProgressBars. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllProgressBars(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first ProgressBar with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {ProgressBarWrapper} + */ + findProgressBarByTestId(testId: string): ProgressBarWrapper; + + /** + * Returns a wrapper that matches the PromptInputs with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches PromptInputs. + * + * @param {string} [selector] CSS Selector + * @returns {PromptInputWrapper} + */ + findPromptInput(selector?: string): PromptInputWrapper; + + /** + * Returns a multi-element wrapper that matches PromptInputs with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches PromptInputs. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllPromptInputs(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first PromptInput with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {PromptInputWrapper} + */ + findPromptInputByTestId(testId: string): PromptInputWrapper; + + /** + * Returns a wrapper that matches the PropertyFilters with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches PropertyFilters. + * + * @param {string} [selector] CSS Selector + * @returns {PropertyFilterWrapper} + */ + findPropertyFilter(selector?: string): PropertyFilterWrapper; + + /** + * Returns a multi-element wrapper that matches PropertyFilters with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches PropertyFilters. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllPropertyFilters(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first PropertyFilter with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {PropertyFilterWrapper} + */ + findPropertyFilterByTestId(testId: string): PropertyFilterWrapper; + + /** + * Returns a wrapper that matches the RadioGroups with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches RadioGroups. + * + * @param {string} [selector] CSS Selector + * @returns {RadioGroupWrapper} + */ + findRadioGroup(selector?: string): RadioGroupWrapper; + + /** + * Returns a multi-element wrapper that matches RadioGroups with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches RadioGroups. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllRadioGroups(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first RadioGroup with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {RadioGroupWrapper} + */ + findRadioGroupByTestId(testId: string): RadioGroupWrapper; + + /** + * Returns a wrapper that matches the S3ResourceSelectors with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches S3ResourceSelectors. + * + * @param {string} [selector] CSS Selector + * @returns {S3ResourceSelectorWrapper} + */ + findS3ResourceSelector(selector?: string): S3ResourceSelectorWrapper; + + /** + * Returns a multi-element wrapper that matches S3ResourceSelectors with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches S3ResourceSelectors. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllS3ResourceSelectors(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first S3ResourceSelector with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {S3ResourceSelectorWrapper} + */ + findS3ResourceSelectorByTestId(testId: string): S3ResourceSelectorWrapper; + + /** + * Returns a wrapper that matches the SegmentedControls with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches SegmentedControls. + * + * @param {string} [selector] CSS Selector + * @returns {SegmentedControlWrapper} + */ + findSegmentedControl(selector?: string): SegmentedControlWrapper; + + /** + * Returns a multi-element wrapper that matches SegmentedControls with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches SegmentedControls. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllSegmentedControls(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first SegmentedControl with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {SegmentedControlWrapper} + */ + findSegmentedControlByTestId(testId: string): SegmentedControlWrapper; + + /** + * Returns a wrapper that matches the Selects with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Selects. + * + * @param {string} [selector] CSS Selector + * @returns {SelectWrapper} + */ + findSelect(selector?: string): SelectWrapper; + + /** + * Returns a multi-element wrapper that matches Selects with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Selects. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllSelects(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Select with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {SelectWrapper} + */ + findSelectByTestId(testId: string): SelectWrapper; + + /** + * Returns a wrapper that matches the SideNavigations with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches SideNavigations. + * + * @param {string} [selector] CSS Selector + * @returns {SideNavigationWrapper} + */ + findSideNavigation(selector?: string): SideNavigationWrapper; + + /** + * Returns a multi-element wrapper that matches SideNavigations with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches SideNavigations. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllSideNavigations(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first SideNavigation with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {SideNavigationWrapper} + */ + findSideNavigationByTestId(testId: string): SideNavigationWrapper; + + /** + * Returns a wrapper that matches the Sliders with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Sliders. + * + * @param {string} [selector] CSS Selector + * @returns {SliderWrapper} + */ + findSlider(selector?: string): SliderWrapper; + + /** + * Returns a multi-element wrapper that matches Sliders with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Sliders. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllSliders(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Slider with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {SliderWrapper} + */ + findSliderByTestId(testId: string): SliderWrapper; + + /** + * Returns a wrapper that matches the SpaceBetweens with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches SpaceBetweens. + * + * @param {string} [selector] CSS Selector + * @returns {SpaceBetweenWrapper} + */ + findSpaceBetween(selector?: string): SpaceBetweenWrapper; + + /** + * Returns a multi-element wrapper that matches SpaceBetweens with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches SpaceBetweens. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllSpaceBetweens(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first SpaceBetween with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {SpaceBetweenWrapper} + */ + findSpaceBetweenByTestId(testId: string): SpaceBetweenWrapper; + + /** + * Returns a wrapper that matches the Spinners with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Spinners. + * + * @param {string} [selector] CSS Selector + * @returns {SpinnerWrapper} + */ + findSpinner(selector?: string): SpinnerWrapper; + + /** + * Returns a multi-element wrapper that matches Spinners with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Spinners. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllSpinners(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Spinner with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {SpinnerWrapper} + */ + findSpinnerByTestId(testId: string): SpinnerWrapper; + + /** + * Returns a wrapper that matches the SplitPanels with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches SplitPanels. + * + * @param {string} [selector] CSS Selector + * @returns {SplitPanelWrapper} + */ + findSplitPanel(selector?: string): SplitPanelWrapper; + + /** + * Returns a multi-element wrapper that matches SplitPanels with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches SplitPanels. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllSplitPanels(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first SplitPanel with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {SplitPanelWrapper} + */ + findSplitPanelByTestId(testId: string): SplitPanelWrapper; + + /** + * Returns a wrapper that matches the StatusIndicators with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches StatusIndicators. + * + * @param {string} [selector] CSS Selector + * @returns {StatusIndicatorWrapper} + */ + findStatusIndicator(selector?: string): StatusIndicatorWrapper; + + /** + * Returns a multi-element wrapper that matches StatusIndicators with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches StatusIndicators. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllStatusIndicators(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first StatusIndicator with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {StatusIndicatorWrapper} + */ + findStatusIndicatorByTestId(testId: string): StatusIndicatorWrapper; + + /** + * Returns a wrapper that matches the Steps with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Steps. + * + * @param {string} [selector] CSS Selector + * @returns {StepsWrapper} + */ + findSteps(selector?: string): StepsWrapper; + + /** + * Returns a multi-element wrapper that matches Steps with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Steps. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllSteps(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Steps with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {StepsWrapper} + */ + findStepsByTestId(testId: string): StepsWrapper; + + /** + * Returns a wrapper that matches the Tables with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Tables. + * + * @param {string} [selector] CSS Selector + * @returns {TableWrapper} + */ + findTable(selector?: string): TableWrapper; + + /** + * Returns a multi-element wrapper that matches Tables with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Tables. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllTables(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Table with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {TableWrapper} + */ + findTableByTestId(testId: string): TableWrapper; + + /** + * Returns a wrapper that matches the Tabs with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Tabs. + * + * @param {string} [selector] CSS Selector + * @returns {TabsWrapper} + */ + findTabs(selector?: string): TabsWrapper; + + /** + * Returns a multi-element wrapper that matches Tabs with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Tabs. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllTabs(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Tabs with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {TabsWrapper} + */ + findTabsByTestId(testId: string): TabsWrapper; + + /** + * Returns a wrapper that matches the TagEditors with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches TagEditors. + * + * @param {string} [selector] CSS Selector + * @returns {TagEditorWrapper} + */ + findTagEditor(selector?: string): TagEditorWrapper; + + /** + * Returns a multi-element wrapper that matches TagEditors with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches TagEditors. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllTagEditors(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first TagEditor with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {TagEditorWrapper} + */ + findTagEditorByTestId(testId: string): TagEditorWrapper; + + /** + * Returns a wrapper that matches the TextContents with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches TextContents. + * + * @param {string} [selector] CSS Selector + * @returns {TextContentWrapper} + */ + findTextContent(selector?: string): TextContentWrapper; + + /** + * Returns a multi-element wrapper that matches TextContents with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches TextContents. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllTextContents(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first TextContent with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {TextContentWrapper} + */ + findTextContentByTestId(testId: string): TextContentWrapper; + + /** + * Returns a wrapper that matches the TextFilters with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches TextFilters. + * + * @param {string} [selector] CSS Selector + * @returns {TextFilterWrapper} + */ + findTextFilter(selector?: string): TextFilterWrapper; + + /** + * Returns a multi-element wrapper that matches TextFilters with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches TextFilters. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllTextFilters(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first TextFilter with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {TextFilterWrapper} + */ + findTextFilterByTestId(testId: string): TextFilterWrapper; + + /** + * Returns a wrapper that matches the Textareas with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Textareas. + * + * @param {string} [selector] CSS Selector + * @returns {TextareaWrapper} + */ + findTextarea(selector?: string): TextareaWrapper; + + /** + * Returns a multi-element wrapper that matches Textareas with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Textareas. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllTextareas(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Textarea with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {TextareaWrapper} + */ + findTextareaByTestId(testId: string): TextareaWrapper; + + /** + * Returns a wrapper that matches the Tiles with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Tiles. + * + * @param {string} [selector] CSS Selector + * @returns {TilesWrapper} + */ + findTiles(selector?: string): TilesWrapper; + + /** + * Returns a multi-element wrapper that matches Tiles with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Tiles. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllTiles(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Tiles with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {TilesWrapper} + */ + findTilesByTestId(testId: string): TilesWrapper; + + /** + * Returns a wrapper that matches the TimeInputs with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches TimeInputs. + * + * @param {string} [selector] CSS Selector + * @returns {TimeInputWrapper} + */ + findTimeInput(selector?: string): TimeInputWrapper; + + /** + * Returns a multi-element wrapper that matches TimeInputs with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches TimeInputs. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllTimeInputs(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first TimeInput with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {TimeInputWrapper} + */ + findTimeInputByTestId(testId: string): TimeInputWrapper; + + /** + * Returns a wrapper that matches the Toggles with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Toggles. + * + * @param {string} [selector] CSS Selector + * @returns {ToggleWrapper} + */ + findToggle(selector?: string): ToggleWrapper; + + /** + * Returns a multi-element wrapper that matches Toggles with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Toggles. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllToggles(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Toggle with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {ToggleWrapper} + */ + findToggleByTestId(testId: string): ToggleWrapper; + + /** + * Returns a wrapper that matches the ToggleButtons with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches ToggleButtons. + * + * @param {string} [selector] CSS Selector + * @returns {ToggleButtonWrapper} + */ + findToggleButton(selector?: string): ToggleButtonWrapper; + + /** + * Returns a multi-element wrapper that matches ToggleButtons with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches ToggleButtons. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllToggleButtons(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first ToggleButton with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {ToggleButtonWrapper} + */ + findToggleButtonByTestId(testId: string): ToggleButtonWrapper; + + /** + * Returns a wrapper that matches the TokenGroups with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches TokenGroups. + * + * @param {string} [selector] CSS Selector + * @returns {TokenGroupWrapper} + */ + findTokenGroup(selector?: string): TokenGroupWrapper; + + /** + * Returns a multi-element wrapper that matches TokenGroups with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches TokenGroups. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllTokenGroups(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first TokenGroup with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {TokenGroupWrapper} + */ + findTokenGroupByTestId(testId: string): TokenGroupWrapper; + + /** + * Returns a wrapper that matches the TopNavigations with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches TopNavigations. + * + * @param {string} [selector] CSS Selector + * @returns {TopNavigationWrapper} + */ + findTopNavigation(selector?: string): TopNavigationWrapper; + + /** + * Returns a wrapper that matches the TutorialPanels with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches TutorialPanels. + * + * @param {string} [selector] CSS Selector + * @returns {TutorialPanelWrapper} + */ + findTutorialPanel(selector?: string): TutorialPanelWrapper; + + /** + * Returns a multi-element wrapper that matches TutorialPanels with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches TutorialPanels. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllTutorialPanels(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first TutorialPanel with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {TutorialPanelWrapper} + */ + findTutorialPanelByTestId(testId: string): TutorialPanelWrapper; + + /** + * Returns a wrapper that matches the Wizards with the specified CSS selector. + * If no CSS selector is specified, returns a wrapper that matches Wizards. + * + * @param {string} [selector] CSS Selector + * @returns {WizardWrapper} + */ + findWizard(selector?: string): WizardWrapper; + + /** + * Returns a multi-element wrapper that matches Wizards with the specified CSS selector. + * If no CSS selector is specified, returns a multi-element wrapper that matches Wizards. + * + * @param {string} [selector] CSS Selector + * @returns {MultiElementWrapper} + */ + findAllWizards(selector?: string): MultiElementWrapper; + /** + * Returns a wrapper that matches the first Wizard with the specified test ID. + * Looks for the \`data-testid\` attribute assigned to the component. + * + * @param {string} testId + * @returns {WizardWrapper} + */ + findWizardByTestId(testId: string): WizardWrapper; + } + } + + ElementWrapper.prototype.findAlert = function(selector) { + const rootSelector = \`.\${AlertWrapper.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, AlertWrapper); + }; + + ElementWrapper.prototype.findAllAlerts = function(selector) { + return this.findAllComponents(AlertWrapper, selector); + }; + + ElementWrapper.prototype.findAlertByTestId = function(testId) { + const selector = \`.\${AlertWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, AlertWrapper); + }; + + ElementWrapper.prototype.findAnchorNavigation = function(selector) { + const rootSelector = \`.\${AnchorNavigationWrapper.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, AnchorNavigationWrapper); + }; + + ElementWrapper.prototype.findAllAnchorNavigations = function(selector) { + return this.findAllComponents(AnchorNavigationWrapper, selector); + }; + + ElementWrapper.prototype.findAnchorNavigationByTestId = function(testId) { + const selector = \`.\${AnchorNavigationWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, AnchorNavigationWrapper); + }; + + ElementWrapper.prototype.findAnnotation = function(selector) { + const rootSelector = \`.\${AnnotationWrapper.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, AnnotationWrapper); + }; + + ElementWrapper.prototype.findAllAnnotations = function(selector) { + return this.findAllComponents(AnnotationWrapper, selector); + }; + + ElementWrapper.prototype.findAnnotationByTestId = function(testId) { + const selector = \`.\${AnnotationWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, AnnotationWrapper); + }; + + ElementWrapper.prototype.findAppLayout = function(selector) { + const rootSelector = \`.\${AppLayoutWrapper.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, AppLayoutWrapper); + }; + + ElementWrapper.prototype.findAreaChart = function(selector) { + const rootSelector = \`.\${AreaChartWrapper.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, AreaChartWrapper); + }; + + ElementWrapper.prototype.findAllAreaCharts = function(selector) { + return this.findAllComponents(AreaChartWrapper, selector); + }; + + ElementWrapper.prototype.findAreaChartByTestId = function(testId) { + const selector = \`.\${AreaChartWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, AreaChartWrapper); + }; + + ElementWrapper.prototype.findAttributeEditor = function(selector) { + const rootSelector = \`.\${AttributeEditorWrapper.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, AttributeEditorWrapper); + }; + + ElementWrapper.prototype.findAllAttributeEditors = function(selector) { + return this.findAllComponents(AttributeEditorWrapper, selector); + }; + + ElementWrapper.prototype.findAttributeEditorByTestId = function(testId) { + const selector = \`.\${AttributeEditorWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, AttributeEditorWrapper); + }; + + ElementWrapper.prototype.findAutosuggest = function(selector) { + const rootSelector = \`.\${AutosuggestWrapper.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, AutosuggestWrapper); + }; + + ElementWrapper.prototype.findAllAutosuggests = function(selector) { + return this.findAllComponents(AutosuggestWrapper, selector); + }; + + ElementWrapper.prototype.findAutosuggestByTestId = function(testId) { + const selector = \`.\${AutosuggestWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, AutosuggestWrapper); + }; + + ElementWrapper.prototype.findBadge = function(selector) { + const rootSelector = \`.\${BadgeWrapper.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, BadgeWrapper); + }; + + ElementWrapper.prototype.findAllBadges = function(selector) { + return this.findAllComponents(BadgeWrapper, selector); + }; + + ElementWrapper.prototype.findBadgeByTestId = function(testId) { + const selector = \`.\${BadgeWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, BadgeWrapper); + }; + + ElementWrapper.prototype.findBarChart = function(selector) { + const rootSelector = \`.\${BarChartWrapper.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, BarChartWrapper); + }; + + ElementWrapper.prototype.findAllBarCharts = function(selector) { + return this.findAllComponents(BarChartWrapper, selector); + }; + + ElementWrapper.prototype.findBarChartByTestId = function(testId) { + const selector = \`.\${BarChartWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, BarChartWrapper); + }; + + ElementWrapper.prototype.findBox = function(selector) { + const rootSelector = \`.\${BoxWrapper.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, BoxWrapper); + }; + + ElementWrapper.prototype.findAllBoxes = function(selector) { + return this.findAllComponents(BoxWrapper, selector); + }; + + ElementWrapper.prototype.findBoxByTestId = function(testId) { + const selector = \`.\${BoxWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, BoxWrapper); + }; + + ElementWrapper.prototype.findBreadcrumbGroup = function(selector) { + const rootSelector = \`.\${BreadcrumbGroupWrapper.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, BreadcrumbGroupWrapper); + }; + + ElementWrapper.prototype.findAllBreadcrumbGroups = function(selector) { + return this.findAllComponents(BreadcrumbGroupWrapper, selector); + }; + + ElementWrapper.prototype.findBreadcrumbGroupByTestId = function(testId) { + const selector = \`.\${BreadcrumbGroupWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, BreadcrumbGroupWrapper); + }; + + ElementWrapper.prototype.findButton = function(selector) { + const rootSelector = \`.\${ButtonWrapper.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, ButtonWrapper); + }; + + ElementWrapper.prototype.findAllButtons = function(selector) { + return this.findAllComponents(ButtonWrapper, selector); + }; + + ElementWrapper.prototype.findButtonByTestId = function(testId) { + const selector = \`.\${ButtonWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ButtonWrapper); + }; + + ElementWrapper.prototype.findButtonDropdown = function(selector) { + const rootSelector = \`.\${ButtonDropdownWrapper.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, ButtonDropdownWrapper); + }; + + ElementWrapper.prototype.findAllButtonDropdowns = function(selector) { + return this.findAllComponents(ButtonDropdownWrapper, selector); + }; + + ElementWrapper.prototype.findButtonDropdownByTestId = function(testId) { + const selector = \`.\${ButtonDropdownWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ButtonDropdownWrapper); + }; + + ElementWrapper.prototype.findButtonGroup = function(selector) { + const rootSelector = \`.\${ButtonGroupWrapper.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, ButtonGroupWrapper); + }; + + ElementWrapper.prototype.findAllButtonGroups = function(selector) { + return this.findAllComponents(ButtonGroupWrapper, selector); + }; + + ElementWrapper.prototype.findButtonGroupByTestId = function(testId) { + const selector = \`.\${ButtonGroupWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ButtonGroupWrapper); + }; + + ElementWrapper.prototype.findCalendar = function(selector) { + const rootSelector = \`.\${CalendarWrapper.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, CalendarWrapper); + }; + + ElementWrapper.prototype.findAllCalendars = function(selector) { + return this.findAllComponents(CalendarWrapper, selector); + }; + + ElementWrapper.prototype.findCalendarByTestId = function(testId) { + const selector = \`.\${CalendarWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, CalendarWrapper); + }; + + ElementWrapper.prototype.findCards = function(selector) { + const rootSelector = \`.\${CardsWrapper.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, CardsWrapper); + }; + + ElementWrapper.prototype.findAllCards = function(selector) { + return this.findAllComponents(CardsWrapper, selector); + }; + + ElementWrapper.prototype.findCardsByTestId = function(testId) { + const selector = \`.\${CardsWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, CardsWrapper); + }; + + ElementWrapper.prototype.findCheckbox = function(selector) { + const rootSelector = \`.\${CheckboxWrapper.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, CheckboxWrapper); + }; + + ElementWrapper.prototype.findAllCheckboxes = function(selector) { + return this.findAllComponents(CheckboxWrapper, selector); + }; + + ElementWrapper.prototype.findCheckboxByTestId = function(testId) { + const selector = \`.\${CheckboxWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, CheckboxWrapper); + }; + + ElementWrapper.prototype.findCodeEditor = function(selector) { + const rootSelector = \`.\${CodeEditorWrapper.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, CodeEditorWrapper); + }; + + ElementWrapper.prototype.findAllCodeEditors = function(selector) { + return this.findAllComponents(CodeEditorWrapper, selector); + }; + + ElementWrapper.prototype.findCodeEditorByTestId = function(testId) { + const selector = \`.\${CodeEditorWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, CodeEditorWrapper); + }; + + ElementWrapper.prototype.findCollectionPreferences = function(selector) { + const rootSelector = \`.\${CollectionPreferencesWrapper.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, CollectionPreferencesWrapper); + }; + + ElementWrapper.prototype.findAllCollectionPreferences = function(selector) { + return this.findAllComponents(CollectionPreferencesWrapper, selector); + }; + + ElementWrapper.prototype.findCollectionPreferencesByTestId = function(testId) { + const selector = \`.\${CollectionPreferencesWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, CollectionPreferencesWrapper); + }; + + ElementWrapper.prototype.findColumnLayout = function(selector) { + const rootSelector = \`.\${ColumnLayoutWrapper.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, ColumnLayoutWrapper); + }; + + ElementWrapper.prototype.findAllColumnLayouts = function(selector) { + return this.findAllComponents(ColumnLayoutWrapper, selector); + }; + + ElementWrapper.prototype.findColumnLayoutByTestId = function(testId) { + const selector = \`.\${ColumnLayoutWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ColumnLayoutWrapper); + }; + + ElementWrapper.prototype.findContainer = function(selector) { + const rootSelector = \`.\${ContainerWrapper.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, ContainerWrapper); + }; + + ElementWrapper.prototype.findAllContainers = function(selector) { + return this.findAllComponents(ContainerWrapper, selector); + }; + + ElementWrapper.prototype.findContainerByTestId = function(testId) { + const selector = \`.\${ContainerWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ContainerWrapper); + }; + + ElementWrapper.prototype.findContentLayout = function(selector) { + const rootSelector = \`.\${ContentLayoutWrapper.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, ContentLayoutWrapper); + }; + + ElementWrapper.prototype.findAllContentLayouts = function(selector) { + return this.findAllComponents(ContentLayoutWrapper, selector); + }; + + ElementWrapper.prototype.findContentLayoutByTestId = function(testId) { + const selector = \`.\${ContentLayoutWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ContentLayoutWrapper); + }; + + ElementWrapper.prototype.findCopyToClipboard = function(selector) { + const rootSelector = \`.\${CopyToClipboardWrapper.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, CopyToClipboardWrapper); + }; + + ElementWrapper.prototype.findAllCopyToClipboards = function(selector) { + return this.findAllComponents(CopyToClipboardWrapper, selector); + }; + + ElementWrapper.prototype.findCopyToClipboardByTestId = function(testId) { + const selector = \`.\${CopyToClipboardWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, CopyToClipboardWrapper); + }; + + ElementWrapper.prototype.findDateInput = function(selector) { + const rootSelector = \`.\${DateInputWrapper.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, DateInputWrapper); + }; + + ElementWrapper.prototype.findAllDateInputs = function(selector) { + return this.findAllComponents(DateInputWrapper, selector); + }; + + ElementWrapper.prototype.findDateInputByTestId = function(testId) { + const selector = \`.\${DateInputWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, DateInputWrapper); + }; + + ElementWrapper.prototype.findDatePicker = function(selector) { + const rootSelector = \`.\${DatePickerWrapper.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, DatePickerWrapper); + }; + + ElementWrapper.prototype.findAllDatePickers = function(selector) { + return this.findAllComponents(DatePickerWrapper, selector); + }; + + ElementWrapper.prototype.findDatePickerByTestId = function(testId) { + const selector = \`.\${DatePickerWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, DatePickerWrapper); + }; + + ElementWrapper.prototype.findDateRangePicker = function(selector) { + const rootSelector = \`.\${DateRangePickerWrapper.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, DateRangePickerWrapper); + }; + + ElementWrapper.prototype.findAllDateRangePickers = function(selector) { + return this.findAllComponents(DateRangePickerWrapper, selector); + }; + + ElementWrapper.prototype.findDateRangePickerByTestId = function(testId) { + const selector = \`.\${DateRangePickerWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, DateRangePickerWrapper); + }; + + ElementWrapper.prototype.findDrawer = function(selector) { + const rootSelector = \`.\${DrawerWrapper.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, DrawerWrapper); + }; + + ElementWrapper.prototype.findAllDrawers = function(selector) { + return this.findAllComponents(DrawerWrapper, selector); + }; + + ElementWrapper.prototype.findDrawerByTestId = function(testId) { + const selector = \`.\${DrawerWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, DrawerWrapper); + }; + + 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.findAllExpandableSections = function(selector) { + return this.findAllComponents(ExpandableSectionWrapper, selector); + }; - import ToggleWrapper from './toggle'; - export { ToggleWrapper }; - + ElementWrapper.prototype.findExpandableSectionByTestId = function(testId) { + const selector = \`.\${ExpandableSectionWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ExpandableSectionWrapper); + }; - import ToggleButtonWrapper from './toggle-button'; - export { ToggleButtonWrapper }; - + 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 + return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, FileUploadWrapper); + }; - import TokenGroupWrapper from './token-group'; - export { TokenGroupWrapper }; - + ElementWrapper.prototype.findAllFileUploads = function(selector) { + return this.findAllComponents(FileUploadWrapper, selector); + }; - import TopNavigationWrapper from './top-navigation'; - export { TopNavigationWrapper }; - + ElementWrapper.prototype.findFileUploadByTestId = function(testId) { + const selector = \`.\${FileUploadWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, FileUploadWrapper); + }; - import TutorialPanelWrapper from './tutorial-panel'; - export { TutorialPanelWrapper }; - + ElementWrapper.prototype.findFlashbar = function(selector) { + const rootSelector = \`.\${FlashbarWrapper.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, FlashbarWrapper); + }; - import WizardWrapper from './wizard'; - export { WizardWrapper }; - -declare module '@cloudscape-design/test-utils-core/dist/selectors' { - interface ElementWrapper { - findAlert(selector?: string): AlertWrapper; -findAnchorNavigation(selector?: string): AnchorNavigationWrapper; -findAnnotation(selector?: string): AnnotationWrapper; -findAppLayout(selector?: string): AppLayoutWrapper; -findAreaChart(selector?: string): AreaChartWrapper; -findAttributeEditor(selector?: string): AttributeEditorWrapper; -findAutosuggest(selector?: string): AutosuggestWrapper; -findBadge(selector?: string): BadgeWrapper; -findBarChart(selector?: string): BarChartWrapper; -findBox(selector?: string): BoxWrapper; -findBreadcrumbGroup(selector?: string): BreadcrumbGroupWrapper; -findButton(selector?: string): ButtonWrapper; -findButtonDropdown(selector?: string): ButtonDropdownWrapper; -findButtonGroup(selector?: string): ButtonGroupWrapper; -findCalendar(selector?: string): CalendarWrapper; -findCards(selector?: string): CardsWrapper; -findCheckbox(selector?: string): CheckboxWrapper; -findCodeEditor(selector?: string): CodeEditorWrapper; -findCollectionPreferences(selector?: string): CollectionPreferencesWrapper; -findColumnLayout(selector?: string): ColumnLayoutWrapper; -findContainer(selector?: string): ContainerWrapper; -findContentLayout(selector?: string): ContentLayoutWrapper; -findCopyToClipboard(selector?: string): CopyToClipboardWrapper; -findDateInput(selector?: string): DateInputWrapper; -findDatePicker(selector?: string): DatePickerWrapper; -findDateRangePicker(selector?: string): DateRangePickerWrapper; -findDrawer(selector?: string): DrawerWrapper; -findExpandableSection(selector?: string): ExpandableSectionWrapper; -findFileUpload(selector?: string): FileUploadWrapper; -findFlashbar(selector?: string): FlashbarWrapper; -findForm(selector?: string): FormWrapper; -findFormField(selector?: string): FormFieldWrapper; -findGrid(selector?: string): GridWrapper; -findHeader(selector?: string): HeaderWrapper; -findHelpPanel(selector?: string): HelpPanelWrapper; -findHotspot(selector?: string): HotspotWrapper; -findIcon(selector?: string): IconWrapper; -findInput(selector?: string): InputWrapper; -findKeyValuePairs(selector?: string): KeyValuePairsWrapper; -findLineChart(selector?: string): LineChartWrapper; -findLink(selector?: string): LinkWrapper; -findLiveRegion(selector?: string): LiveRegionWrapper; -findMixedLineBarChart(selector?: string): MixedLineBarChartWrapper; -findModal(selector?: string): ModalWrapper; -findMultiselect(selector?: string): MultiselectWrapper; -findPagination(selector?: string): PaginationWrapper; -findPieChart(selector?: string): PieChartWrapper; -findPopover(selector?: string): PopoverWrapper; -findProgressBar(selector?: string): ProgressBarWrapper; -findPromptInput(selector?: string): PromptInputWrapper; -findPropertyFilter(selector?: string): PropertyFilterWrapper; -findRadioGroup(selector?: string): RadioGroupWrapper; -findS3ResourceSelector(selector?: string): S3ResourceSelectorWrapper; -findSegmentedControl(selector?: string): SegmentedControlWrapper; -findSelect(selector?: string): SelectWrapper; -findSideNavigation(selector?: string): SideNavigationWrapper; -findSlider(selector?: string): SliderWrapper; -findSpaceBetween(selector?: string): SpaceBetweenWrapper; -findSpinner(selector?: string): SpinnerWrapper; -findSplitPanel(selector?: string): SplitPanelWrapper; -findStatusIndicator(selector?: string): StatusIndicatorWrapper; -findSteps(selector?: string): StepsWrapper; -findTable(selector?: string): TableWrapper; -findTabs(selector?: string): TabsWrapper; -findTagEditor(selector?: string): TagEditorWrapper; -findTextContent(selector?: string): TextContentWrapper; -findTextFilter(selector?: string): TextFilterWrapper; -findTextarea(selector?: string): TextareaWrapper; -findTiles(selector?: string): TilesWrapper; -findTimeInput(selector?: string): TimeInputWrapper; -findToggle(selector?: string): ToggleWrapper; -findToggleButton(selector?: string): ToggleButtonWrapper; -findTokenGroup(selector?: string): TokenGroupWrapper; -findTopNavigation(selector?: string): TopNavigationWrapper; -findTutorialPanel(selector?: string): TutorialPanelWrapper; -findWizard(selector?: string): WizardWrapper; - } - } -ElementWrapper.prototype.findAlert = function(selector) { - const rootSelector = \`.\${AlertWrapper.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, AlertWrapper); - }; -ElementWrapper.prototype.findAnchorNavigation = function(selector) { - const rootSelector = \`.\${AnchorNavigationWrapper.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, AnchorNavigationWrapper); - }; -ElementWrapper.prototype.findAnnotation = function(selector) { - const rootSelector = \`.\${AnnotationWrapper.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, AnnotationWrapper); - }; -ElementWrapper.prototype.findAppLayout = function(selector) { - const rootSelector = \`.\${AppLayoutWrapper.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, AppLayoutWrapper); - }; -ElementWrapper.prototype.findAreaChart = function(selector) { - const rootSelector = \`.\${AreaChartWrapper.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, AreaChartWrapper); - }; -ElementWrapper.prototype.findAttributeEditor = function(selector) { - const rootSelector = \`.\${AttributeEditorWrapper.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, AttributeEditorWrapper); - }; -ElementWrapper.prototype.findAutosuggest = function(selector) { - const rootSelector = \`.\${AutosuggestWrapper.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, AutosuggestWrapper); - }; -ElementWrapper.prototype.findBadge = function(selector) { - const rootSelector = \`.\${BadgeWrapper.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, BadgeWrapper); - }; -ElementWrapper.prototype.findBarChart = function(selector) { - const rootSelector = \`.\${BarChartWrapper.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, BarChartWrapper); - }; -ElementWrapper.prototype.findBox = function(selector) { - const rootSelector = \`.\${BoxWrapper.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, BoxWrapper); - }; -ElementWrapper.prototype.findBreadcrumbGroup = function(selector) { - const rootSelector = \`.\${BreadcrumbGroupWrapper.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, BreadcrumbGroupWrapper); - }; -ElementWrapper.prototype.findButton = function(selector) { - const rootSelector = \`.\${ButtonWrapper.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, ButtonWrapper); - }; -ElementWrapper.prototype.findButtonDropdown = function(selector) { - const rootSelector = \`.\${ButtonDropdownWrapper.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, ButtonDropdownWrapper); - }; -ElementWrapper.prototype.findButtonGroup = function(selector) { - const rootSelector = \`.\${ButtonGroupWrapper.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, ButtonGroupWrapper); - }; -ElementWrapper.prototype.findCalendar = function(selector) { - const rootSelector = \`.\${CalendarWrapper.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, CalendarWrapper); - }; -ElementWrapper.prototype.findCards = function(selector) { - const rootSelector = \`.\${CardsWrapper.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, CardsWrapper); - }; -ElementWrapper.prototype.findCheckbox = function(selector) { - const rootSelector = \`.\${CheckboxWrapper.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, CheckboxWrapper); - }; -ElementWrapper.prototype.findCodeEditor = function(selector) { - const rootSelector = \`.\${CodeEditorWrapper.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, CodeEditorWrapper); - }; -ElementWrapper.prototype.findCollectionPreferences = function(selector) { - const rootSelector = \`.\${CollectionPreferencesWrapper.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, CollectionPreferencesWrapper); - }; -ElementWrapper.prototype.findColumnLayout = function(selector) { - const rootSelector = \`.\${ColumnLayoutWrapper.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, ColumnLayoutWrapper); - }; -ElementWrapper.prototype.findContainer = function(selector) { - const rootSelector = \`.\${ContainerWrapper.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, ContainerWrapper); - }; -ElementWrapper.prototype.findContentLayout = function(selector) { - const rootSelector = \`.\${ContentLayoutWrapper.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, ContentLayoutWrapper); - }; -ElementWrapper.prototype.findCopyToClipboard = function(selector) { - const rootSelector = \`.\${CopyToClipboardWrapper.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, CopyToClipboardWrapper); - }; -ElementWrapper.prototype.findDateInput = function(selector) { - const rootSelector = \`.\${DateInputWrapper.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, DateInputWrapper); - }; -ElementWrapper.prototype.findDatePicker = function(selector) { - const rootSelector = \`.\${DatePickerWrapper.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, DatePickerWrapper); - }; -ElementWrapper.prototype.findDateRangePicker = function(selector) { - const rootSelector = \`.\${DateRangePickerWrapper.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, DateRangePickerWrapper); - }; -ElementWrapper.prototype.findDrawer = function(selector) { - const rootSelector = \`.\${DrawerWrapper.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, DrawerWrapper); - }; -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.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 - return (this as any).findComponent(selector ? appendSelector(selector, rootSelector) : rootSelector, FileUploadWrapper); - }; -ElementWrapper.prototype.findFlashbar = function(selector) { - const rootSelector = \`.\${FlashbarWrapper.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, FlashbarWrapper); - }; -ElementWrapper.prototype.findForm = function(selector) { - const rootSelector = \`.\${FormWrapper.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, FormWrapper); - }; -ElementWrapper.prototype.findFormField = function(selector) { - const rootSelector = \`.\${FormFieldWrapper.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, FormFieldWrapper); - }; -ElementWrapper.prototype.findGrid = function(selector) { - const rootSelector = \`.\${GridWrapper.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, GridWrapper); - }; -ElementWrapper.prototype.findHeader = function(selector) { - const rootSelector = \`.\${HeaderWrapper.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, HeaderWrapper); - }; -ElementWrapper.prototype.findHelpPanel = function(selector) { - const rootSelector = \`.\${HelpPanelWrapper.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, HelpPanelWrapper); - }; -ElementWrapper.prototype.findHotspot = function(selector) { - const rootSelector = \`.\${HotspotWrapper.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, HotspotWrapper); - }; -ElementWrapper.prototype.findIcon = function(selector) { - const rootSelector = \`.\${IconWrapper.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, IconWrapper); - }; -ElementWrapper.prototype.findInput = function(selector) { - const rootSelector = \`.\${InputWrapper.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, InputWrapper); - }; -ElementWrapper.prototype.findKeyValuePairs = function(selector) { - const rootSelector = \`.\${KeyValuePairsWrapper.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, KeyValuePairsWrapper); - }; -ElementWrapper.prototype.findLineChart = function(selector) { - const rootSelector = \`.\${LineChartWrapper.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, LineChartWrapper); - }; -ElementWrapper.prototype.findLink = function(selector) { - const rootSelector = \`.\${LinkWrapper.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, LinkWrapper); - }; -ElementWrapper.prototype.findLiveRegion = function(selector) { - const rootSelector = \`.\${LiveRegionWrapper.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, LiveRegionWrapper); - }; -ElementWrapper.prototype.findMixedLineBarChart = function(selector) { - const rootSelector = \`.\${MixedLineBarChartWrapper.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, MixedLineBarChartWrapper); - }; -ElementWrapper.prototype.findModal = function(selector) { - const rootSelector = \`.\${ModalWrapper.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, ModalWrapper); - }; -ElementWrapper.prototype.findMultiselect = function(selector) { - const rootSelector = \`.\${MultiselectWrapper.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, MultiselectWrapper); - }; -ElementWrapper.prototype.findPagination = function(selector) { - const rootSelector = \`.\${PaginationWrapper.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, PaginationWrapper); - }; -ElementWrapper.prototype.findPieChart = function(selector) { - const rootSelector = \`.\${PieChartWrapper.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, PieChartWrapper); - }; -ElementWrapper.prototype.findPopover = function(selector) { - const rootSelector = \`.\${PopoverWrapper.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, PopoverWrapper); - }; -ElementWrapper.prototype.findProgressBar = function(selector) { - const rootSelector = \`.\${ProgressBarWrapper.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, ProgressBarWrapper); - }; -ElementWrapper.prototype.findPromptInput = function(selector) { - const rootSelector = \`.\${PromptInputWrapper.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, PromptInputWrapper); - }; -ElementWrapper.prototype.findPropertyFilter = function(selector) { - const rootSelector = \`.\${PropertyFilterWrapper.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, PropertyFilterWrapper); - }; -ElementWrapper.prototype.findRadioGroup = function(selector) { - const rootSelector = \`.\${RadioGroupWrapper.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, RadioGroupWrapper); - }; -ElementWrapper.prototype.findS3ResourceSelector = function(selector) { - const rootSelector = \`.\${S3ResourceSelectorWrapper.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, S3ResourceSelectorWrapper); - }; -ElementWrapper.prototype.findSegmentedControl = function(selector) { - const rootSelector = \`.\${SegmentedControlWrapper.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, SegmentedControlWrapper); - }; -ElementWrapper.prototype.findSelect = function(selector) { - const rootSelector = \`.\${SelectWrapper.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, SelectWrapper); - }; -ElementWrapper.prototype.findSideNavigation = function(selector) { - const rootSelector = \`.\${SideNavigationWrapper.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, SideNavigationWrapper); - }; -ElementWrapper.prototype.findSlider = function(selector) { - const rootSelector = \`.\${SliderWrapper.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, SliderWrapper); - }; -ElementWrapper.prototype.findSpaceBetween = function(selector) { - const rootSelector = \`.\${SpaceBetweenWrapper.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, SpaceBetweenWrapper); - }; -ElementWrapper.prototype.findSpinner = function(selector) { - const rootSelector = \`.\${SpinnerWrapper.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, SpinnerWrapper); - }; -ElementWrapper.prototype.findSplitPanel = function(selector) { - const rootSelector = \`.\${SplitPanelWrapper.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, SplitPanelWrapper); - }; -ElementWrapper.prototype.findStatusIndicator = function(selector) { - const rootSelector = \`.\${StatusIndicatorWrapper.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, StatusIndicatorWrapper); - }; -ElementWrapper.prototype.findSteps = function(selector) { - const rootSelector = \`.\${StepsWrapper.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, StepsWrapper); - }; -ElementWrapper.prototype.findTable = function(selector) { - const rootSelector = \`.\${TableWrapper.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, TableWrapper); - }; -ElementWrapper.prototype.findTabs = function(selector) { - const rootSelector = \`.\${TabsWrapper.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, TabsWrapper); - }; -ElementWrapper.prototype.findTagEditor = function(selector) { - const rootSelector = \`.\${TagEditorWrapper.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, TagEditorWrapper); - }; -ElementWrapper.prototype.findTextContent = function(selector) { - const rootSelector = \`.\${TextContentWrapper.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, TextContentWrapper); - }; -ElementWrapper.prototype.findTextFilter = function(selector) { - const rootSelector = \`.\${TextFilterWrapper.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, TextFilterWrapper); - }; -ElementWrapper.prototype.findTextarea = function(selector) { - const rootSelector = \`.\${TextareaWrapper.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, TextareaWrapper); - }; -ElementWrapper.prototype.findTiles = function(selector) { - const rootSelector = \`.\${TilesWrapper.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, TilesWrapper); - }; -ElementWrapper.prototype.findTimeInput = function(selector) { - const rootSelector = \`.\${TimeInputWrapper.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, TimeInputWrapper); - }; -ElementWrapper.prototype.findToggle = function(selector) { - const rootSelector = \`.\${ToggleWrapper.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, ToggleWrapper); - }; -ElementWrapper.prototype.findToggleButton = function(selector) { - const rootSelector = \`.\${ToggleButtonWrapper.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, ToggleButtonWrapper); - }; -ElementWrapper.prototype.findTokenGroup = function(selector) { - const rootSelector = \`.\${TokenGroupWrapper.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, TokenGroupWrapper); - }; -ElementWrapper.prototype.findTopNavigation = function(selector) { - const rootSelector = \`.\${TopNavigationWrapper.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, TopNavigationWrapper); - }; -ElementWrapper.prototype.findTutorialPanel = function(selector) { - const rootSelector = \`.\${TutorialPanelWrapper.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, TutorialPanelWrapper); - }; -ElementWrapper.prototype.findWizard = function(selector) { - const rootSelector = \`.\${WizardWrapper.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, WizardWrapper); + ElementWrapper.prototype.findAllFlashbars = function(selector) { + return this.findAllComponents(FlashbarWrapper, selector); + }; + + ElementWrapper.prototype.findFlashbarByTestId = function(testId) { + const selector = \`.\${FlashbarWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, FlashbarWrapper); + }; + + ElementWrapper.prototype.findForm = function(selector) { + const rootSelector = \`.\${FormWrapper.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, FormWrapper); + }; + + ElementWrapper.prototype.findAllForms = function(selector) { + return this.findAllComponents(FormWrapper, selector); + }; + + ElementWrapper.prototype.findFormByTestId = function(testId) { + const selector = \`.\${FormWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, FormWrapper); + }; + + ElementWrapper.prototype.findFormField = function(selector) { + const rootSelector = \`.\${FormFieldWrapper.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, FormFieldWrapper); + }; + + ElementWrapper.prototype.findAllFormFields = function(selector) { + return this.findAllComponents(FormFieldWrapper, selector); + }; + + ElementWrapper.prototype.findFormFieldByTestId = function(testId) { + const selector = \`.\${FormFieldWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, FormFieldWrapper); + }; + + ElementWrapper.prototype.findGrid = function(selector) { + const rootSelector = \`.\${GridWrapper.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, GridWrapper); + }; + + ElementWrapper.prototype.findAllGrids = function(selector) { + return this.findAllComponents(GridWrapper, selector); + }; + + ElementWrapper.prototype.findGridByTestId = function(testId) { + const selector = \`.\${GridWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, GridWrapper); + }; + + ElementWrapper.prototype.findHeader = function(selector) { + const rootSelector = \`.\${HeaderWrapper.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, HeaderWrapper); + }; + + ElementWrapper.prototype.findAllHeaders = function(selector) { + return this.findAllComponents(HeaderWrapper, selector); + }; + + ElementWrapper.prototype.findHeaderByTestId = function(testId) { + const selector = \`.\${HeaderWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, HeaderWrapper); + }; + + ElementWrapper.prototype.findHelpPanel = function(selector) { + const rootSelector = \`.\${HelpPanelWrapper.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, HelpPanelWrapper); + }; + + ElementWrapper.prototype.findAllHelpPanels = function(selector) { + return this.findAllComponents(HelpPanelWrapper, selector); + }; + + ElementWrapper.prototype.findHelpPanelByTestId = function(testId) { + const selector = \`.\${HelpPanelWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, HelpPanelWrapper); + }; + + ElementWrapper.prototype.findHotspot = function(selector) { + const rootSelector = \`.\${HotspotWrapper.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, HotspotWrapper); + }; + + ElementWrapper.prototype.findAllHotspots = function(selector) { + return this.findAllComponents(HotspotWrapper, selector); + }; + + ElementWrapper.prototype.findHotspotByTestId = function(testId) { + const selector = \`.\${HotspotWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, HotspotWrapper); + }; + + ElementWrapper.prototype.findIcon = function(selector) { + const rootSelector = \`.\${IconWrapper.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, IconWrapper); + }; + + ElementWrapper.prototype.findAllIcons = function(selector) { + return this.findAllComponents(IconWrapper, selector); + }; + + ElementWrapper.prototype.findIconByTestId = function(testId) { + const selector = \`.\${IconWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, IconWrapper); + }; + + ElementWrapper.prototype.findInput = function(selector) { + const rootSelector = \`.\${InputWrapper.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, InputWrapper); + }; + + ElementWrapper.prototype.findAllInputs = function(selector) { + return this.findAllComponents(InputWrapper, selector); + }; + + ElementWrapper.prototype.findInputByTestId = function(testId) { + const selector = \`.\${InputWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, InputWrapper); + }; + + ElementWrapper.prototype.findKeyValuePairs = function(selector) { + const rootSelector = \`.\${KeyValuePairsWrapper.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, KeyValuePairsWrapper); + }; + + ElementWrapper.prototype.findAllKeyValuePairs = function(selector) { + return this.findAllComponents(KeyValuePairsWrapper, selector); + }; + + ElementWrapper.prototype.findKeyValuePairsByTestId = function(testId) { + const selector = \`.\${KeyValuePairsWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, KeyValuePairsWrapper); + }; + + ElementWrapper.prototype.findLineChart = function(selector) { + const rootSelector = \`.\${LineChartWrapper.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, LineChartWrapper); + }; + + ElementWrapper.prototype.findAllLineCharts = function(selector) { + return this.findAllComponents(LineChartWrapper, selector); + }; + + ElementWrapper.prototype.findLineChartByTestId = function(testId) { + const selector = \`.\${LineChartWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, LineChartWrapper); + }; + + ElementWrapper.prototype.findLink = function(selector) { + const rootSelector = \`.\${LinkWrapper.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, LinkWrapper); + }; + + ElementWrapper.prototype.findAllLinks = function(selector) { + return this.findAllComponents(LinkWrapper, selector); + }; + + ElementWrapper.prototype.findLinkByTestId = function(testId) { + const selector = \`.\${LinkWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, LinkWrapper); + }; + + ElementWrapper.prototype.findLiveRegion = function(selector) { + const rootSelector = \`.\${LiveRegionWrapper.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, LiveRegionWrapper); + }; + + ElementWrapper.prototype.findAllLiveRegions = function(selector) { + return this.findAllComponents(LiveRegionWrapper, selector); + }; + + ElementWrapper.prototype.findLiveRegionByTestId = function(testId) { + const selector = \`.\${LiveRegionWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, LiveRegionWrapper); + }; + + ElementWrapper.prototype.findMixedLineBarChart = function(selector) { + const rootSelector = \`.\${MixedLineBarChartWrapper.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, MixedLineBarChartWrapper); + }; + + ElementWrapper.prototype.findAllMixedLineBarCharts = function(selector) { + return this.findAllComponents(MixedLineBarChartWrapper, selector); + }; + + ElementWrapper.prototype.findMixedLineBarChartByTestId = function(testId) { + const selector = \`.\${MixedLineBarChartWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, MixedLineBarChartWrapper); + }; + + ElementWrapper.prototype.findModal = function(selector) { + const rootSelector = \`.\${ModalWrapper.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, ModalWrapper); + }; + + ElementWrapper.prototype.findAllModals = function(selector) { + return this.findAllComponents(ModalWrapper, selector); + }; + + ElementWrapper.prototype.findModalByTestId = function(testId) { + const selector = \`.\${ModalWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ModalWrapper); + }; + + ElementWrapper.prototype.findMultiselect = function(selector) { + const rootSelector = \`.\${MultiselectWrapper.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, MultiselectWrapper); + }; + + ElementWrapper.prototype.findAllMultiselects = function(selector) { + return this.findAllComponents(MultiselectWrapper, selector); + }; + + ElementWrapper.prototype.findMultiselectByTestId = function(testId) { + const selector = \`.\${MultiselectWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, MultiselectWrapper); + }; + + ElementWrapper.prototype.findPagination = function(selector) { + const rootSelector = \`.\${PaginationWrapper.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, PaginationWrapper); + }; + + ElementWrapper.prototype.findAllPaginations = function(selector) { + return this.findAllComponents(PaginationWrapper, selector); + }; + + ElementWrapper.prototype.findPaginationByTestId = function(testId) { + const selector = \`.\${PaginationWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, PaginationWrapper); + }; + + ElementWrapper.prototype.findPieChart = function(selector) { + const rootSelector = \`.\${PieChartWrapper.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, PieChartWrapper); + }; + + ElementWrapper.prototype.findAllPieCharts = function(selector) { + return this.findAllComponents(PieChartWrapper, selector); + }; + + ElementWrapper.prototype.findPieChartByTestId = function(testId) { + const selector = \`.\${PieChartWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, PieChartWrapper); + }; + + ElementWrapper.prototype.findPopover = function(selector) { + const rootSelector = \`.\${PopoverWrapper.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, PopoverWrapper); + }; + + ElementWrapper.prototype.findAllPopovers = function(selector) { + return this.findAllComponents(PopoverWrapper, selector); + }; + + ElementWrapper.prototype.findPopoverByTestId = function(testId) { + const selector = \`.\${PopoverWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, PopoverWrapper); + }; + + ElementWrapper.prototype.findProgressBar = function(selector) { + const rootSelector = \`.\${ProgressBarWrapper.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, ProgressBarWrapper); + }; + + ElementWrapper.prototype.findAllProgressBars = function(selector) { + return this.findAllComponents(ProgressBarWrapper, selector); + }; + + ElementWrapper.prototype.findProgressBarByTestId = function(testId) { + const selector = \`.\${ProgressBarWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ProgressBarWrapper); + }; + + ElementWrapper.prototype.findPromptInput = function(selector) { + const rootSelector = \`.\${PromptInputWrapper.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, PromptInputWrapper); + }; + + ElementWrapper.prototype.findAllPromptInputs = function(selector) { + return this.findAllComponents(PromptInputWrapper, selector); + }; + + ElementWrapper.prototype.findPromptInputByTestId = function(testId) { + const selector = \`.\${PromptInputWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, PromptInputWrapper); + }; + + ElementWrapper.prototype.findPropertyFilter = function(selector) { + const rootSelector = \`.\${PropertyFilterWrapper.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, PropertyFilterWrapper); + }; + + ElementWrapper.prototype.findAllPropertyFilters = function(selector) { + return this.findAllComponents(PropertyFilterWrapper, selector); + }; + + ElementWrapper.prototype.findPropertyFilterByTestId = function(testId) { + const selector = \`.\${PropertyFilterWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, PropertyFilterWrapper); + }; + + ElementWrapper.prototype.findRadioGroup = function(selector) { + const rootSelector = \`.\${RadioGroupWrapper.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, RadioGroupWrapper); + }; + + ElementWrapper.prototype.findAllRadioGroups = function(selector) { + return this.findAllComponents(RadioGroupWrapper, selector); + }; + + ElementWrapper.prototype.findRadioGroupByTestId = function(testId) { + const selector = \`.\${RadioGroupWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, RadioGroupWrapper); + }; + + ElementWrapper.prototype.findS3ResourceSelector = function(selector) { + const rootSelector = \`.\${S3ResourceSelectorWrapper.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, S3ResourceSelectorWrapper); + }; + + ElementWrapper.prototype.findAllS3ResourceSelectors = function(selector) { + return this.findAllComponents(S3ResourceSelectorWrapper, selector); + }; + + ElementWrapper.prototype.findS3ResourceSelectorByTestId = function(testId) { + const selector = \`.\${S3ResourceSelectorWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, S3ResourceSelectorWrapper); + }; + + ElementWrapper.prototype.findSegmentedControl = function(selector) { + const rootSelector = \`.\${SegmentedControlWrapper.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, SegmentedControlWrapper); + }; + + ElementWrapper.prototype.findAllSegmentedControls = function(selector) { + return this.findAllComponents(SegmentedControlWrapper, selector); + }; + + ElementWrapper.prototype.findSegmentedControlByTestId = function(testId) { + const selector = \`.\${SegmentedControlWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SegmentedControlWrapper); + }; + + ElementWrapper.prototype.findSelect = function(selector) { + const rootSelector = \`.\${SelectWrapper.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, SelectWrapper); + }; + + ElementWrapper.prototype.findAllSelects = function(selector) { + return this.findAllComponents(SelectWrapper, selector); + }; + + ElementWrapper.prototype.findSelectByTestId = function(testId) { + const selector = \`.\${SelectWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SelectWrapper); + }; + + ElementWrapper.prototype.findSideNavigation = function(selector) { + const rootSelector = \`.\${SideNavigationWrapper.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, SideNavigationWrapper); + }; + + ElementWrapper.prototype.findAllSideNavigations = function(selector) { + return this.findAllComponents(SideNavigationWrapper, selector); + }; + + ElementWrapper.prototype.findSideNavigationByTestId = function(testId) { + const selector = \`.\${SideNavigationWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SideNavigationWrapper); + }; + + ElementWrapper.prototype.findSlider = function(selector) { + const rootSelector = \`.\${SliderWrapper.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, SliderWrapper); + }; + + ElementWrapper.prototype.findAllSliders = function(selector) { + return this.findAllComponents(SliderWrapper, selector); + }; + + ElementWrapper.prototype.findSliderByTestId = function(testId) { + const selector = \`.\${SliderWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SliderWrapper); + }; + + ElementWrapper.prototype.findSpaceBetween = function(selector) { + const rootSelector = \`.\${SpaceBetweenWrapper.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, SpaceBetweenWrapper); + }; + + ElementWrapper.prototype.findAllSpaceBetweens = function(selector) { + return this.findAllComponents(SpaceBetweenWrapper, selector); + }; + + ElementWrapper.prototype.findSpaceBetweenByTestId = function(testId) { + const selector = \`.\${SpaceBetweenWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SpaceBetweenWrapper); + }; + + ElementWrapper.prototype.findSpinner = function(selector) { + const rootSelector = \`.\${SpinnerWrapper.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, SpinnerWrapper); + }; + + ElementWrapper.prototype.findAllSpinners = function(selector) { + return this.findAllComponents(SpinnerWrapper, selector); + }; + + ElementWrapper.prototype.findSpinnerByTestId = function(testId) { + const selector = \`.\${SpinnerWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SpinnerWrapper); + }; + + ElementWrapper.prototype.findSplitPanel = function(selector) { + const rootSelector = \`.\${SplitPanelWrapper.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, SplitPanelWrapper); + }; + + ElementWrapper.prototype.findAllSplitPanels = function(selector) { + return this.findAllComponents(SplitPanelWrapper, selector); + }; + + ElementWrapper.prototype.findSplitPanelByTestId = function(testId) { + const selector = \`.\${SplitPanelWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, SplitPanelWrapper); + }; + + ElementWrapper.prototype.findStatusIndicator = function(selector) { + const rootSelector = \`.\${StatusIndicatorWrapper.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, StatusIndicatorWrapper); + }; + + ElementWrapper.prototype.findAllStatusIndicators = function(selector) { + return this.findAllComponents(StatusIndicatorWrapper, selector); + }; + + ElementWrapper.prototype.findStatusIndicatorByTestId = function(testId) { + const selector = \`.\${StatusIndicatorWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, StatusIndicatorWrapper); + }; + + ElementWrapper.prototype.findSteps = function(selector) { + const rootSelector = \`.\${StepsWrapper.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, StepsWrapper); + }; + + ElementWrapper.prototype.findAllSteps = function(selector) { + return this.findAllComponents(StepsWrapper, selector); + }; + + ElementWrapper.prototype.findStepsByTestId = function(testId) { + const selector = \`.\${StepsWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, StepsWrapper); + }; + + ElementWrapper.prototype.findTable = function(selector) { + const rootSelector = \`.\${TableWrapper.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, TableWrapper); + }; + + ElementWrapper.prototype.findAllTables = function(selector) { + return this.findAllComponents(TableWrapper, selector); + }; + + ElementWrapper.prototype.findTableByTestId = function(testId) { + const selector = \`.\${TableWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TableWrapper); + }; + + ElementWrapper.prototype.findTabs = function(selector) { + const rootSelector = \`.\${TabsWrapper.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, TabsWrapper); + }; + + ElementWrapper.prototype.findAllTabs = function(selector) { + return this.findAllComponents(TabsWrapper, selector); + }; + + ElementWrapper.prototype.findTabsByTestId = function(testId) { + const selector = \`.\${TabsWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TabsWrapper); + }; + + ElementWrapper.prototype.findTagEditor = function(selector) { + const rootSelector = \`.\${TagEditorWrapper.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, TagEditorWrapper); + }; + + ElementWrapper.prototype.findAllTagEditors = function(selector) { + return this.findAllComponents(TagEditorWrapper, selector); + }; + + ElementWrapper.prototype.findTagEditorByTestId = function(testId) { + const selector = \`.\${TagEditorWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TagEditorWrapper); + }; + + ElementWrapper.prototype.findTextContent = function(selector) { + const rootSelector = \`.\${TextContentWrapper.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, TextContentWrapper); + }; + + ElementWrapper.prototype.findAllTextContents = function(selector) { + return this.findAllComponents(TextContentWrapper, selector); + }; + + ElementWrapper.prototype.findTextContentByTestId = function(testId) { + const selector = \`.\${TextContentWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TextContentWrapper); + }; + + ElementWrapper.prototype.findTextFilter = function(selector) { + const rootSelector = \`.\${TextFilterWrapper.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, TextFilterWrapper); + }; + + ElementWrapper.prototype.findAllTextFilters = function(selector) { + return this.findAllComponents(TextFilterWrapper, selector); + }; + + ElementWrapper.prototype.findTextFilterByTestId = function(testId) { + const selector = \`.\${TextFilterWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TextFilterWrapper); + }; + + ElementWrapper.prototype.findTextarea = function(selector) { + const rootSelector = \`.\${TextareaWrapper.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, TextareaWrapper); + }; + + ElementWrapper.prototype.findAllTextareas = function(selector) { + return this.findAllComponents(TextareaWrapper, selector); + }; + + ElementWrapper.prototype.findTextareaByTestId = function(testId) { + const selector = \`.\${TextareaWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TextareaWrapper); + }; + + ElementWrapper.prototype.findTiles = function(selector) { + const rootSelector = \`.\${TilesWrapper.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, TilesWrapper); + }; + + ElementWrapper.prototype.findAllTiles = function(selector) { + return this.findAllComponents(TilesWrapper, selector); + }; + + ElementWrapper.prototype.findTilesByTestId = function(testId) { + const selector = \`.\${TilesWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TilesWrapper); + }; + + ElementWrapper.prototype.findTimeInput = function(selector) { + const rootSelector = \`.\${TimeInputWrapper.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, TimeInputWrapper); + }; + + ElementWrapper.prototype.findAllTimeInputs = function(selector) { + return this.findAllComponents(TimeInputWrapper, selector); + }; + + ElementWrapper.prototype.findTimeInputByTestId = function(testId) { + const selector = \`.\${TimeInputWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TimeInputWrapper); + }; + + ElementWrapper.prototype.findToggle = function(selector) { + const rootSelector = \`.\${ToggleWrapper.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, ToggleWrapper); + }; + + ElementWrapper.prototype.findAllToggles = function(selector) { + return this.findAllComponents(ToggleWrapper, selector); + }; + + ElementWrapper.prototype.findToggleByTestId = function(testId) { + const selector = \`.\${ToggleWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ToggleWrapper); + }; + + ElementWrapper.prototype.findToggleButton = function(selector) { + const rootSelector = \`.\${ToggleButtonWrapper.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, ToggleButtonWrapper); + }; + + ElementWrapper.prototype.findAllToggleButtons = function(selector) { + return this.findAllComponents(ToggleButtonWrapper, selector); + }; + + ElementWrapper.prototype.findToggleButtonByTestId = function(testId) { + const selector = \`.\${ToggleButtonWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, ToggleButtonWrapper); + }; + + ElementWrapper.prototype.findTokenGroup = function(selector) { + const rootSelector = \`.\${TokenGroupWrapper.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, TokenGroupWrapper); + }; + + ElementWrapper.prototype.findAllTokenGroups = function(selector) { + return this.findAllComponents(TokenGroupWrapper, selector); + }; + + ElementWrapper.prototype.findTokenGroupByTestId = function(testId) { + const selector = \`.\${TokenGroupWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TokenGroupWrapper); + }; + + ElementWrapper.prototype.findTopNavigation = function(selector) { + const rootSelector = \`.\${TopNavigationWrapper.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, TopNavigationWrapper); + }; + + ElementWrapper.prototype.findTutorialPanel = function(selector) { + const rootSelector = \`.\${TutorialPanelWrapper.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, TutorialPanelWrapper); + }; + + ElementWrapper.prototype.findAllTutorialPanels = function(selector) { + return this.findAllComponents(TutorialPanelWrapper, selector); + }; + + ElementWrapper.prototype.findTutorialPanelByTestId = function(testId) { + const selector = \`.\${TutorialPanelWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, TutorialPanelWrapper); + }; + + ElementWrapper.prototype.findWizard = function(selector) { + const rootSelector = \`.\${WizardWrapper.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, WizardWrapper); + }; + + ElementWrapper.prototype.findAllWizards = function(selector) { + return this.findAllComponents(WizardWrapper, selector); + }; + + ElementWrapper.prototype.findWizardByTestId = function(testId) { + const selector = \`.\${WizardWrapper.rootSelector}[data-testid="\${CSS.escape(testId)}"]\`; + return this.findComponent(selector, WizardWrapper); }; export default function wrapper(root: string = 'body') { return new ElementWrapper(root); }" `;