@wix/design-system
Version:
@wix/design-system
81 lines (63 loc) • 2.08 kB
Markdown
## AnalyticsSummaryCard Testkit
### Import
- unidriver: `import { AnalyticsSummaryCardUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { AnalyticsSummaryCardTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { AnalyticsSummaryCardTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { AnalyticsSummaryCardTestkit } 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
### clickCTA
- signature: clickCTA()
- returns: Promise<React.MouseEventHandler<HTMLButtonElement>>
- description: Click on CTA
### CTAExists
- signature: CTAExists()
- returns: boolean
- description: Check if CTA exists
### CTAExistsWithoutHover
- signature: CTAExistsWithoutHover()
- returns: boolean
- description: Check if CTA exists
### isLoading
- signature: isLoading()
- returns: Promise<boolean>
- description: Checks whether the Analytics are loading
### getValue
- signature: getValue()
- returns: Promise<string>
- description: returns the value text
### getValueTooltipText
- signature: getValueTooltipText()
- returns: Promise<string>
- description: returns the value tooltip text
### getTitle
- signature: getTitle()
- returns: Promise<string>
- description: returns the title text
### getTitleTooltipText
- signature: getTitleTooltipText()
- returns: Promise<string>
- description: returns the title tooltip text
### trendExists
- signature: trendExists()
- returns: Promise<boolean>
- description: checks if trend exists
### getTrendvalue
- signature: getTrendvalue()
- returns: Promise<number>
- description: returns the trend value