UNPKG

@wix/design-system

Version:

@wix/design-system

86 lines (67 loc) 2.22 kB
## SidebarNext Testkit ### Import - unidriver: `import { SidebarNextUniDriver } from '@wix/design-system/dist/testkit/unidriver';` - vanilla: `import { SidebarNextTestkit } from '@wix/design-system/dist/testkit';` - puppeteer: `import { SidebarNextTestkit } from '@wix/design-system/dist/testkit/puppeteer';` - playwright: `import { SidebarNextTestkit } from '@wix/design-system/dist/testkit/playwright';` ### API ### exists - signature: exists() - returns: Promise<boolean> - description: Checks whether the component found with the given data hook ### element - signature: element() - returns: Promise<any> - description: Gets the component root element ### click - signature: click() - returns: Promise<void> - description: Clicks on the component root element ### base - signature: base() - returns: UniDriver - description: Returns UniDriver for the base element ### getSelectedKey - signature: getSelectedKey() - returns: Promise<string> - description: Gets the current selected key ### getSkin - signature: getSkin() - returns: Promise<string> - description: Gets the current skin ### isHidden - signature: isHidden() - returns: Promise<boolean> - description: Checks whether the sidebar is hidden ### headerExists - signature: headerExists() - returns: Promise<boolean> - description: Checks whether the header element exists ### footerExists - signature: footerExists() - returns: Promise<boolean> - description: Checks whether the footer element exists ### isLoading - signature: isLoading() - returns: Promise<boolean> - description: Checks whether the skeleton is displayed ### getWidth - signature: getWidth() - returns: Promise<string> - description: Gets the current width ### isMinimized - signature: isMinimized() - returns: Promise<boolean> - description: Gets the current minimized state ### clickOnMinimizeButton - signature: clickOnMinimizeButton() - returns: Promise<void> - description: Clicks on minimization button ### minimizeButtonExists - signature: minimizeButtonExists() - returns: Promise<boolean> - description: Checks whether the minimize button exists ### isNext - signature: isNext() - returns: Promise<boolean> - description: Gets if the sidebar is next version