@jahia/cypress 3.17.5 → 3.17.7
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/page-object/moonstone/collapsible.d.ts +2 -0
- package/dist/page-object/moonstone/collapsible.js +6 -0
- package/dist/support/provisioning/index.d.ts +1 -0
- package/dist/support/provisioning/index.js +1 -0
- package/dist/support/provisioning/uninstallBundle.d.ts +9 -0
- package/dist/support/provisioning/uninstallBundle.js +12 -0
- package/dist/utils/SiteHelper.d.ts +1 -0
- package/dist/utils/SiteHelper.js +8 -1
- package/fixtures/graphql/jcr/mutation/disableModule.graphql +9 -0
- package/package.json +1 -1
- package/src/page-object/moonstone/collapsible.ts +8 -0
- package/src/support/provisioning/index.ts +1 -0
- package/src/support/provisioning/uninstallBundle.ts +20 -0
- package/src/utils/SiteHelper.ts +7 -0
|
@@ -40,6 +40,12 @@ var Collapsible = /** @class */ (function (_super) {
|
|
|
40
40
|
});
|
|
41
41
|
return this;
|
|
42
42
|
};
|
|
43
|
+
Collapsible.prototype.shouldBeCollapsed = function () {
|
|
44
|
+
this.get().find('.moonstone-collapsible_content_collapsed').should('exist');
|
|
45
|
+
};
|
|
46
|
+
Collapsible.prototype.shouldBeExpanded = function () {
|
|
47
|
+
this.get().find('.moonstone-collapsible_content_expanded').should('exist');
|
|
48
|
+
};
|
|
43
49
|
Collapsible.defaultSelector = '.moonstone-collapsible';
|
|
44
50
|
return Collapsible;
|
|
45
51
|
}(baseComponent_1.BaseComponent));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
declare global {
|
|
3
|
+
namespace Cypress {
|
|
4
|
+
interface Chainable<Subject> {
|
|
5
|
+
uninstallBundle(bundleSymbolicName: string): Chainable<Cypress.Response<any>>;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export declare const uninstallBundle: (bundleSymbolicName: string) => void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-namespace */
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.uninstallBundle = void 0;
|
|
5
|
+
/// <reference types="cypress" />
|
|
6
|
+
var uninstallBundle = function (bundleSymbolicName) {
|
|
7
|
+
cy.runProvisioningScript({
|
|
8
|
+
fileContent: '- uninstallBundle: "' + bundleSymbolicName + '"\n',
|
|
9
|
+
type: 'application/yaml'
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
exports.uninstallBundle = uninstallBundle;
|
|
@@ -6,6 +6,7 @@ export declare const createSite: (siteKey: string, config?: {
|
|
|
6
6
|
}) => void;
|
|
7
7
|
export declare const deleteSite: (siteKey: string) => void;
|
|
8
8
|
export declare const enableModule: (moduleName: string, siteKey: string) => void;
|
|
9
|
+
export declare const disableModule: (moduleName: string, siteKey: string) => void;
|
|
9
10
|
export declare const editSite: (siteKey: string, config?: {
|
|
10
11
|
serverName: string;
|
|
11
12
|
}) => void;
|
package/dist/utils/SiteHelper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
|
-
exports.editSite = exports.enableModule = exports.deleteSite = exports.createSite = void 0;
|
|
3
|
+
exports.editSite = exports.disableModule = exports.enableModule = exports.deleteSite = exports.createSite = void 0;
|
|
4
4
|
var createSite = function (siteKey, config) {
|
|
5
5
|
if (config === void 0) { config = { templateSet: 'dx-base-demo-templates', serverName: 'localhost', locale: 'en' }; }
|
|
6
6
|
cy.executeGroovy('groovy/admin/createSite.groovy', {
|
|
@@ -25,6 +25,13 @@ var enableModule = function (moduleName, siteKey) {
|
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
27
|
exports.enableModule = enableModule;
|
|
28
|
+
var disableModule = function (moduleName, siteKey) {
|
|
29
|
+
cy.apollo({
|
|
30
|
+
mutationFile: 'graphql/jcr/mutation/disableModule.graphql',
|
|
31
|
+
variables: { moduleName: moduleName, pathOrId: "/sites/" + siteKey }
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
exports.disableModule = disableModule;
|
|
28
35
|
var editSite = function (siteKey, config) {
|
|
29
36
|
if (config === void 0) { config = { serverName: 'localhost' }; }
|
|
30
37
|
cy.executeGroovy('groovy/admin/editSite.groovy', {
|
package/package.json
CHANGED
|
@@ -20,4 +20,12 @@ export class Collapsible extends BaseComponent {
|
|
|
20
20
|
});
|
|
21
21
|
return this;
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
shouldBeCollapsed(): void {
|
|
25
|
+
this.get().find('.moonstone-collapsible_content_collapsed').should('exist');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
shouldBeExpanded(): void {
|
|
29
|
+
this.get().find('.moonstone-collapsible_content_expanded').should('exist');
|
|
30
|
+
}
|
|
23
31
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-namespace */
|
|
2
|
+
|
|
3
|
+
// Load type definitions that come with Cypress module
|
|
4
|
+
/// <reference types="cypress" />
|
|
5
|
+
|
|
6
|
+
declare global {
|
|
7
|
+
namespace Cypress {
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9
|
+
interface Chainable<Subject> {
|
|
10
|
+
uninstallBundle(bundleSymbolicName: string): Chainable<Cypress.Response<any>>
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const uninstallBundle = function (bundleSymbolicName: string): void {
|
|
16
|
+
cy.runProvisioningScript({
|
|
17
|
+
fileContent: '- uninstallBundle: "' + bundleSymbolicName + '"\n',
|
|
18
|
+
type: 'application/yaml'
|
|
19
|
+
});
|
|
20
|
+
};
|
package/src/utils/SiteHelper.ts
CHANGED
|
@@ -22,6 +22,13 @@ export const enableModule = (moduleName: string, siteKey: string): void => {
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
+
export const disableModule = (moduleName: string, siteKey: string): void => {
|
|
26
|
+
cy.apollo({
|
|
27
|
+
mutationFile: 'graphql/jcr/mutation/disableModule.graphql',
|
|
28
|
+
variables: {moduleName, pathOrId: `/sites/${siteKey}`}
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
25
32
|
export const editSite = (siteKey: string, config: {serverName: string} = {serverName: 'localhost'}): void => {
|
|
26
33
|
cy.executeGroovy('groovy/admin/editSite.groovy', {
|
|
27
34
|
SITEKEY: siteKey,
|