@jahia/cypress 3.4.0 → 3.6.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.
@@ -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: 200 });
28
+ cy.readFile('./node_modules/@jahia/cypress/fixtures/' + fixtureParam, encoding, { log: false, timeout: 500 });
29
29
  }
30
30
  catch (e) {
31
31
  console.log(e);
@@ -5,3 +5,4 @@ export declare const createSite: (siteKey: string, config?: {
5
5
  locale: string;
6
6
  }) => void;
7
7
  export declare const deleteSite: (siteKey: string) => void;
8
+ export declare const enableModule: (moduleName: string, siteKey: string) => void;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.deleteSite = exports.createSite = void 0;
3
+ 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', {
@@ -18,3 +18,10 @@ var deleteSite = function (siteKey) {
18
18
  });
19
19
  };
20
20
  exports.deleteSite = deleteSite;
21
+ var enableModule = function (moduleName, siteKey) {
22
+ cy.runProvisioningScript({
23
+ fileContent: '- enable: "' + moduleName + '"\n site: "' + siteKey + '"',
24
+ type: 'application/yaml'
25
+ });
26
+ };
27
+ exports.enableModule = enableModule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jahia/cypress",
3
- "version": "3.4.0",
3
+ "version": "3.6.0",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "lint": "eslint src -c .eslintrc.json --ext .ts"
@@ -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: 200});
19
+ cy.readFile('./node_modules/@jahia/cypress/fixtures/' + fixtureParam, encoding, {log: false, timeout: 500});
20
20
  } catch (e) {
21
21
  console.log(e);
22
22
  }
@@ -14,3 +14,10 @@ export const deleteSite = (siteKey: string): void => {
14
14
  SITEKEY: siteKey
15
15
  });
16
16
  };
17
+
18
+ export const enableModule = (moduleName: string, siteKey: string): void => {
19
+ cy.runProvisioningScript({
20
+ fileContent: '- enable: "' + moduleName + '"\n site: "' + siteKey + '"',
21
+ type: 'application/yaml'
22
+ });
23
+ };