detox-allure2-adapter
Version:
Detox adapter for jest-allure2-reporter
43 lines • 1.62 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EspressoDetox = void 0;
const utils_1 = require("../../utils");
class EspressoDetox {
static getViewMatcher(matcher) {
return matcher;
}
static getViewInteraction(matcher) {
return matcher;
}
static perform(viewInteraction, viewAction) {
return viewAction && viewInteraction ? viewAction.format(viewInteraction) : null;
}
static check(viewInteraction, viewAssertion) {
return viewAssertion && viewInteraction ? viewAssertion.format?.(viewInteraction) : null;
}
static performAction(element, action) {
return action && element ? action.format?.(element) : null;
}
static changeOrientation(orientation) {
return (0, utils_1.msg)(`Change orientation to ${orientation}`, { orientation });
}
static setSynchronization(enabled) {
return (0, utils_1.msg)(`Set synchronization ${enabled ? 'enabled' : 'disabled'}`, { enabled });
}
static setURLBlacklist(urls) {
return (0, utils_1.msg)('Set URL blacklist', { urls });
}
static tap(x, y, shouldIgnoreStatusBar) {
return (0, utils_1.msg)(`Tap at (${x}, ${y})`, { x, y, ignore_status_bar: shouldIgnoreStatusBar });
}
static longPress(x, y, shouldIgnoreStatusBar, duration) {
return (0, utils_1.msg)(`Long press at (${x}, ${y})`, {
x,
y,
ignore_status_bar: shouldIgnoreStatusBar,
duration,
});
}
}
exports.EspressoDetox = EspressoDetox;
//# sourceMappingURL=EspressoDetox.js.map