UNPKG

@progress/kendo-angular-e2e

Version:

Helper package for Kendo UI for Angular e2e tests

29 lines (28 loc) 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getA11ySpecViolations = exports.getDescartesProduct = exports.getDecartProduct = exports.getCartesianProduct = exports.DELAYS = void 0; const tslib_1 = require("tslib"); const kendo_e2e_1 = require("@progress/kendo-e2e"); const wctSpec = tslib_1.__importStar(require("@progress/wct-a11y-spec/dist/angular/test-def/test-definitions.json")); exports.DELAYS = { SMALL: 50, SM: 50, MD: 100, LG: 200 }; exports.getCartesianProduct = (arr) => { return arr.reduce((a, b) => { return a.map(function (x) { return b.map(function (y) { return x.concat(y); }); }).reduce((c, d) => c.concat(d), []); }, [[]]); }; exports.getDecartProduct = exports.getCartesianProduct; exports.getDescartesProduct = exports.getCartesianProduct; exports.getA11ySpecViolations = (driver, excludeErrors = [], spec = undefined) => tslib_1.__awaiter(void 0, void 0, void 0, function* () { spec = spec || wctSpec; const result = yield kendo_e2e_1.getWCTSpecViolations(driver, spec, excludeErrors); return result.errors; });