@applitools/driver 1.13.6 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/context.js +3 -2
- package/dist/fake/index.js +2 -1
- package/package.json +3 -3
- package/types/fake/index.d.ts +6 -2
- package/types/spec-driver.d.ts +1 -1
- package/types/types.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.14.0](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.13.6...js/driver@1.14.0) (2023-09-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update testcafe ([#1884](https://github.com/applitools/eyes.sdk.javascript1/issues/1884)) ([104f1b6](https://github.com/applitools/eyes.sdk.javascript1/commit/104f1b6cc0d4f107ba46404383de2fa11fe99dcf))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* @applitools/utils bumped to 1.6.0
|
|
14
|
+
#### Features
|
|
15
|
+
|
|
16
|
+
* add support for fallback in `req` ([#1899](https://github.com/applitools/eyes.sdk.javascript1/issues/1899)) ([d69c4b5](https://github.com/applitools/eyes.sdk.javascript1/commit/d69c4b5830370c471dfc25b6e2caddca8b458df9))
|
|
17
|
+
* @applitools/logger bumped to 2.0.10
|
|
18
|
+
|
|
19
|
+
|
|
3
20
|
## [1.13.6](https://github.com/applitools/eyes.sdk.javascript1/compare/js/driver@1.13.5...js/driver@1.13.6) (2023-08-30)
|
|
4
21
|
|
|
5
22
|
|
package/dist/context.js
CHANGED
|
@@ -133,15 +133,16 @@ class Context {
|
|
|
133
133
|
elements = [element];
|
|
134
134
|
}
|
|
135
135
|
if ((0, selector_1.isComplexSelector)(selector, this._spec)) {
|
|
136
|
+
const features = await this.driver.getFeatures();
|
|
136
137
|
if (elements.length > 0) {
|
|
137
|
-
if (selector.child) {
|
|
138
|
+
if (selector.child && !features.nestedSelectors) {
|
|
138
139
|
elements = await elements.reduce((result, element) => {
|
|
139
140
|
return result.then(async (result) => {
|
|
140
141
|
return result.concat(await this._findElements(selector.child, { parent: element, all, wait }));
|
|
141
142
|
});
|
|
142
143
|
}, Promise.resolve([]));
|
|
143
144
|
}
|
|
144
|
-
else if (selector.shadow) {
|
|
145
|
+
else if (selector.shadow && !features.nestedSelectors) {
|
|
145
146
|
elements = await elements.reduce((result, element) => {
|
|
146
147
|
return result.then(async (result) => {
|
|
147
148
|
const root = await this._spec.executeScript(this.target, snippets.getShadowRoot, [element]);
|
package/dist/fake/index.js
CHANGED
|
@@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.spec = exports.MockDriver = void 0;
|
|
27
|
+
const fakeSpec = __importStar(require("./spec-driver"));
|
|
27
28
|
var mock_driver_1 = require("./mock-driver");
|
|
28
29
|
Object.defineProperty(exports, "MockDriver", { enumerable: true, get: function () { return mock_driver_1.MockDriver; } });
|
|
29
|
-
exports.spec =
|
|
30
|
+
exports.spec = fakeSpec;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applitools/driver",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Applitools universal framework wrapper",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"applitools",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"test": "run --top-level mocha './test/**/*.spec.ts'"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@applitools/logger": "2.0.
|
|
76
|
+
"@applitools/logger": "2.0.10",
|
|
77
77
|
"@applitools/snippets": "2.4.23",
|
|
78
|
-
"@applitools/utils": "1.
|
|
78
|
+
"@applitools/utils": "1.6.0",
|
|
79
79
|
"semver": "7.5.4"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
package/types/fake/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { type SpecDriver, type SpecType } from '../spec-driver';
|
|
2
|
+
import * as fakeSpec from './spec-driver';
|
|
1
3
|
export { MockDriver } from './mock-driver';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
+
export type Driver = fakeSpec.Driver;
|
|
5
|
+
export type Element = fakeSpec.Element;
|
|
6
|
+
export type Selector = fakeSpec.Selector;
|
|
7
|
+
export declare const spec: SpecDriver<SpecType<Driver, Driver, Element, Selector>>;
|
package/types/spec-driver.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export interface SpecDriver<T extends SpecType> {
|
|
|
51
51
|
/**
|
|
52
52
|
* Assures that the error is a stale element error.
|
|
53
53
|
*/
|
|
54
|
-
isStaleElementError(error: any, selector?: T['selector']): boolean;
|
|
54
|
+
isStaleElementError?(error: any, selector?: T['selector']): boolean;
|
|
55
55
|
/**
|
|
56
56
|
* Converts the given driver to a speced driver.
|
|
57
57
|
* (applicable in cases when spec has certain variations or sub-types of the driver.)
|