## Modal Testkit

### Import

- unidriver: `import { ModalUniDriver } from '@wix/design-system/dist/testkit/unidriver';`
- vanilla: `import { ModalTestkit } from '@wix/design-system/dist/testkit';`
- puppeteer: `import { ModalTestkit } from '@wix/design-system/dist/testkit/puppeteer';`
- playwright: `import { ModalTestkit } 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.

### exists
- signature: exists()
- returns: Promise<boolean>
- description: true if the modal is on the DOM

### isOpen
- signature: isOpen()
- returns: Promise<boolean>
- description: true when the module is open

### getChildBySelector
- signature: getChildBySelector(selector)

### isScrollable
- signature: isScrollable()
- returns: Promise<boolean>
- description: true if the modal is scrollable

### closeButtonExists
- signature: closeButtonExists()
- returns: Promise<boolean>

### clickOnOverlay
- signature: clickOnOverlay()
- returns: Promise<void>
- description: click on the modal overlay (helpful for testing if the modal is dismissed)

### clickOnCloseButton
- signature: clickOnCloseButton()
- returns: Promise<void>

### clickOnNavigationPrevious
- signature: clickOnNavigationPrevious()
- returns: Promise<void>
- description: click on navigation control previous button

### clickOnNavigationNext
- signature: clickOnNavigationNext()
- returns: Promise<void>
- description: click on navigation control next button

### navigationPreviousExists
- signature: navigationPreviousExists()
- returns: Promise<boolean>

### navigationNextExists
- signature: navigationNextExists()
- returns: Promise<boolean>

### getNavigationPreviousLabel
- signature: getNavigationPreviousLabel()
- returns: Promise<string | null>

### getNavigationNextLabel
- signature: getNavigationNextLabel()
- returns: Promise<string | null>

### getContent
- signature: getContent()
- returns: Promise<any>
- description: returns the element of the modal content (helpful to initialize a layout testkit)

### getContentStyle
- signature: getContentStyle()
- returns: Promise<any>
- description: returns the style of the modal content

### getContentLabel
- signature: getContentLabel()
- returns: Promise<string | null>
- description: returns the modal aria-label value as given in contentLabel property

### getZIndex
- signature: getZIndex()
- returns: Promise<any>
