@jahia/cypress 3.6.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.
@@ -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;
@@ -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;
@@ -0,0 +1,7 @@
1
+ mutation($pathOrId: String!, $destParentPathOrId: String!, $destName: String){
2
+ jcr{
3
+ moveNode(pathOrId: $pathOrId, destParentPathOrId: $destParentPathOrId, destName: $destName){
4
+ uuid
5
+ }
6
+ }
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jahia/cypress",
3
- "version": "3.6.0",
3
+ "version": "3.7.0",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "lint": "eslint src -c .eslintrc.json --ext .ts"
@@ -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
+ };