@applitools/core
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -34,2 +34,3 @@ "use strict"; | ||
function makeCheck({ type: defaultType, eyes, target: defaultTarget, spec, logger: defaultLogger, }) { | ||
let stepIndex = 0; | ||
return async function check({ type = defaultType, target = defaultTarget, settings, config, logger = defaultLogger, } = {}) { | ||
@@ -57,2 +58,3 @@ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; | ||
} | ||
settings.stepIndex = stepIndex++; | ||
(_q = settings.waitBetweenStitches) !== null && _q !== void 0 ? _q : (settings.waitBetweenStitches = utils.types.isObject(settings.lazyLoad) ? settings.lazyLoad.waitingTime : 100); | ||
@@ -59,0 +61,0 @@ if (settings.matchLevel === 'Content') { |
@@ -29,6 +29,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.formatters = void 0; | ||
exports.formatters = exports.takeDomSnapshots = void 0; | ||
__exportStar(require("./types"), exports); | ||
__exportStar(require("./core"), exports); | ||
var take_dom_snapshots_1 = require("./ufg/utils/take-dom-snapshots"); | ||
Object.defineProperty(exports, "takeDomSnapshots", { enumerable: true, get: function () { return take_dom_snapshots_1.takeDomSnapshots; } }); | ||
exports.formatters = __importStar(require("./utils/format-results")); | ||
__exportStar(require("@applitools/driver/dist/debug"), exports); |
@@ -41,5 +41,6 @@ "use strict"; | ||
}; | ||
const batch = { id: `generated-${utils.general.guid()}` }; | ||
const storage = []; | ||
// open eyes with result storage | ||
const openEyes = utils.general.wrap((0, open_eyes_1.makeOpenEyes)({ type, spec, core, cores, logger }), async (openEyes, options) => { | ||
const openEyes = utils.general.wrap((0, open_eyes_1.makeOpenEyes)({ type, spec, core, cores, logger, batch }), async (openEyes, options) => { | ||
const eyes = await openEyes(options); | ||
@@ -55,2 +56,8 @@ const item = { eyes }; | ||
}, | ||
checkAndClose(options) { | ||
var _a; | ||
const promise = eyes.checkAndClose(options); | ||
(_a = item.promise) !== null && _a !== void 0 ? _a : (item.promise = promise); | ||
return promise; | ||
}, | ||
abort(options) { | ||
@@ -57,0 +64,0 @@ var _a; |
@@ -36,6 +36,6 @@ "use strict"; | ||
const utils = __importStar(require("@applitools/utils")); | ||
function makeOpenEyes({ type: defaultType = 'classic', concurrency, core, cores, spec, logger: defaultLogger, }) { | ||
function makeOpenEyes({ type: defaultType = 'classic', concurrency, core, cores, spec, logger: defaultLogger, batch, }) { | ||
return async function openEyes({ type = defaultType, settings, config, target, logger = defaultLogger, }) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u; | ||
var _v, _w, _x, _y; | ||
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w; | ||
var _x, _y, _z, _0; | ||
settings = { ...config === null || config === void 0 ? void 0 : config.open, ...settings }; | ||
@@ -45,17 +45,21 @@ (_a = settings.userTestId) !== null && _a !== void 0 ? _a : (settings.userTestId = `${settings.testName}--${utils.general.guid()}`); | ||
(_d = settings.apiKey) !== null && _d !== void 0 ? _d : (settings.apiKey = utils.general.getEnvValue('API_KEY')); | ||
(_e = settings.batch) !== null && _e !== void 0 ? _e : (settings.batch = {}); | ||
(_f = (_v = settings.batch).id) !== null && _f !== void 0 ? _f : (_v.id = (_g = utils.general.getEnvValue('BATCH_ID')) !== null && _g !== void 0 ? _g : utils.general.guid()); | ||
(_h = (_w = settings.batch).name) !== null && _h !== void 0 ? _h : (_w.name = utils.general.getEnvValue('BATCH_NAME')); | ||
(_j = (_x = settings.batch).sequenceName) !== null && _j !== void 0 ? _j : (_x.sequenceName = utils.general.getEnvValue('BATCH_SEQUENCE')); | ||
(_k = (_y = settings.batch).notifyOnCompletion) !== null && _k !== void 0 ? _k : (_y.notifyOnCompletion = utils.general.getEnvValue('BATCH_NOTIFY', 'boolean')); | ||
(_l = settings.keepBatchOpen) !== null && _l !== void 0 ? _l : (settings.keepBatchOpen = utils.general.getEnvValue('DONT_CLOSE_BATCHES', 'boolean')); | ||
(_m = settings.branchName) !== null && _m !== void 0 ? _m : (settings.branchName = utils.general.getEnvValue('BRANCH')); | ||
(_o = settings.parentBranchName) !== null && _o !== void 0 ? _o : (settings.parentBranchName = utils.general.getEnvValue('PARENT_BRANCH')); | ||
(_p = settings.baselineBranchName) !== null && _p !== void 0 ? _p : (settings.baselineBranchName = utils.general.getEnvValue('BASELINE_BRANCH')); | ||
(_q = settings.ignoreBaseline) !== null && _q !== void 0 ? _q : (settings.ignoreBaseline = false); | ||
(_r = settings.compareWithParentBranch) !== null && _r !== void 0 ? _r : (settings.compareWithParentBranch = false); | ||
settings.batch = { | ||
...settings.batch, | ||
properties: [...((_e = batch === null || batch === void 0 ? void 0 : batch.properties) !== null && _e !== void 0 ? _e : []), ...((_g = (_f = settings.batch) === null || _f === void 0 ? void 0 : _f.properties) !== null && _g !== void 0 ? _g : [])], | ||
...batch, | ||
}; | ||
(_h = (_x = settings.batch).id) !== null && _h !== void 0 ? _h : (_x.id = (_j = utils.general.getEnvValue('BATCH_ID')) !== null && _j !== void 0 ? _j : `generated-${utils.general.guid()}`); | ||
(_k = (_y = settings.batch).name) !== null && _k !== void 0 ? _k : (_y.name = utils.general.getEnvValue('BATCH_NAME')); | ||
(_l = (_z = settings.batch).sequenceName) !== null && _l !== void 0 ? _l : (_z.sequenceName = utils.general.getEnvValue('BATCH_SEQUENCE')); | ||
(_m = (_0 = settings.batch).notifyOnCompletion) !== null && _m !== void 0 ? _m : (_0.notifyOnCompletion = utils.general.getEnvValue('BATCH_NOTIFY', 'boolean')); | ||
(_o = settings.keepBatchOpen) !== null && _o !== void 0 ? _o : (settings.keepBatchOpen = utils.general.getEnvValue('DONT_CLOSE_BATCHES', 'boolean')); | ||
(_p = settings.branchName) !== null && _p !== void 0 ? _p : (settings.branchName = utils.general.getEnvValue('BRANCH')); | ||
(_q = settings.parentBranchName) !== null && _q !== void 0 ? _q : (settings.parentBranchName = utils.general.getEnvValue('PARENT_BRANCH')); | ||
(_r = settings.baselineBranchName) !== null && _r !== void 0 ? _r : (settings.baselineBranchName = utils.general.getEnvValue('BASELINE_BRANCH')); | ||
(_s = settings.ignoreBaseline) !== null && _s !== void 0 ? _s : (settings.ignoreBaseline = false); | ||
(_t = settings.compareWithParentBranch) !== null && _t !== void 0 ? _t : (settings.compareWithParentBranch = false); | ||
if (type === 'ufg') { | ||
const ufgSettings = settings; | ||
const ufgConfig = config; | ||
(_s = ufgSettings.renderConcurrency) !== null && _s !== void 0 ? _s : (ufgSettings.renderConcurrency = (_u = (_t = ufgConfig === null || ufgConfig === void 0 ? void 0 : ufgConfig.check) === null || _t === void 0 ? void 0 : _t.renderers) === null || _u === void 0 ? void 0 : _u.length); | ||
(_u = ufgSettings.renderConcurrency) !== null && _u !== void 0 ? _u : (ufgSettings.renderConcurrency = (_w = (_v = ufgConfig === null || ufgConfig === void 0 ? void 0 : ufgConfig.check) === null || _v === void 0 ? void 0 : _v.renderers) === null || _w === void 0 ? void 0 : _w.length); | ||
} | ||
@@ -62,0 +66,0 @@ core.logEvent({ |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.makeCheckAndClose = void 0; | ||
function makeCheckAndClose(_options) { | ||
return null; | ||
const driver_1 = require("@applitools/driver"); | ||
const take_snapshots_1 = require("./utils/take-snapshots"); | ||
const wait_for_lazy_load_1 = require("../utils/wait-for-lazy-load"); | ||
const to_base_check_settings_1 = require("../utils/to-base-check-settings"); | ||
const generate_safe_selectors_1 = require("./utils/generate-safe-selectors"); | ||
const abort_error_1 = require("../errors/abort-error"); | ||
const utils = __importStar(require("@applitools/utils")); | ||
const chalk_1 = __importDefault(require("chalk")); | ||
function makeCheckAndClose({ spec, eyes, client, signal, target: defaultTarget, logger: defaultLogger, }) { | ||
return async function checkAndClose({ target = defaultTarget, settings = {}, logger = defaultLogger, snapshots, }) { | ||
var _a, _b; | ||
logger.log('Command "checkAndClose" is called with settings', settings); | ||
if (signal.aborted) { | ||
logger.warn('Command "checkAndClose" was called after test was already aborted'); | ||
throw new abort_error_1.AbortError('Command "checkAndClose" was called after test was already aborted'); | ||
} | ||
const { elementReferencesToCalculate, elementReferenceToTarget, getBaseCheckSettings } = (0, to_base_check_settings_1.toBaseCheckSettings)({ settings }); | ||
let snapshotUrl, snapshotTitle, userAgent, regionToTarget, selectorsToCalculate; | ||
if ((0, driver_1.isDriver)(target, spec)) { | ||
// TODO driver custom config | ||
const driver = await (0, driver_1.makeDriver)({ spec, driver: target, logger }); | ||
if (driver.isWeb && (!settings.renderers || settings.renderers.length === 0)) { | ||
const viewportSize = await driver.getViewportSize(); | ||
settings.renderers = [{ name: 'chrome', ...viewportSize }]; | ||
} | ||
let cleanupGeneratedSelectors; | ||
if (driver.isWeb) { | ||
userAgent = driver.userAgent; | ||
const generated = await (0, generate_safe_selectors_1.generateSafeSelectors)({ | ||
context: driver.currentContext, | ||
elementReferences: [...(elementReferenceToTarget ? [elementReferenceToTarget] : []), ...elementReferencesToCalculate], | ||
}); | ||
cleanupGeneratedSelectors = generated.cleanupGeneratedSelectors; | ||
if (elementReferenceToTarget) { | ||
regionToTarget = (_a = generated.selectors[0]) === null || _a === void 0 ? void 0 : _a.safeSelector; | ||
if (!regionToTarget) | ||
throw new Error('Target element not found'); | ||
selectorsToCalculate = generated.selectors.slice(1); | ||
} | ||
else { | ||
selectorsToCalculate = generated.selectors; | ||
} | ||
} | ||
const currentContext = driver.currentContext; | ||
if (!snapshots) { | ||
snapshots = await (0, take_snapshots_1.takeSnapshots)({ | ||
driver, | ||
settings: { | ||
...eyes.test.server, | ||
waitBeforeCapture: settings.waitBeforeCapture, | ||
disableBrowserFetching: settings.disableBrowserFetching, | ||
layoutBreakpoints: settings.layoutBreakpoints, | ||
renderers: settings.renderers, | ||
skipResources: client.getCachedResourceUrls(), | ||
}, | ||
hooks: { | ||
async beforeSnapshots() { | ||
if (driver.isWeb && settings.lazyLoad) { | ||
await (0, wait_for_lazy_load_1.waitForLazyLoad)({ | ||
context: driver.currentContext, | ||
settings: settings.lazyLoad !== true ? settings.lazyLoad : {}, | ||
logger, | ||
}); | ||
} | ||
}, | ||
}, | ||
provides: { | ||
getChromeEmulationDevices: client.getChromeEmulationDevices, | ||
getIOSDevices: client.getIOSDevices, | ||
}, | ||
logger, | ||
}); | ||
} | ||
await currentContext.focus(); | ||
snapshotUrl = await driver.getUrl(); | ||
snapshotTitle = await driver.getTitle(); | ||
await (cleanupGeneratedSelectors === null || cleanupGeneratedSelectors === void 0 ? void 0 : cleanupGeneratedSelectors()); | ||
} | ||
else { | ||
snapshots = !utils.types.isArray(target) ? Array(settings.renderers.length).fill(target) : target; | ||
snapshotUrl = utils.types.has(snapshots[0], 'url') ? snapshots[0].url : undefined; | ||
} | ||
regionToTarget !== null && regionToTarget !== void 0 ? regionToTarget : (regionToTarget = (_b = elementReferenceToTarget) !== null && _b !== void 0 ? _b : settings.region); | ||
selectorsToCalculate !== null && selectorsToCalculate !== void 0 ? selectorsToCalculate : (selectorsToCalculate = elementReferencesToCalculate.map(selector => ({ | ||
originalSelector: selector, | ||
safeSelector: selector, | ||
}))); | ||
const promises = settings.renderers.map(async (renderer, index) => { | ||
if (utils.types.has(renderer, 'name') && renderer.name === 'edge') { | ||
const message = chalk_1.default.yellow(`The 'edge' option that is being used in your browsers' configuration will soon be deprecated. Please change it to either 'edgelegacy' for the legacy version or to 'edgechromium' for the new Chromium-based version. Please note, when using the built-in BrowserType enum, then the values are BrowserType.EDGE_LEGACY and BrowserType.EDGE_CHROMIUM, respectively.`); | ||
logger.console.log(message); | ||
} | ||
try { | ||
if (signal.aborted) { | ||
logger.warn('Command "check" was aborted before rendering'); | ||
throw new abort_error_1.AbortError('Command "check" was aborted before rendering'); | ||
} | ||
const { cookies, ...snapshot } = snapshots[index]; | ||
const snapshotType = utils.types.has(snapshot, 'cdt') ? 'web' : 'native'; | ||
const renderTargetPromise = client.createRenderTarget({ | ||
snapshot, | ||
settings: { | ||
renderer, | ||
referer: snapshotUrl, | ||
cookies, | ||
proxy: eyes.test.server.proxy, | ||
autProxy: settings.autProxy, | ||
userAgent, | ||
}, | ||
}); | ||
const [baseEyes] = await eyes.getBaseEyes({ settings: { renderer, type: snapshotType }, logger }); | ||
try { | ||
if (signal.aborted) { | ||
logger.warn('Command "check" was aborted before rendering'); | ||
throw new abort_error_1.AbortError('Command "check" was aborted before rendering'); | ||
} | ||
else if (baseEyes.aborted) { | ||
logger.warn(`Renderer with id ${baseEyes.test.rendererId} was aborted during one of the previous steps`); | ||
throw new abort_error_1.AbortError(`Renderer with id "${baseEyes.test.rendererId}" was aborted during one of the previous steps`); | ||
} | ||
const renderTarget = await renderTargetPromise; | ||
if (signal.aborted) { | ||
logger.warn('Command "check" was aborted before rendering'); | ||
throw new abort_error_1.AbortError('Command "check" was aborted before rendering'); | ||
} | ||
else if (baseEyes.aborted) { | ||
logger.warn(`Renderer with id ${baseEyes.test.rendererId} was aborted during one of the previous steps`); | ||
throw new abort_error_1.AbortError(`Renderer with id "${baseEyes.test.rendererId}" was aborted during one of the previous steps`); | ||
} | ||
const { renderId, selectorRegions, ...baseTarget } = await client.render({ | ||
target: renderTarget, | ||
settings: { | ||
...settings, | ||
rendererId: baseEyes.test.rendererId, | ||
region: regionToTarget, | ||
type: utils.types.has(snapshot, 'cdt') ? 'web' : 'native', | ||
renderer, | ||
selectorsToCalculate: selectorsToCalculate.flatMap(({ safeSelector }) => safeSelector !== null && safeSelector !== void 0 ? safeSelector : []), | ||
includeFullPageSize: Boolean(settings.pageId), | ||
}, | ||
signal, | ||
}); | ||
let offset = 0; | ||
const baseSettings = getBaseCheckSettings({ | ||
calculatedRegions: selectorsToCalculate.map(({ originalSelector, safeSelector }) => ({ | ||
selector: originalSelector, | ||
regions: safeSelector ? selectorRegions[offset++] : [], | ||
})), | ||
}); | ||
baseSettings.renderId = renderId; | ||
baseTarget.source = snapshotUrl; | ||
baseTarget.name = snapshotTitle; | ||
if (signal.aborted) { | ||
logger.warn('Command "check" was aborted after rendering'); | ||
throw new abort_error_1.AbortError('Command "check" was aborted after rendering'); | ||
} | ||
else if (baseEyes.aborted) { | ||
logger.warn(`Renderer with id ${baseEyes.test.rendererId} was aborted during one of the previous steps`); | ||
throw new abort_error_1.AbortError(`Renderer with id "${baseEyes.test.rendererId}" was aborted during one of the previous steps`); | ||
} | ||
const [result] = await baseEyes.checkAndClose({ | ||
target: { ...baseTarget, isTransformed: true }, | ||
settings: baseSettings, | ||
logger, | ||
}); | ||
if (baseEyes.aborted) { | ||
logger.warn(`Renderer with id ${baseEyes.test.rendererId} was aborted during one of the previous steps`); | ||
throw new abort_error_1.AbortError(`Renderer with id "${baseEyes.test.rendererId}" was aborted during one of the previous steps`); | ||
} | ||
return { ...result, eyes, renderer }; | ||
} | ||
catch (error) { | ||
await baseEyes.abort(); | ||
error.info = { eyes: baseEyes }; | ||
throw error; | ||
} | ||
} | ||
catch (error) { | ||
error.info = { ...error.info, userTestId: eyes.test.userTestId, renderer }; | ||
throw error; | ||
} | ||
}); | ||
return Promise.all(promises.map(async (promise) => { | ||
var _a, _b; | ||
try { | ||
const result = await promise; | ||
return { ...result, userTestId: eyes.test.userTestId, asExpected: true }; | ||
} | ||
catch (error) { | ||
await ((_b = (_a = error.info) === null || _a === void 0 ? void 0 : _a.eyes) === null || _b === void 0 ? void 0 : _b.abort({ logger })); | ||
throw error; | ||
} | ||
})); | ||
}; | ||
} | ||
exports.makeCheckAndClose = makeCheckAndClose; |
@@ -56,2 +56,4 @@ "use strict"; | ||
abort: utils.general.wrap(eyes.abort, (abort, options) => abort(options).finally(done)), | ||
// release concurrency slot when checkAndClose is done | ||
checkAndClose: utils.general.wrap(eyes.checkAndClose, (checkAndClose, options) => checkAndClose(options).finally(done)), | ||
})); | ||
@@ -58,0 +60,0 @@ } |
@@ -59,3 +59,2 @@ "use strict"; | ||
const storage = []; | ||
let stepIndex = 0; | ||
let closed = false; | ||
@@ -84,3 +83,3 @@ let aborted = false; | ||
check: utils.general.wrap((0, check_1.makeCheck)({ eyes, client, target: driver, spec, signal: controller.signal, logger }), async (check, options = {}) => { | ||
const results = await check({ ...options, settings: { ...options.settings, stepIndex: stepIndex++ } }); | ||
const results = await check(options); | ||
storage.push(...results.map(result => ({ promise: result.promise, renderer: result.renderer }))); | ||
@@ -87,0 +86,0 @@ return results; |
@@ -40,2 +40,10 @@ "use strict"; | ||
const currentContext = driver.currentContext; | ||
const waitBeforeCapture = async () => { | ||
if (typeof settings.waitBeforeCapture === 'function') { | ||
await settings.waitBeforeCapture(); | ||
} | ||
else { | ||
await utils.general.sleep(settings.waitBeforeCapture); | ||
} | ||
}; | ||
await ((_a = hooks === null || hooks === void 0 ? void 0 : hooks.beforeSnapshots) === null || _a === void 0 ? void 0 : _a.call(hooks)); | ||
@@ -45,3 +53,3 @@ if (!settings.layoutBreakpoints) { | ||
await ((_b = hooks === null || hooks === void 0 ? void 0 : hooks.beforeEachSnapshot) === null || _b === void 0 ? void 0 : _b.call(hooks)); | ||
await utils.general.sleep(settings.waitBeforeCapture); | ||
await waitBeforeCapture(); | ||
const snapshot = await (0, take_dom_snapshot_1.takeDomSnapshot)({ context: currentContext, settings, logger }); | ||
@@ -79,3 +87,3 @@ return Array(settings.renderers.length).fill(snapshot); | ||
await ((_c = hooks === null || hooks === void 0 ? void 0 : hooks.beforeEachSnapshot) === null || _c === void 0 ? void 0 : _c.call(hooks)); | ||
await utils.general.sleep(settings.waitBeforeCapture); | ||
await waitBeforeCapture(); | ||
const snapshot = await (0, take_dom_snapshot_1.takeDomSnapshot)({ context: currentContext, settings, logger }); | ||
@@ -106,3 +114,3 @@ requiredWidths.get(viewportSize.width).forEach(({ index }) => (snapshots[index] = snapshot)); | ||
await ((_d = hooks === null || hooks === void 0 ? void 0 : hooks.beforeEachSnapshot) === null || _d === void 0 ? void 0 : _d.call(hooks)); | ||
await utils.general.sleep(settings.waitBeforeCapture); | ||
await waitBeforeCapture(); | ||
const snapshot = await (0, take_dom_snapshot_1.takeDomSnapshot)({ context: currentContext, settings, logger }); | ||
@@ -109,0 +117,0 @@ browsersInfo.forEach(({ index }) => (snapshots[index] = snapshot)); |
{ | ||
"name": "@applitools/core", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"homepage": "https://applitools.com", | ||
@@ -64,3 +64,3 @@ "bugs": { | ||
"dependencies": { | ||
"@applitools/core-base": "1.1.17", | ||
"@applitools/core-base": "1.1.18", | ||
"@applitools/dom-capture": "11.2.0", | ||
@@ -70,5 +70,5 @@ "@applitools/dom-snapshot": "4.7.2", | ||
"@applitools/logger": "1.1.32", | ||
"@applitools/nml-client": "1.3.14", | ||
"@applitools/nml-client": "1.3.15", | ||
"@applitools/req": "1.1.19", | ||
"@applitools/screenshoter": "3.7.13", | ||
"@applitools/screenshoter": "3.7.14", | ||
"@applitools/snippets": "2.4.10", | ||
@@ -75,0 +75,0 @@ "@applitools/ufg-client": "1.1.8", |
export * from './types'; | ||
export { type Selector } from '@applitools/driver'; | ||
export * from './core'; | ||
export { takeDomSnapshots } from './ufg/utils/take-dom-snapshots'; | ||
export * as formatters from './utils/format-results'; | ||
export * from '@applitools/driver/dist/debug'; |
import type { TypedCore, Eyes, Config, OpenSettings } from './types'; | ||
import type { Core as BaseCore } from '@applitools/core-base'; | ||
import type { Core as BaseCore, Batch } from '@applitools/core-base'; | ||
import { type Logger } from '@applitools/logger'; | ||
@@ -14,4 +14,5 @@ import { type SpecDriver } from '@applitools/driver'; | ||
logger?: Logger; | ||
batch?: Batch; | ||
}; | ||
export declare function makeOpenEyes<TDriver, TContext, TElement, TSelector, TDefaultType extends 'classic' | 'ufg' = 'classic'>({ type: defaultType, concurrency, core, cores, spec, logger: defaultLogger, }: Options<TDriver, TContext, TElement, TSelector, TDefaultType>): <TType extends "classic" | "ufg" = TDefaultType>({ type, settings, config, target, logger, }: { | ||
export declare function makeOpenEyes<TDriver, TContext, TElement, TSelector, TDefaultType extends 'classic' | 'ufg' = 'classic'>({ type: defaultType, concurrency, core, cores, spec, logger: defaultLogger, batch, }: Options<TDriver, TContext, TElement, TSelector, TDefaultType>): <TType extends "classic" | "ufg" = TDefaultType>({ type, settings, config, target, logger, }: { | ||
type?: TType; | ||
@@ -18,0 +19,0 @@ settings?: Partial<OpenSettings<TDefaultType> & OpenSettings<TType>>; |
@@ -1,6 +0,7 @@ | ||
import type { DriverTarget, Eyes } from './types'; | ||
import type { DriverTarget, UFGTarget, Eyes, CheckSettings, TestResult, CloseSettings } from './types'; | ||
import { type DomSnapshot, type AndroidSnapshot, type IOSSnapshot } from '@applitools/ufg-client'; | ||
import { type AbortSignal } from 'abort-controller'; | ||
import { type Logger } from '@applitools/logger'; | ||
import { type UFGClient } from '@applitools/ufg-client'; | ||
import { type SpecDriver } from '@applitools/driver'; | ||
import { type UFGClient } from '@applitools/ufg-client'; | ||
type Options<TDriver, TContext, TElement, TSelector> = { | ||
@@ -14,3 +15,8 @@ eyes: Eyes<TDriver, TContext, TElement, TSelector>; | ||
}; | ||
export declare function makeCheckAndClose<TDriver, TContext, TElement, TSelector>(_options: Options<TDriver, TContext, TElement, TSelector>): any; | ||
export declare function makeCheckAndClose<TDriver, TContext, TElement, TSelector>({ spec, eyes, client, signal, target: defaultTarget, logger: defaultLogger, }: Options<TDriver, TContext, TElement, TSelector>): ({ target, settings, logger, snapshots, }: { | ||
target?: UFGTarget<TDriver, TContext, TElement, TSelector>; | ||
settings?: CheckSettings<TElement, TSelector> & CloseSettings; | ||
logger?: Logger; | ||
snapshots?: DomSnapshot[] | AndroidSnapshot[] | IOSSnapshot[]; | ||
}) => Promise<TestResult[]>; | ||
export {}; |
@@ -9,3 +9,3 @@ import type { Size } from '@applitools/utils'; | ||
renderers: Renderer[]; | ||
waitBeforeCapture?: number; | ||
waitBeforeCapture?: number | (() => void); | ||
layoutBreakpoints?: number[] | boolean; | ||
@@ -12,0 +12,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
248929
4660
+ Added@applitools/core-base@1.1.18(transitive)
+ Added@applitools/nml-client@1.3.15(transitive)
+ Added@applitools/screenshoter@3.7.14(transitive)
- Removed@applitools/core-base@1.1.17(transitive)
- Removed@applitools/nml-client@1.3.14(transitive)
- Removed@applitools/screenshoter@3.7.13(transitive)
Updated@applitools/core-base@1.1.18