@jahia/cypress 3.9.0 → 3.10.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,6 +8,6 @@ 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, childrenTypes?: string[]) => Cypress.Chainable;
11
+ export declare const getNodeByPath: (path: string, properties?: string[], language?: string, childrenTypes?: string[], workspace?: 'EDIT' | 'LIVE') => Cypress.Chainable;
12
12
  export declare const getNodeAcl: (path: string) => Cypress.Chainable;
13
13
  export declare const moveNode: (pathOrId: string, destParentPathOrId: string, destName?: string) => Cypress.Chainable;
@@ -45,14 +45,16 @@ var addNode = function (variables) {
45
45
  });
46
46
  };
47
47
  exports.addNode = addNode;
48
- var getNodeByPath = function (path, properties, language, childrenTypes) {
48
+ var getNodeByPath = function (path, properties, language, childrenTypes, workspace) {
49
49
  if (childrenTypes === void 0) { childrenTypes = []; }
50
+ if (workspace === void 0) { workspace = 'EDIT'; }
50
51
  return cy.apollo({
51
52
  variables: {
52
53
  path: path,
53
54
  properties: properties,
54
55
  language: language,
55
- childrenTypes: childrenTypes
56
+ childrenTypes: childrenTypes,
57
+ workspace: workspace
56
58
  },
57
59
  queryFile: 'graphql/jcr/query/getNodeByPath.graphql'
58
60
  });
@@ -1,5 +1,5 @@
1
- query getNodeByPath($path: String!, $properties: [String]=[], $language: String="", $childrenTypes: [String] = []) {
2
- jcr {
1
+ query getNodeByPath($path: String!, $properties: [String]=[], $language: String="", $childrenTypes: [String] = [], $workspace: Workspace = EDIT ) {
2
+ jcr (workspace: $workspace){
3
3
  nodeByPath(path: $path) {
4
4
  uuid
5
5
  name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jahia/cypress",
3
- "version": "3.9.0",
3
+ "version": "3.10.0",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "lint": "eslint src -c .eslintrc.json --ext .ts"
@@ -43,13 +43,14 @@ export const addNode = (variables: { parentPathOrId: string, primaryNodeType: st
43
43
  });
44
44
  };
45
45
 
46
- export const getNodeByPath = (path: string, properties?: string[], language?: string, childrenTypes: string[] = []): Cypress.Chainable => {
46
+ export const getNodeByPath = (path: string, properties?: string[], language?: string, childrenTypes: string[] = [], workspace: 'EDIT' | 'LIVE' = 'EDIT'): Cypress.Chainable => {
47
47
  return cy.apollo({
48
48
  variables: {
49
49
  path: path,
50
50
  properties: properties,
51
51
  language: language,
52
- childrenTypes: childrenTypes
52
+ childrenTypes: childrenTypes,
53
+ workspace: workspace
53
54
  },
54
55
  queryFile: 'graphql/jcr/query/getNodeByPath.graphql'
55
56
  });