@jahia/cypress 3.7.0 → 3.8.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.
@@ -8,5 +8,5 @@ export declare const addNode: (variables: {
8
8
  properties?: any[];
9
9
  children?: any[];
10
10
  }) => Cypress.Chainable;
11
- export declare const getNodeByPath: (path: string, properties?: string[], language?: string) => Cypress.Chainable;
11
+ export declare const getNodeByPath: (path: string, properties?: string[], language?: string, childrenTypes?: string[]) => Cypress.Chainable;
12
12
  export declare const moveNode: (pathOrId: string, destParentPathOrId: string, destName?: string) => Cypress.Chainable;
@@ -45,12 +45,14 @@ var addNode = function (variables) {
45
45
  });
46
46
  };
47
47
  exports.addNode = addNode;
48
- var getNodeByPath = function (path, properties, language) {
48
+ var getNodeByPath = function (path, properties, language, childrenTypes) {
49
+ if (childrenTypes === void 0) { childrenTypes = []; }
49
50
  return cy.apollo({
50
51
  variables: {
51
52
  path: path,
52
53
  properties: properties,
53
- language: language
54
+ language: language,
55
+ childrenTypes: childrenTypes
54
56
  },
55
57
  queryFile: 'graphql/jcr/query/getNodeByPath.graphql'
56
58
  });
@@ -1,15 +1,33 @@
1
- query getNodeByPath($path: String!, $properties: [String]=[], $language: String="") {
1
+ query getNodeByPath($path: String!, $properties: [String]=[], $language: String="", $childrenTypes: [String] = []) {
2
2
  jcr {
3
3
  nodeByPath(path: $path) {
4
4
  uuid
5
5
  name
6
- properties(names: $properties, language: $language){
7
- name
8
- value
6
+ properties(names: $properties, language: $language){
7
+ name
8
+ value
9
+ values
9
10
  }
10
11
  primaryNodeType {
11
12
  name
12
13
  }
14
+ children(typesFilter: { types: $childrenTypes }) {
15
+ nodes {
16
+ name
17
+ children {
18
+ nodes {
19
+ properties {
20
+ name
21
+ value
22
+ values
23
+ }
24
+ primaryNodeType {
25
+ name
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
13
31
  }
14
32
  }
15
- }
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jahia/cypress",
3
- "version": "3.7.0",
3
+ "version": "3.8.0",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "lint": "eslint src -c .eslintrc.json --ext .ts"
@@ -43,12 +43,13 @@ export const addNode = (variables: { parentPathOrId: string, primaryNodeType: st
43
43
  });
44
44
  };
45
45
 
46
- export const getNodeByPath = (path: string, properties?: string[], language?:string): Cypress.Chainable => {
46
+ export const getNodeByPath = (path: string, properties?: string[], language?: string, childrenTypes: string[] = []): Cypress.Chainable => {
47
47
  return cy.apollo({
48
48
  variables: {
49
49
  path: path,
50
50
  properties: properties,
51
- language: language
51
+ language: language,
52
+ childrenTypes: childrenTypes
52
53
  },
53
54
  queryFile: 'graphql/jcr/query/getNodeByPath.graphql'
54
55
  });