@jahia/cypress 3.5.0 → 3.7.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/dist/support/fixture.js
CHANGED
|
@@ -25,7 +25,7 @@ var fixture = function (originalCommand, fixtureParam) {
|
|
|
25
25
|
encoding = args[0];
|
|
26
26
|
}
|
|
27
27
|
try {
|
|
28
|
-
cy.readFile('./node_modules/@jahia/cypress/fixtures/' + fixtureParam, encoding, { log: false, timeout:
|
|
28
|
+
cy.readFile('./node_modules/@jahia/cypress/fixtures/' + fixtureParam, encoding, { log: false, timeout: 500 });
|
|
29
29
|
}
|
|
30
30
|
catch (e) {
|
|
31
31
|
console.log(e);
|
|
@@ -9,3 +9,4 @@ export declare const addNode: (variables: {
|
|
|
9
9
|
children?: any[];
|
|
10
10
|
}) => Cypress.Chainable;
|
|
11
11
|
export declare const getNodeByPath: (path: string, properties?: string[], language?: string) => Cypress.Chainable;
|
|
12
|
+
export declare const moveNode: (pathOrId: string, destParentPathOrId: string, destName?: string) => Cypress.Chainable;
|
package/dist/utils/JCRHelper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
|
-
exports.getNodeByPath = exports.addNode = exports.deleteNodeProperty = exports.deleteNode = exports.setNodeProperty = void 0;
|
|
3
|
+
exports.moveNode = exports.getNodeByPath = exports.addNode = exports.deleteNodeProperty = exports.deleteNode = exports.setNodeProperty = void 0;
|
|
4
4
|
var setNodeProperty = function (pathOrId, property, value, language) {
|
|
5
5
|
var mutationFile = 'graphql/jcr/mutation/setProperty.graphql';
|
|
6
6
|
if (value instanceof Array) {
|
|
@@ -56,3 +56,14 @@ var getNodeByPath = function (path, properties, language) {
|
|
|
56
56
|
});
|
|
57
57
|
};
|
|
58
58
|
exports.getNodeByPath = getNodeByPath;
|
|
59
|
+
var moveNode = function (pathOrId, destParentPathOrId, destName) {
|
|
60
|
+
return cy.apollo({
|
|
61
|
+
variables: {
|
|
62
|
+
pathOrId: pathOrId,
|
|
63
|
+
destParentPathOrId: destParentPathOrId,
|
|
64
|
+
destName: destName
|
|
65
|
+
},
|
|
66
|
+
mutationFile: 'graphql/jcr/mutation/moveNode.graphql'
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
exports.moveNode = moveNode;
|
package/package.json
CHANGED
package/src/support/fixture.ts
CHANGED
|
@@ -16,7 +16,7 @@ export const fixture = function (originalCommand: ((...args: any[]) => any), fix
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
try {
|
|
19
|
-
cy.readFile('./node_modules/@jahia/cypress/fixtures/' + fixtureParam, encoding, {log: false, timeout:
|
|
19
|
+
cy.readFile('./node_modules/@jahia/cypress/fixtures/' + fixtureParam, encoding, {log: false, timeout: 500});
|
|
20
20
|
} catch (e) {
|
|
21
21
|
console.log(e);
|
|
22
22
|
}
|
package/src/utils/JCRHelper.ts
CHANGED
|
@@ -53,3 +53,14 @@ export const getNodeByPath = (path: string, properties?: string[], language?:str
|
|
|
53
53
|
queryFile: 'graphql/jcr/query/getNodeByPath.graphql'
|
|
54
54
|
});
|
|
55
55
|
};
|
|
56
|
+
|
|
57
|
+
export const moveNode = (pathOrId: string, destParentPathOrId: string, destName?: string): Cypress.Chainable => {
|
|
58
|
+
return cy.apollo({
|
|
59
|
+
variables: {
|
|
60
|
+
pathOrId: pathOrId,
|
|
61
|
+
destParentPathOrId: destParentPathOrId,
|
|
62
|
+
destName: destName
|
|
63
|
+
},
|
|
64
|
+
mutationFile: 'graphql/jcr/mutation/moveNode.graphql'
|
|
65
|
+
});
|
|
66
|
+
};
|