UNPKG

wix-style-react

Version:
24 lines (20 loc) 922 B
import eyes from 'eyes.it'; import { iconWithOptionsTestkitFactory } from '../../testkit/protractor'; import { waitForVisibilityOf } from 'wix-ui-test-utils/protractor'; import { getStoryUrl } from '../../test/utils/storybook-helpers'; describe('IconWithOptions', function () { var storyUrl = getStoryUrl('Deprecated', 'IconWithOptions'); var dataHook = 'story-iconWithOptions'; eyes.it('should hide dropdown when selecting an option which is not already selected', function () { browser.get(storyUrl); var driver = iconWithOptionsTestkitFactory({ dataHook: dataHook }); waitForVisibilityOf(driver.element(), 'Cannot find iconWithOptions').then(function () { driver.mouseEnter(); driver.getDropdownItem(1).click(); driver.mouseLeave(); driver.mouseEnter(); driver.getDropdownItem(1).click(); expect(driver.getDropdown().isDisplayed()).toBe(true); }); }); });