@jahia/cypress 3.17.4 → 3.17.6

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.
@@ -3,4 +3,6 @@ export declare class Collapsible extends BaseComponent {
3
3
  static defaultSelector: string;
4
4
  collapse(): Collapsible;
5
5
  expand(): Collapsible;
6
+ shouldBeCollapsed(): void;
7
+ shouldBeExpanded(): void;
6
8
  }
@@ -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));
@@ -25,7 +25,7 @@ var fixture = function (originalCommand, fixtureParam) {
25
25
  encoding = args[0];
26
26
  }
27
27
  try {
28
- cy.readFile('./node_modules/@jahia/cypress/fixtures/' + fixtureParam, encoding, { log: false, timeout: 1000 });
28
+ cy.readFile('./node_modules/@jahia/cypress/fixtures/' + fixtureParam, encoding, { log: false, timeout: 2000 });
29
29
  }
30
30
  catch (e) {
31
31
  console.log(e);
@@ -0,0 +1 @@
1
+ export declare const getJahiaVersion: () => Cypress.Chainable;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.getJahiaVersion = void 0;
4
+ var getJahiaVersion = function () {
5
+ return cy.apollo({
6
+ fetchPolicy: 'no-cache',
7
+ queryFile: 'graphql/jcr/query/getJahiaVersion.graphql'
8
+ }).then(function (result) {
9
+ var _a;
10
+ return (_a = result === null || result === void 0 ? void 0 : result.data) === null || _a === void 0 ? void 0 : _a.admin.jahia.version;
11
+ });
12
+ };
13
+ exports.getJahiaVersion = getJahiaVersion;
@@ -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;
@@ -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', {
@@ -4,3 +4,4 @@ export * from './SiteHelper';
4
4
  export * from './UsersHelper';
5
5
  export * from './VanityUrlHelper';
6
6
  export * from './ClusterHelper';
7
+ export * from './JahiaPlatformHelper';
@@ -16,3 +16,4 @@ __exportStar(require("./SiteHelper"), exports);
16
16
  __exportStar(require("./UsersHelper"), exports);
17
17
  __exportStar(require("./VanityUrlHelper"), exports);
18
18
  __exportStar(require("./ClusterHelper"), exports);
19
+ __exportStar(require("./JahiaPlatformHelper"), exports);
@@ -0,0 +1,9 @@
1
+ mutation disableModule($moduleName: String!, $pathOrId: String!) {
2
+ jcr {
3
+ mutateNode(pathOrId: $pathOrId) {
4
+ mutateProperty(name: "j:installedModules") {
5
+ removeValue(value: $moduleName)
6
+ }
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,12 @@
1
+ query {
2
+ admin {
3
+ jahia {
4
+ version {
5
+ release
6
+ build
7
+ buildDate
8
+ isSnapshot
9
+ }
10
+ }
11
+ }
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jahia/cypress",
3
- "version": "3.17.4",
3
+ "version": "3.17.6",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "lint": "eslint src -c .eslintrc.json --ext .ts"
@@ -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
  }
@@ -16,7 +16,7 @@ export const fixture = function (originalCommand: ((...args: any[]) => any), fix
16
16
  }
17
17
 
18
18
  try {
19
- cy.readFile('./node_modules/@jahia/cypress/fixtures/' + fixtureParam, encoding, {log: false, timeout: 1000});
19
+ cy.readFile('./node_modules/@jahia/cypress/fixtures/' + fixtureParam, encoding, {log: false, timeout: 2000});
20
20
  } catch (e) {
21
21
  console.log(e);
22
22
  }
@@ -0,0 +1,8 @@
1
+ export const getJahiaVersion = (): Cypress.Chainable => {
2
+ return cy.apollo({
3
+ fetchPolicy: 'no-cache',
4
+ queryFile: 'graphql/jcr/query/getJahiaVersion.graphql'
5
+ }).then(result => {
6
+ return result?.data?.admin.jahia.version;
7
+ });
8
+ };
@@ -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,
@@ -4,3 +4,4 @@ export * from './SiteHelper';
4
4
  export * from './UsersHelper';
5
5
  export * from './VanityUrlHelper';
6
6
  export * from './ClusterHelper';
7
+ export * from './JahiaPlatformHelper';