import { ComponentFixture } from '@angular/core/testing'; import { HarnessPredicate, BaseHarnessFilters, ComponentHarness } from '@angular/cdk/testing'; import { SkyHarnessFilters, SkyQueryableComponentHarness, SkyComponentHarness } from '@skyux/core/testing'; import { SkyTabsetButtonsDisplayMode, SkyTabsetNavButtonType } from '@skyux/tabs'; /** * Properties of a SKY UX tab. * @internal */ interface SkyTabsetFixtureTab { /** * Whether the tab is selected. */ active: boolean; /** * Whether the tab is disabled. */ disabled: boolean; /** * The permalink value specified for the tab. */ permalinkValue: string | undefined; /** * The count displayed in the tab header. */ tabHeaderCount: string | undefined; /** * The text displayed in the tab header. */ tabHeading: string | undefined; } /** * Allows interaction with a SKY UX tabset component. * @deprecated Use `SkyTabsetHarness` instead. * @internal */ declare class SkyTabsetFixture { #private; /** * The tabset component's ARIA label. */ get ariaLabel(): string | undefined; /** * The tabset component's ARIA labelled by attribute. */ get ariaLabelledBy(): string | undefined; /** * The index of the currently selected tab. */ get activeTabIndex(): number; constructor(fixture: ComponentFixture, skyTestId: string); /** * Retrieves information about the tab at the specified index. * @param tabIndex The index of the tab. */ getTab(tabIndex: number): SkyTabsetFixtureTab; /** * Clicks the tabset's "new" button. */ clickNewButton(): Promise; /** * Clicks the tabset's "open" button. */ clickOpenButton(): Promise; /** * Clicks the tab button at the specified index. * @param tabIndex The index of the tab. */ clickTab(tabIndex: number): Promise; /** * Click's the tab's close button at the specified index. * @param tabIndex The index of the tab. */ clickTabClose(tabIndex: number): Promise; } /** * A set of criteria that can be used to filter a list of `SkySectionedFormHarness` instances. */ interface SkySectionedFormHarnessFilters extends SkyHarnessFilters { } /** * A set of criteria that can be used to filter a list of `SkyVerticalTabContentHarness` instances. */ interface SkyVerticalTabContentHarnessFilters extends SkyHarnessFilters { /** * Finds tabs whose id matches given value. * @internal */ tabId: string; } /** * Harness for interacting with a vertical tab content in tests. */ declare class SkyVerticalTabContentHarness extends SkyQueryableComponentHarness { /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyVerticalTabContentHarness` that meets certain criteria. */ static with(filters: SkyVerticalTabContentHarnessFilters): HarnessPredicate; /** * Gets the tab content's id. * @internal */ getTabId(): Promise; /** * Whether the tab content is visible. */ isVisible(): Promise; } /** * A set of criteria that can be used to filter a list of `SkySectionedFormSectionContentHarness` instances. */ interface SkySectionedFormSectionContentHarnessFilters extends SkyVerticalTabContentHarnessFilters { } /** * Harness for interacting with a sectioned form content in tests. */ declare class SkySectionedFormSectionContentHarness extends SkyVerticalTabContentHarness { /** * Gets a `HarnessPredicate` that can be used to search for a * `SkySectionedFormSectionContentHarness` that meets certain criteria. */ static with(filters: SkySectionedFormSectionContentHarnessFilters): HarnessPredicate; /** * Whether the section content is visible. */ isVisible(): Promise; } /** * A set of criteria that can be used to filter a list of `SkyVerticalTabButtonHarness` instances. */ interface SkyVerticalTabButtonHarnessFilters extends SkyHarnessFilters { /** * Find a tab whose heading matches the given value. */ tabHeading?: string; } /** * Harness for interacting with a vertical tab button in tests. */ declare class SkyVerticalTabButtonHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyVerticalTabButtonHarness` that meets certain criteria. */ static with(filters: SkyVerticalTabButtonHarnessFilters): HarnessPredicate; /** * Clicks the tab button to activate the tab. */ click(): Promise; /** * Gets the `SkyVerticalTabContentHarness` for this tab. */ getTabContent(): Promise; /** * Gets the tab header count. */ getTabHeaderCount(): Promise; /** * Gets the tab heading text. */ getTabHeading(): Promise; /** * Gets the id of the content controlled by this tab. * @internal */ getTabId(): Promise; /** * Whether the tab is active. */ isActive(): Promise; /** * Whether the tab is disabled. */ isDisabled(): Promise; } /** * A set of criteria that can be used to filter a list of `SkySectionedFormSectionHarness` instances. */ interface SkySectionedFormSectionHarnessFilters extends SkyHarnessFilters { /** * Finds a section whose heading matches the given value. */ sectionHeading?: string; } /** * Harness for interacting with a sectioned form section component in tests. */ declare class SkySectionedFormSectionHarness extends SkyVerticalTabButtonHarness { /** * Gets a `HarnessPredicate` that can be used to search for a * `SkySectionedFormSectionHarness` that meets certain criteria. */ static with(filters: SkySectionedFormSectionHarnessFilters): HarnessPredicate; /** * Clicks the section to activate. */ click(): Promise; /** * Gets the `SkySectionedFormSectionContentHarness` for this section. */ getSectionContent(): Promise; /** * Gets the section heading. */ getSectionHeading(): Promise; /** * Gets the section item count. */ getSectionItemCount(): Promise; /** * Gets the harness for this tab. * Replacing with getSectionContent. * @internal */ getTabContent(): Promise; /** * Gets the tab header count. * Replacing with getSectionItemCount. * @internal */ getTabHeaderCount(): Promise; /** * Gets the tab heading text. * Replacing with getSectionHeading. * @internal */ getTabHeading(): Promise; /** * Whether the section is active. */ isActive(): Promise; /** * Whether the section is disabled. * This isn't used on sectioned forms. * @internal */ isDisabled(): Promise; } /** * Harness for interacting with a sectioned form component in tests. */ declare class SkySectionedFormHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkySectionedFormHarness` that meets certain criteria. */ static with(filters: SkySectionedFormHarnessFilters): HarnessPredicate; /** * Gets the `SkySectionedFormSectionHarness` for the currently active section. */ getActiveSection(): Promise; getActiveSectionContent(): Promise; /** * Gets the tab width as a CSS `flex-basis` value (for example, `200px`), * or `null` when no width is set. The width is only applied in the desktop * layout, so this returns `null` in the mobile layout and when the tabs * pane is not rendered at all. */ getTabWidth(): Promise; /** * Gets a specific section based on the filter criteria. * @param filters The filter criteria. */ getSection(filters: SkySectionedFormSectionHarnessFilters): Promise; /** * Gets an array of sections based on the filter criteria. * If no filter is provided, returns all sections. * @param filters The optional filter criteria. */ getSections(filters?: SkySectionedFormSectionHarnessFilters): Promise; /** * Whether the section tabs are visible. * In mobile view, sectioned forms collapse to just content pane. */ isSectionsVisible(): Promise; } /** * A set of criteria that can be used to filter a list of `SkyTabButtonHarness` instances. */ interface SkyTabButtonHarnessFilters extends BaseHarnessFilters { /** * Finds tab button whose tab heading matches this value. */ tabHeading?: string; } /** * A set of criteria that can be used to filter a list of `SkyTabContentHarness` instances. */ interface SkyTabContentHarnessFilters extends SkyHarnessFilters { /** * Finds tabs whose id matches given value. * @internal */ tabId: string; } /** * Harness for interacting with a tab component in tests. */ declare class SkyTabContentHarness extends SkyQueryableComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyTabContentHarness` that meets certain criteria. * @internal */ static with(filters: SkyTabContentHarnessFilters): HarnessPredicate; /** * Gets the tab's layout. */ getLayout(): Promise; /** * @internal */ getTabId(): Promise; /** * Whether the tab content is visible. */ isVisible(): Promise; } /** * Harness for interacting with a tab button component in tests. */ declare class SkyTabButtonHarness extends ComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyTabButtonHarness` that meets certain criteria. */ static with(filters: SkyTabButtonHarnessFilters): HarnessPredicate; /** * Clicks the tab button. */ click(): Promise; /** * Clicks the remove tab button if it is visible. */ clickRemoveButton(): Promise; /** * Gets the permalink that the page routes to when the tab is clicked. */ getPermalink(): Promise; /** * Gets the `SkyTabContentHarness` controlled by this tab button. */ getTabContentHarness(): Promise; /** * Gets the tab heading. */ getTabHeading(): Promise; /** * Gets whether the tab button is active. */ isActive(): Promise; /** * Gets whether the tab button is disabled. */ isDisabled(): Promise; /** * Whether the tab button is in a Wizard tabset. */ isInWizardTabset(): Promise; /** * Gets the id of the content controlled by this tab. * @internal */ getTabId(): Promise; } /** * A set of criteria that can be used to filter a list of `SkyTabsetHarness` instances. */ interface SkyTabsetHarnessFilters extends SkyHarnessFilters { } /** * Harness for interacting with a tabset component in tests. */ declare class SkyTabsetHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyTabsetHarness` that meets certain criteria. */ static with(filters: SkyTabsetHarnessFilters): HarnessPredicate; /** * In `dropdown` mode, clicks the dropdown tab to open the tab dropdown menu. */ clickDropdownTab(): Promise; /** * Clicks the new tab button if visible. */ clickNewTabButton(): Promise; /** * Clicks the open tab button if visible. */ clickOpenTabButton(): Promise; /** * Clicks a tab button with a `tabHeading` matching the input. */ clickTabButton(tabHeading: string): Promise; /** * Gets the active tab button harness. */ getActiveTabButton(): Promise; /** * Gets the tabset aria-label value. */ getAriaLabel(): Promise; /** * Gets the tabset aria-labelledby value. */ getAriaLabelledBy(): Promise; /** * Gets the tabset's display mode. */ getMode(): Promise; /** * Gets a specific tab button based on the filter criteria. * @param filters The filter criteria. */ getTabButtonHarness(filters: SkyTabButtonHarnessFilters): Promise; /** * Gets an array of tab button harnesses based on the filter criteria. * If no filter is provided, returns all tab button harnesses. * @param filters The optional filter criteria. */ getTabButtonHarnesses(filters?: SkyTabButtonHarnessFilters): Promise; /** * Gets a tab content harness for the tab with the given `tabHeading`. */ getTabContentHarness(tabHeading: string): Promise; /** * Whether the tabset is a Wizard component. */ isWizardTabset(): Promise; } /** * A set of criteria that can be used to filter a list of `SkyTabsetNavButtonHarness` instances. */ interface SkyTabsetNavButtonHarnessFilters extends SkyHarnessFilters { /** * Finds the tabset nav button whose `buttonType` matches the given value. */ buttonType?: SkyTabsetNavButtonType; } /** * Harness to interact with tabset nav buttons in wizard style tabset tests. */ declare class SkyTabsetNavButtonHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyTabsetNavButtonHarness` that meets certain criteria. */ static with(filters: SkyTabsetNavButtonHarnessFilters): HarnessPredicate; /** * Clicks the button. */ click(): Promise; /** * Gets the button text. */ getButtonText(): Promise; /** * Gets the button type. */ getButtonType(): Promise; /** * Whether the button is disabled. */ isDisabled(): Promise; } /** * A set of criteria that can be used to filter a list of `SkyVerticalTabsetGroupHarness` instances. */ interface SkyVerticalTabsetGroupHarnessFilters extends SkyHarnessFilters { /** * Find tabset groups whose heading matches the given value. */ groupHeading?: string; } /** * Harness for interacting with a vertical tabset group in tests. */ declare class SkyVerticalTabsetGroupHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyVerticalTabsetGroupHarness` that meets certain criteria. */ static with(filters: SkyVerticalTabsetGroupHarnessFilters): HarnessPredicate; /** * Clicks the group button to toggle its expanded state. */ click(): Promise; /** * Gets the group heading text. */ getGroupHeading(): Promise; /** * Gets a specific vertical tab based on the filter criteria. * @param filters The filter criteria. */ getVerticalTab(filters: SkyVerticalTabButtonHarnessFilters): Promise; /** * Gets an array of vertical tab buttons based on the filter criteria. * If no filter is provided, returns all vertical tab buttons. * @param filters The optional filter criteria. */ getVerticalTabs(filters?: SkyVerticalTabButtonHarnessFilters): Promise; /** * Whether a tab under this group is active. */ isActive(): Promise; /** * Whether the group is disabled. */ isDisabled(): Promise; /** * Whether the group is expanded. */ isOpen(): Promise; } /** * A set of criteria that can be used to filter a list of `SkyVerticalTabsetHarness` instances. */ interface SkyVerticalTabsetHarnessFilters extends SkyHarnessFilters { } /** * Harness for interacting with the vertical tabset component in tests. */ declare class SkyVerticalTabsetHarness extends SkyComponentHarness { #private; /** * @internal */ static hostSelector: string; /** * Gets a `HarnessPredicate` that can be used to search for a * `SkyVerticalTabsetHarness` that meets certain criteria. */ static with(filters: SkyVerticalTabsetHarnessFilters): HarnessPredicate; /** * Click the show tabs button in mobile view. */ clickShowTabsButton(): Promise; /** * Gets the `SkyVerticalTabButtonHarness` of the currently active tab. */ getActiveTab(): Promise; /** * Gets the `SkyVerticalTabContentHarness` for the currently active tab. */ getActiveTabContent(): Promise; /** * Gets the aria-label. */ getAriaLabel(): Promise; /** * Gets the aria-labelledby. */ getAriaLabelledBy(): Promise; /** * Gets a specific vertical tabset group based on the filter criteria. * @param filters The filter criteria. */ getGroup(filters: SkyVerticalTabsetGroupHarnessFilters): Promise; /** * Gets an array of vertical tabset groups based on the filter criteria. * If no filter is provided, returns all vertical tabset groups. * @param filters The optional filter criteria. */ getGroups(filters?: SkyVerticalTabsetGroupHarnessFilters): Promise; /** * Gets the text in the show tabs button in mobile view. */ getShowTabsText(): Promise; /** * Gets the tab width as a CSS `flex-basis` value (for example, `200px`), * or `null` when no width is set. The width is only applied in the desktop * layout, so this returns `null` in the mobile layout. */ getTabWidth(): Promise; /** * Gets a specific vertical tab button based on the filter criteria. * @param filters The filter criteria. */ getTab(filters: SkyVerticalTabButtonHarnessFilters): Promise; /** * Gets an array of vertical tab buttons based on the filter criteria. * If no filter is provided, returns all vertical tab buttons. * @param filters The optional filter criteria. */ getTabs(filters?: SkyVerticalTabButtonHarnessFilters): Promise; /** * Whether the tabs are visible. * In mobile view, vertical tabsets collapse to just the content pane * with a button to show the tabs. */ isTabsVisible(): Promise; } export { SkySectionedFormHarness, SkySectionedFormSectionContentHarness, SkySectionedFormSectionHarness, SkyTabButtonHarness, SkyTabContentHarness, SkyTabsetFixture, SkyTabsetHarness, SkyTabsetNavButtonHarness, SkyVerticalTabButtonHarness, SkyVerticalTabContentHarness, SkyVerticalTabsetGroupHarness, SkyVerticalTabsetHarness }; export type { SkySectionedFormHarnessFilters, SkySectionedFormSectionContentHarnessFilters, SkySectionedFormSectionHarnessFilters, SkyTabButtonHarnessFilters, SkyTabContentHarnessFilters, SkyTabsetFixtureTab, SkyTabsetHarnessFilters, SkyTabsetNavButtonHarnessFilters, SkyVerticalTabButtonHarnessFilters, SkyVerticalTabContentHarnessFilters, SkyVerticalTabsetGroupHarnessFilters, SkyVerticalTabsetHarnessFilters };