wix-style-react
Version:
wix-style-react
66 lines (56 loc) • 2.38 kB
JavaScript
var _this = this;
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
import eyes from 'eyes.it';
import { createStoryUrl } from '../../test/utils/storybook-helpers';
import { getTestStoryKind, Category } from '../../stories/storiesHierarchy';
import { ExpectedConditions } from 'protractor';
describe('Typography', function () {
var kind = getTestStoryKind({
category: Category.FOUNDATION,
storyName: '1.2 Typography'
});
eyes.it('should render all Text variations', _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
var storyUrl;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
storyUrl = createStoryUrl({
kind: kind,
story: '1. Typography with Classes - Text'
});
_context.next = 3;
return browser.get(storyUrl);
case 3:
_context.next = 5;
return browser.wait(ExpectedConditions.visibilityOf($('table')));
case 5:
case 'end':
return _context.stop();
}
}
}, _callee, _this);
})));
eyes.it('should render all Heading variations', _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
var storyUrl;
return regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
storyUrl = createStoryUrl({
kind: kind,
story: '2. Typography with Classes - Heading'
});
_context2.next = 3;
return browser.get(storyUrl);
case 3:
_context2.next = 5;
return browser.wait(ExpectedConditions.visibilityOf($('table')));
case 5:
case 'end':
return _context2.stop();
}
}
}, _callee2, _this);
})));
});