"use strict";

/*
Copyright (c) 2018 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/

/* eslint-env node */

/* eslint-disable flowtype/require-valid-file-annotation */

/* global after */
var scenarios = require('./examples-list');

var _require = require('../../e2e/helpers'),
    goToUrl = _require.goToUrl;

var suite = 'Tooltip Test Suite';
var selectors = {
  tooltip: '[role="tooltip"]'
};
describe('The tooltip component', function () {
  after(function (browser, done) {
    browser.end(function () {
      return done();
    });
  });
  xit('passes basic a11y tests', function (browser) {
    goToUrl({
      suite: suite,
      test: scenarios.SIMPLE_EXAMPLE,
      browser: browser
    }).initAccessibility().waitForElementVisible('body').moveToElement('span', 10, 10).assert.accessibility('html', {});
  });
  it('hover opens the popover', function (browser) {
    goToUrl({
      suite: suite,
      test: scenarios.SIMPLE_EXAMPLE,
      browser: browser
    }).waitForElementVisible('body').moveToElement('span', 10, 10).waitForElementPresent(selectors.tooltip).moveToElement('body', 10, 10).waitForElementNotPresent(selectors.tooltip);
  });
});