@atomic-testing/core
Advanced tools
Comparing version 0.39.0 to 0.40.0
@@ -6,2 +6,5 @@ import { Optional } from '../dataTypes'; | ||
import { WaitForOption } from './WaitForOption'; | ||
/** | ||
* Base class for all component drivers. It provides the basic functionality to interact with the component | ||
*/ | ||
export declare abstract class ComponentDriver<T extends ScenePart = {}> implements IComponentDriver<T> { | ||
@@ -8,0 +11,0 @@ readonly interactor: Interactor; |
@@ -41,2 +41,5 @@ "use strict"; | ||
const WaitForOption_1 = require("./WaitForOption"); | ||
/** | ||
* Base class for all component drivers. It provides the basic functionality to interact with the component | ||
*/ | ||
class ComponentDriver { | ||
@@ -43,0 +46,0 @@ constructor(locator, interactor, option) { |
@@ -84,15 +84,10 @@ "use strict"; | ||
// @ts-ignore | ||
for (var _d = true, _e = __asyncValues(listHelper.getListItemIterator(this, this._itemLocator, driverClass)), _f; _f = yield _e.next(), _a = _f.done, !_a;) { | ||
for (var _d = true, _e = __asyncValues(listHelper.getListItemIterator(this, this._itemLocator, driverClass)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { | ||
_c = _f.value; | ||
_d = false; | ||
try { | ||
const item = _c; | ||
const itemText = yield item.getText(); | ||
if ((itemText === null || itemText === void 0 ? void 0 : itemText.trim()) === text) { | ||
return item; | ||
} | ||
const item = _c; | ||
const itemText = yield item.getText(); | ||
if ((itemText === null || itemText === void 0 ? void 0 : itemText.trim()) === text) { | ||
return item; | ||
} | ||
finally { | ||
_d = true; | ||
} | ||
} | ||
@@ -122,12 +117,7 @@ } | ||
// @ts-ignore | ||
for (var _d = true, _e = __asyncValues(listHelper.getListItemIterator(this, this._itemLocator, driverClass)), _f; _f = yield _e.next(), _a = _f.done, !_a;) { | ||
for (var _d = true, _e = __asyncValues(listHelper.getListItemIterator(this, this._itemLocator, driverClass)), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { | ||
_c = _f.value; | ||
_d = false; | ||
try { | ||
const item = _c; | ||
result.push(item); | ||
} | ||
finally { | ||
_d = true; | ||
} | ||
const item = _c; | ||
result.push(item); | ||
} | ||
@@ -134,0 +124,0 @@ } |
@@ -15,4 +15,5 @@ "use strict"; | ||
var g = generator.apply(thisArg, _arguments || []), i, q = []; | ||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; | ||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } | ||
return i = {}, verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i; | ||
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; } | ||
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } } | ||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } | ||
@@ -19,0 +20,0 @@ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } |
@@ -16,3 +16,3 @@ "use strict"; | ||
LocatorRelativePosition["Same"] = "Same"; | ||
})(LocatorRelativePosition = exports.LocatorRelativePosition || (exports.LocatorRelativePosition = {})); | ||
})(LocatorRelativePosition || (exports.LocatorRelativePosition = LocatorRelativePosition = {})); | ||
//# sourceMappingURL=LocatorRelativePosition.js.map |
export declare function escapeName(name: string): string; | ||
/** | ||
* Escaping based on the CSS spec: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier | ||
* Backslashes, spaces, and non-identifier characters (e.g., ! " # $ % & ' ( ) * + , . / : ; < = > ? @ [ ] ^ ` { | } ~) are escaped. | ||
* @param value | ||
@@ -6,0 +5,0 @@ * @returns |
@@ -44,3 +44,2 @@ "use strict"; | ||
* Escaping based on the CSS spec: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier | ||
* Backslashes, spaces, and non-identifier characters (e.g., ! " # $ % & ' ( ) * + , . / : ; < = > ? @ [ ] ^ ` { | } ~) are escaped. | ||
* @param value | ||
@@ -50,2 +49,3 @@ * @returns | ||
function escapeValue(value) { | ||
// Backslashes, spaces, and non-identifier characters (e.g., ! " # $ % & ' ( ) * + , . / : ; < = > ? @ [ ] ^ ` { | } ~) are escaped. | ||
if (escapeCache.has(value)) { | ||
@@ -52,0 +52,0 @@ return escapeCache.get(value); |
{ | ||
"name": "@atomic-testing/core", | ||
"version": "0.39.0", | ||
"version": "0.40.0", | ||
"description": "Core library for atomic-testing", | ||
@@ -15,10 +15,11 @@ "main": "dist/index.js", | ||
"type": "git", | ||
"url": "https://github.com/atomic-testing/atomic-testing.git" | ||
"url": "https://github.com/atomic-testing/atomic-testing.git", | ||
"directory": "packages/core" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^16.0.0", | ||
"@types/node": "^20.10.5", | ||
"jest": "^29.7.0", | ||
"ts-jest": "^29.0.5", | ||
"ts-node": "^10.9.0", | ||
"typescript": "^5.2.2" | ||
"typescript": "^5.3.3" | ||
}, | ||
@@ -25,0 +26,0 @@ "dependencies": {}, |
@@ -21,2 +21,5 @@ import { Optional } from '../dataTypes'; | ||
/** | ||
* Base class for all component drivers. It provides the basic functionality to interact with the component | ||
*/ | ||
export abstract class ComponentDriver<T extends ScenePart = {}> implements IComponentDriver<T> { | ||
@@ -23,0 +26,0 @@ private _locator: PartLocator; |
@@ -43,3 +43,2 @@ const cssEscapes = new Map([ | ||
* Escaping based on the CSS spec: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier | ||
* Backslashes, spaces, and non-identifier characters (e.g., ! " # $ % & ' ( ) * + , . / : ; < = > ? @ [ ] ^ ` { | } ~) are escaped. | ||
* @param value | ||
@@ -49,2 +48,3 @@ * @returns | ||
export function escapeValue(value: string): string { | ||
// Backslashes, spaces, and non-identifier characters (e.g., ! " # $ % & ' ( ) * + , . / : ; < = > ? @ [ ] ^ ` { | } ~) are escaped. | ||
if (escapeCache.has(value)) { | ||
@@ -51,0 +51,0 @@ return escapeCache.get(value); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
201332
3953