@jahia/cypress 7.1.0 → 7.2.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.
|
@@ -21,4 +21,5 @@ export declare const markForDeletion: (pathOrId: string, apolloOptions?: ApolloO
|
|
|
21
21
|
export declare const uploadFile: (fixturePath: string, parentPathOrId: string, name: string, mimeType: string) => Cypress.Chainable;
|
|
22
22
|
export declare const lockNode: (pathOrId: string, apolloOptions?: ApolloOptions) => Cypress.Chainable;
|
|
23
23
|
export declare const unlockNode: (pathOrId: string, apolloOptions?: ApolloOptions) => Cypress.Chainable;
|
|
24
|
+
export declare const copyNode: (pathOrId: string, destParentPathOrId: string, destName?: string, apolloOptions?: ApolloOptions) => Cypress.Chainable;
|
|
24
25
|
export {};
|
package/dist/utils/JCRHelper.js
CHANGED
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
exports.__esModule = true;
|
|
14
|
-
exports.unlockNode = exports.lockNode = exports.uploadFile = exports.markForDeletion = exports.getNodeTypes = exports.moveNode = exports.getNodeAcl = exports.getNodeByPath = exports.removeMixins = exports.addMixins = exports.addNode = exports.deleteNodeProperty = exports.deleteNode = exports.setNodeProperty = void 0;
|
|
14
|
+
exports.copyNode = exports.unlockNode = exports.lockNode = exports.uploadFile = exports.markForDeletion = exports.getNodeTypes = exports.moveNode = exports.getNodeAcl = exports.getNodeByPath = exports.removeMixins = exports.addMixins = exports.addNode = exports.deleteNodeProperty = exports.deleteNode = exports.setNodeProperty = void 0;
|
|
15
15
|
// eslint-disable-next-line max-params
|
|
16
16
|
var setNodeProperty = function (pathOrId, property, value, language, apolloOptions) {
|
|
17
17
|
if (apolloOptions === void 0) { apolloOptions = {}; }
|
|
@@ -136,3 +136,12 @@ var unlockNode = function (pathOrId, apolloOptions) {
|
|
|
136
136
|
} }));
|
|
137
137
|
};
|
|
138
138
|
exports.unlockNode = unlockNode;
|
|
139
|
+
var copyNode = function (pathOrId, destParentPathOrId, destName, apolloOptions) {
|
|
140
|
+
if (apolloOptions === void 0) { apolloOptions = {}; }
|
|
141
|
+
return cy.apollo(__assign(__assign({}, apolloOptions), { variables: {
|
|
142
|
+
pathOrId: pathOrId,
|
|
143
|
+
destParentPathOrId: destParentPathOrId,
|
|
144
|
+
destName: destName
|
|
145
|
+
}, mutationFile: 'graphql/copyNode.graphql' }));
|
|
146
|
+
};
|
|
147
|
+
exports.copyNode = copyNode;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
mutation PasteNode(
|
|
2
|
+
$pathOrId: String!,
|
|
3
|
+
$destParentPathOrId: String!,
|
|
4
|
+
$destName: String,
|
|
5
|
+
$childNodeTypesToSkip: [String]
|
|
6
|
+
) {
|
|
7
|
+
jcr {
|
|
8
|
+
copyNode(
|
|
9
|
+
pathOrId: $pathOrId,
|
|
10
|
+
destParentPathOrId: $destParentPathOrId,
|
|
11
|
+
destName: $destName,
|
|
12
|
+
childNodeTypesToSkip: $childNodeTypesToSkip
|
|
13
|
+
) {
|
|
14
|
+
uuid
|
|
15
|
+
node {
|
|
16
|
+
path
|
|
17
|
+
name
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
package/package.json
CHANGED
package/src/utils/JCRHelper.ts
CHANGED
|
@@ -170,3 +170,15 @@ export const unlockNode = (pathOrId: string, apolloOptions: ApolloOptions = {}):
|
|
|
170
170
|
}
|
|
171
171
|
});
|
|
172
172
|
};
|
|
173
|
+
|
|
174
|
+
export const copyNode = (pathOrId: string, destParentPathOrId: string, destName?: string, apolloOptions: ApolloOptions = {}): Cypress.Chainable => {
|
|
175
|
+
return cy.apollo({
|
|
176
|
+
...apolloOptions,
|
|
177
|
+
variables: {
|
|
178
|
+
pathOrId: pathOrId,
|
|
179
|
+
destParentPathOrId: destParentPathOrId,
|
|
180
|
+
destName: destName
|
|
181
|
+
},
|
|
182
|
+
mutationFile: 'graphql/copyNode.graphql'
|
|
183
|
+
});
|
|
184
|
+
};
|