@wix/design-system
Version:
@wix/design-system
54 lines (40 loc) • 1.4 kB
Markdown
## Page Testkit
### Import
- unidriver: `import { PageUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { PageTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { PageTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { PageTestkit } 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
### hasClass
- signature: hasClass(name)
### backgroundImageExists
- signature: backgroundImageExists()
- description: true if header background image exist
### gradientClassNameExists
- signature: gradientClassNameExists()
- description: true if gradient class name exist
### tailExists
- signature: tailExists()
- description: true if tail exist in DOM
### gradientContainerHeight
- signature: gradientContainerHeight()
- description: return container height
### getPageHtml
- signature: getPageHtml()
- description: returns html in a string form