@jahia/cypress 7.3.0 → 8.0.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +4 -2
  3. package/ci.build.sh +17 -1
  4. package/dist/index.js +6 -2
  5. package/dist/page-object/baseComponent.d.ts +1 -2
  6. package/dist/page-object/baseComponent.js +10 -6
  7. package/dist/page-object/basePage.js +1 -1
  8. package/dist/page-object/html/iframe.d.ts +0 -1
  9. package/dist/page-object/html/iframe.js +2 -2
  10. package/dist/page-object/html/index.js +6 -2
  11. package/dist/page-object/index.js +6 -2
  12. package/dist/page-object/material/index.js +6 -2
  13. package/dist/page-object/material/muiinput.d.ts +0 -1
  14. package/dist/page-object/material/muiinput.js +1 -1
  15. package/dist/page-object/material/muiradio.js +1 -1
  16. package/dist/page-object/moonstone/accordion.d.ts +0 -1
  17. package/dist/page-object/moonstone/accordion.js +2 -2
  18. package/dist/page-object/moonstone/button.js +1 -1
  19. package/dist/page-object/moonstone/collapsible.js +1 -1
  20. package/dist/page-object/moonstone/dropdown.js +2 -2
  21. package/dist/page-object/moonstone/index.js +6 -2
  22. package/dist/page-object/moonstone/menu.js +9 -9
  23. package/dist/page-object/moonstone/pagination.js +3 -3
  24. package/dist/page-object/moonstone/primaryNav.js +2 -2
  25. package/dist/page-object/moonstone/secondaryNav.js +1 -1
  26. package/dist/page-object/moonstone/table.d.ts +0 -1
  27. package/dist/page-object/moonstone/table.js +5 -5
  28. package/dist/page-object/utils.d.ts +0 -1
  29. package/dist/page-object/utils.js +11 -12
  30. package/dist/plugins/env.js +2 -2
  31. package/dist/plugins/index.js +6 -2
  32. package/dist/plugins/registerPlugins.js +2 -2
  33. package/dist/support/apollo/apollo.d.ts +3 -4
  34. package/dist/support/apollo/apollo.js +8 -8
  35. package/dist/support/apollo/apolloClient.d.ts +1 -2
  36. package/dist/support/apollo/apolloClient.js +7 -7
  37. package/dist/support/apollo/index.js +6 -2
  38. package/dist/support/apollo/links.d.ts +1 -1
  39. package/dist/support/apollo/links.js +5 -6
  40. package/dist/support/commands.js +1 -1
  41. package/dist/support/fixture.d.ts +1 -1
  42. package/dist/support/fixture.js +11 -7
  43. package/dist/support/index.js +6 -2
  44. package/dist/support/jsErrorsLogger.js +13 -9
  45. package/dist/support/login.d.ts +0 -1
  46. package/dist/support/login.js +2 -2
  47. package/dist/support/logout.d.ts +0 -1
  48. package/dist/support/logout.js +1 -1
  49. package/dist/support/provisioning/executeGroovy.d.ts +1 -1
  50. package/dist/support/provisioning/executeGroovy.js +1 -1
  51. package/dist/support/provisioning/index.js +6 -2
  52. package/dist/support/provisioning/installConfig.d.ts +0 -1
  53. package/dist/support/provisioning/installConfig.js +3 -3
  54. package/dist/support/provisioning/installModule.d.ts +0 -1
  55. package/dist/support/provisioning/installModule.js +1 -1
  56. package/dist/support/provisioning/runProvisioningScript.d.ts +3 -4
  57. package/dist/support/provisioning/runProvisioningScript.js +3 -3
  58. package/dist/support/provisioning/uninstallModule.d.ts +0 -1
  59. package/dist/support/provisioning/uninstallModule.js +1 -1
  60. package/dist/support/registerSupport.js +1 -1
  61. package/dist/support/repeatUntil.d.ts +1 -2
  62. package/dist/support/repeatUntil.js +2 -2
  63. package/dist/support/testStep.js +2 -2
  64. package/dist/utils/ClusterHelper.js +1 -1
  65. package/dist/utils/ExportHelper.d.ts +2 -2
  66. package/dist/utils/ExportHelper.js +14 -10
  67. package/dist/utils/GraphQLHelper.js +21 -17
  68. package/dist/utils/JCRHelper.d.ts +1 -1
  69. package/dist/utils/JCRHelper.js +1 -1
  70. package/dist/utils/JahiaPlatformHelper.js +2 -2
  71. package/dist/utils/Logger.js +6 -6
  72. package/dist/utils/PublicationAndWorkflowHelper.js +3 -3
  73. package/dist/utils/SAMHelper.d.ts +1 -1
  74. package/dist/utils/SAMHelper.js +4 -4
  75. package/dist/utils/SiteHelper.js +2 -2
  76. package/dist/utils/UsersHelper.js +2 -2
  77. package/dist/utils/VanityUrlHelper.js +1 -1
  78. package/dist/utils/index.js +6 -2
  79. package/package.json +11 -10
  80. package/src/page-object/baseComponent.ts +6 -6
  81. package/src/page-object/html/iframe.ts +3 -3
  82. package/src/page-object/material/muiinput.ts +1 -1
  83. package/src/page-object/material/muiradio.ts +1 -1
  84. package/src/page-object/moonstone/accordion.ts +1 -1
  85. package/src/page-object/moonstone/button.ts +1 -1
  86. package/src/page-object/moonstone/collapsible.ts +1 -1
  87. package/src/page-object/moonstone/dropdown.ts +1 -1
  88. package/src/page-object/moonstone/menu.ts +1 -1
  89. package/src/page-object/moonstone/pagination.ts +1 -1
  90. package/src/page-object/moonstone/primaryNav.ts +1 -1
  91. package/src/page-object/moonstone/secondaryNav.ts +1 -1
  92. package/src/page-object/moonstone/table.ts +2 -2
  93. package/src/support/apollo/links.ts +1 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,21 @@
1
+ # @jahia/cypress Changelog
2
+
3
+ ## 8.0.0
4
+
5
+ ### Breaking Changes
6
+
7
+ * Bump "typescript" from 4.3.5 to 5.9.3; update dependencies accordingly; (#203)
8
+
9
+ ### New Features
10
+
11
+ * Add copyNode helper (#196)
12
+
13
+ * Leverage Buildx cache when building Docker test image (#191)
14
+
15
+ Use Docker Buildx with the GitHub Actions Cache (if enabled with `DOCKER_BUILD_CACHE_ENABLED` env variable), to speed up the build of the Docker test image (done with `ci.build.sh`)
16
+
17
+ ### Bug Fixes
18
+
19
+ * Fix broken copyNode helper
20
+
21
+ CopyNode (#198)
package/README.md CHANGED
@@ -105,6 +105,8 @@ module.exports = (on, config) => {
105
105
  This is an Open-Source codebase, you can find more details about Open-Source @ Jahia [in this repository](https://github.com/Jahia/open-source)
106
106
 
107
107
  ## How to release
108
- Ensure and eventually change the version in [package.json](package.json) to match the version to release.
109
108
 
110
- From Github release panel, draft a new release with a tag named `vX.Y.Z` and a title `vX.Y.Z`. The release will be published to NPM automatically.
109
+ Releases are now semi-automated using [Chachalog](https://github.com/GauBen/chachalog). To create a new release:
110
+
111
+ - Merge the `chore: release` PR from `github-actions`.
112
+ - From Github release panel, draft a new release with a tag named `vX.Y.Z` (use the same version as the one set by Chachalog in the `chore: release` PR) and a title `vX.Y.Z`. The release will be published to NPM automatically.
package/ci.build.sh CHANGED
@@ -41,4 +41,20 @@ if [ -d ./jahia-module ]; then
41
41
  fi
42
42
  YARN_VERSION=${YARN_VERSION:-1.22.19}
43
43
 
44
- docker build --build-arg YARN_VERSION=${YARN_VERSION} -f $BASEDIR/env.Dockerfile -t ${TESTS_IMAGE} .
44
+ # Use Docker buildx with cache if enabled via environment variables
45
+ if [ "$DOCKER_BUILD_CACHE_ENABLED" = "true" ]; then
46
+ echo "Docker cache is enabled, building using 'docker buildx build'"
47
+ echo "cache-from: $DOCKER_BUILDX_CACHE_FROM"
48
+ echo "cache-to: $DOCKER_BUILDX_CACHE_TO"
49
+ docker buildx build \
50
+ --cache-from "$DOCKER_BUILDX_CACHE_FROM" \
51
+ --cache-to "$DOCKER_BUILDX_CACHE_TO" \
52
+ --build-arg YARN_VERSION=${YARN_VERSION} \
53
+ -f $BASEDIR/env.Dockerfile \
54
+ -t ${TESTS_IMAGE} \
55
+ --load \
56
+ .
57
+ else
58
+ echo "Docker cache is disabled, building using 'docker build'"
59
+ docker build --build-arg YARN_VERSION=${YARN_VERSION} -f $BASEDIR/env.Dockerfile -t ${TESTS_IMAGE} .
60
+ fi
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -9,7 +13,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
9
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
- exports.__esModule = true;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./page-object"), exports);
14
18
  __exportStar(require("./plugins"), exports);
15
19
  __exportStar(require("./support"), exports);
@@ -1,7 +1,6 @@
1
- /// <reference types="cypress" />
2
1
  import Chainable = Cypress.Chainable;
3
2
  import Chainer = Cypress.Chainer;
4
- export declare type ComponentType<Component> = {
3
+ export type ComponentType<Component> = {
5
4
  new (p: Chainable<JQuery>, assertion?: (s: JQuery) => void): Component;
6
5
  defaultSelector: string;
7
6
  };
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
- var __spreadArray = (this && this.__spreadArray) || function (to, from) {
3
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
4
- to[j] = from[i];
5
- return to;
2
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
+ if (ar || !(i in from)) {
5
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
+ ar[i] = from[i];
7
+ }
8
+ }
9
+ return to.concat(ar || Array.prototype.slice.call(from));
6
10
  };
7
- exports.__esModule = true;
11
+ Object.defineProperty(exports, "__esModule", { value: true });
8
12
  exports.BaseComponent = void 0;
9
13
  var BaseComponent = /** @class */ (function () {
10
14
  function BaseComponent(element, assertion) {
@@ -15,7 +19,7 @@ var BaseComponent = /** @class */ (function () {
15
19
  for (var _i = 1; _i < arguments.length; _i++) {
16
20
  others[_i - 1] = arguments[_i];
17
21
  }
18
- return (_a = cy.get('@component' + _this.id, { log: false })).should.apply(_a, __spreadArray([arg], others));
22
+ return (_a = cy.get('@component' + _this.id, { log: false })).should.apply(_a, __spreadArray([arg], others, false));
19
23
  };
20
24
  this.id = BaseComponent.count++;
21
25
  this.element = element.as('component' + this.id);
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BasePage = void 0;
4
4
  var BasePage = /** @class */ (function () {
5
5
  function BasePage() {
@@ -1,4 +1,3 @@
1
- /// <reference types="cypress" />
2
1
  import { BaseComponent } from '../baseComponent';
3
2
  import Chainable = Cypress.Chainable;
4
3
  export declare class IFrame extends BaseComponent {
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- exports.__esModule = true;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.IFrame = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var IFrame = /** @class */ (function (_super) {
@@ -26,7 +26,7 @@ var IFrame = /** @class */ (function (_super) {
26
26
  var fr = f[0];
27
27
  expect(fr.contentWindow.location.href).not.equals('about:blank');
28
28
  expect(fr.contentWindow.document.readyState).equals('complete');
29
- // eslint-disable-next-line no-unused-expressions
29
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
30
30
  expect(fr.contentDocument.body).not.be.empty;
31
31
  })
32
32
  .its('0.contentDocument.body').as('framebody' + _this.id);
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -9,5 +13,5 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
9
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
- exports.__esModule = true;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./iframe"), exports);
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -9,7 +13,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
9
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
- exports.__esModule = true;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./baseComponent"), exports);
14
18
  __exportStar(require("./basePage"), exports);
15
19
  __exportStar(require("./html"), exports);
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -9,6 +13,6 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
9
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
- exports.__esModule = true;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./muiinput"), exports);
14
18
  __exportStar(require("./muiradio"), exports);
@@ -1,4 +1,3 @@
1
- /// <reference types="cypress" />
2
1
  import { BaseComponent } from '../baseComponent';
3
2
  import TypeOptions = Cypress.TypeOptions;
4
3
  export declare class MUIInput extends BaseComponent {
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- exports.__esModule = true;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.MUIInput = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var MUIInput = /** @class */ (function (_super) {
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- exports.__esModule = true;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.MUIRadio = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var MUIRadio = /** @class */ (function (_super) {
@@ -1,4 +1,3 @@
1
- /// <reference types="cypress" />
2
1
  import { BaseComponent } from '../baseComponent';
3
2
  import Chainable = Cypress.Chainable;
4
3
  export declare class Accordion extends BaseComponent {
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- exports.__esModule = true;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.Accordion = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var Accordion = /** @class */ (function (_super) {
@@ -23,7 +23,7 @@ var Accordion = /** @class */ (function (_super) {
23
23
  return _super !== null && _super.apply(this, arguments) || this;
24
24
  }
25
25
  Accordion.prototype.click = function (itemName) {
26
- this.get().find("section.moonstone-accordionItem header[aria-controls=\"" + itemName + "\"]").click();
26
+ this.get().find("section.moonstone-accordionItem header[aria-controls=\"".concat(itemName, "\"]")).click();
27
27
  return this;
28
28
  };
29
29
  Accordion.prototype.listItems = function () {
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- exports.__esModule = true;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.Button = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var Button = /** @class */ (function (_super) {
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- exports.__esModule = true;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.Collapsible = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var Collapsible = /** @class */ (function (_super) {
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- exports.__esModule = true;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.Dropdown = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var menu_1 = require("./menu");
@@ -28,7 +28,7 @@ var Dropdown = /** @class */ (function (_super) {
28
28
  this.get().click();
29
29
  // eslint-disable-next-line cypress/no-unnecessary-waiting
30
30
  cy.wait(500);
31
- utils_1.getComponent(menu_1.Menu, this).select(item);
31
+ (0, utils_1.getComponent)(menu_1.Menu, this).select(item);
32
32
  return this;
33
33
  };
34
34
  Dropdown.defaultSelector = '.moonstone-dropdown_container';
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -9,7 +13,7 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
9
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
- exports.__esModule = true;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./accordion"), exports);
14
18
  __exportStar(require("./button"), exports);
15
19
  __exportStar(require("./collapsible"), exports);
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- exports.__esModule = true;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.Menu = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var utils_1 = require("../utils");
@@ -26,21 +26,21 @@ var Menu = /** @class */ (function (_super) {
26
26
  Menu.prototype.submenu = function (item, menu) {
27
27
  this.shouldHaveItem(item);
28
28
  this.get().find('.moonstone-menuItem').contains(item).realHover();
29
- return utils_1.getComponentByRole(Menu, menu);
29
+ return (0, utils_1.getComponentByRole)(Menu, menu);
30
30
  };
31
31
  Menu.prototype.shouldHaveItem = function (item) {
32
32
  this.get().find('.moonstone-menuItem').contains(item).scrollIntoView();
33
33
  this.get().find('.moonstone-menuItem').contains(item).should('be.visible');
34
34
  };
35
35
  Menu.prototype.shouldHaveRoleItem = function (role) {
36
- this.get().find(".moonstone-menuItem[data-sel-role=\"" + role + "\"]").scrollIntoView();
37
- this.get().find(".moonstone-menuItem[data-sel-role=\"" + role + "\"]").should('be.visible');
36
+ this.get().find(".moonstone-menuItem[data-sel-role=\"".concat(role, "\"]")).scrollIntoView();
37
+ this.get().find(".moonstone-menuItem[data-sel-role=\"".concat(role, "\"]")).should('be.visible');
38
38
  };
39
39
  Menu.prototype.shouldNotHaveItem = function (item) {
40
40
  this.get().find('.moonstone-menuItem').contains(item).should('not.exist');
41
41
  };
42
42
  Menu.prototype.shouldNotHaveRoleItem = function (role) {
43
- this.get().find(".moonstone-menuItem[data-sel-role=\"" + role + "\"]").should('not.exist');
43
+ this.get().find(".moonstone-menuItem[data-sel-role=\"".concat(role, "\"]")).should('not.exist');
44
44
  };
45
45
  Menu.prototype.select = function (item) {
46
46
  this.shouldHaveItem(item);
@@ -49,14 +49,14 @@ var Menu = /** @class */ (function (_super) {
49
49
  };
50
50
  Menu.prototype.selectByRole = function (role) {
51
51
  this.shouldHaveRoleItem(role);
52
- this.get().find(".moonstone-menuItem[data-sel-role=\"" + role + "\"]").trigger('click');
52
+ this.get().find(".moonstone-menuItem[data-sel-role=\"".concat(role, "\"]")).trigger('click');
53
53
  return this;
54
54
  };
55
55
  /** Can be used for choicelist dropdown menu */
56
56
  Menu.prototype.selectByValue = function (value) {
57
- this.get().find(".moonstone-menuItem[data-value=\"" + value + "\"]").scrollIntoView();
58
- this.get().find(".moonstone-menuItem[data-value=\"" + value + "\"]").should('be.visible');
59
- this.get().find(".moonstone-menuItem[data-value=\"" + value + "\"]").trigger('click');
57
+ this.get().find(".moonstone-menuItem[data-value=\"".concat(value, "\"]")).scrollIntoView();
58
+ this.get().find(".moonstone-menuItem[data-value=\"".concat(value, "\"]")).should('be.visible');
59
+ this.get().find(".moonstone-menuItem[data-value=\"".concat(value, "\"]")).trigger('click');
60
60
  return this;
61
61
  };
62
62
  Menu.prototype.close = function () {
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- exports.__esModule = true;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.Pagination = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var button_1 = require("./button");
@@ -25,11 +25,11 @@ var Pagination = /** @class */ (function (_super) {
25
25
  return _super !== null && _super.apply(this, arguments) || this;
26
26
  }
27
27
  Pagination.prototype.clickNextPage = function () {
28
- utils_1.getComponentByRole(button_1.Button, 'table-pagination-button-next-page', this).click();
28
+ (0, utils_1.getComponentByRole)(button_1.Button, 'table-pagination-button-next-page', this).click();
29
29
  return this;
30
30
  };
31
31
  Pagination.prototype.clickPreviousPage = function () {
32
- utils_1.getComponentByRole(button_1.Button, 'table-pagination-button-previous-page', this).click();
32
+ (0, utils_1.getComponentByRole)(button_1.Button, 'table-pagination-button-previous-page', this).click();
33
33
  return this;
34
34
  };
35
35
  Pagination.prototype.getTotalRows = function () {
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- exports.__esModule = true;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.PrimaryNav = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var PrimaryNav = /** @class */ (function (_super) {
@@ -23,7 +23,7 @@ var PrimaryNav = /** @class */ (function (_super) {
23
23
  return _super !== null && _super.apply(this, arguments) || this;
24
24
  }
25
25
  PrimaryNav.prototype.click = function (itemName) {
26
- this.get().find(".moonstone-primaryNavItem[role=\"" + itemName + "\"]").click();
26
+ this.get().find(".moonstone-primaryNavItem[role=\"".concat(itemName, "\"]")).click();
27
27
  };
28
28
  PrimaryNav.prototype.listItems = function () {
29
29
  return this.get().find('.moonstone-primaryNavItem').then(function (items) {
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- exports.__esModule = true;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.SecondaryNav = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var SecondaryNav = /** @class */ (function (_super) {
@@ -1,4 +1,3 @@
1
- /// <reference types="cypress" />
2
1
  import { BaseComponent } from '../baseComponent';
3
2
  import { Menu } from './menu';
4
3
  export declare class Table extends BaseComponent {
@@ -14,7 +14,7 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
- exports.__esModule = true;
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.TableRow = exports.Table = void 0;
19
19
  var baseComponent_1 = require("../baseComponent");
20
20
  var menu_1 = require("./menu");
@@ -25,13 +25,13 @@ var Table = /** @class */ (function (_super) {
25
25
  return _super !== null && _super.apply(this, arguments) || this;
26
26
  }
27
27
  Table.prototype.getRows = function (assertion) {
28
- return utils_1.getComponent(TableRow, this, assertion);
28
+ return (0, utils_1.getComponent)(TableRow, this, assertion);
29
29
  };
30
30
  Table.prototype.getRowByIndex = function (i, assertion) {
31
- return utils_1.getComponentByIndex(TableRow, i, this, assertion);
31
+ return (0, utils_1.getComponentByIndex)(TableRow, i, this, assertion);
32
32
  };
33
33
  Table.prototype.getRowByContent = function (content, assertion) {
34
- return utils_1.getComponentByContent(TableRow, content, this, assertion);
34
+ return (0, utils_1.getComponentByContent)(TableRow, content, this, assertion);
35
35
  };
36
36
  Table.defaultSelector = '.moonstone-Table';
37
37
  return Table;
@@ -44,7 +44,7 @@ var TableRow = /** @class */ (function (_super) {
44
44
  }
45
45
  TableRow.prototype.contextMenu = function () {
46
46
  this.get().rightclick();
47
- return utils_1.getComponentBySelector(menu_1.Menu, '#menuHolder .moonstone-menu:not(.moonstone-hidden)');
47
+ return (0, utils_1.getComponentBySelector)(menu_1.Menu, '#menuHolder .moonstone-menu:not(.moonstone-hidden)');
48
48
  };
49
49
  TableRow.defaultSelector = '.moonstone-TableBody .moonstone-TableRow';
50
50
  return TableRow;
@@ -1,4 +1,3 @@
1
- /// <reference types="cypress" />
2
1
  import { Table } from './moonstone';
3
2
  import { BaseComponent, ComponentType } from './baseComponent';
4
3
  import Chainable = Cypress.Chainable;
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
- exports.__esModule = true;
3
- exports.getComponentByContent = exports.getComponentByAttr = exports.getComponentByRole = exports.getComponentByIndex = exports.getComponent = exports.getComponentBySelector = exports.getElement = void 0;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getElement = getElement;
4
+ exports.getComponentBySelector = getComponentBySelector;
5
+ exports.getComponent = getComponent;
6
+ exports.getComponentByIndex = getComponentByIndex;
7
+ exports.getComponentByRole = getComponentByRole;
8
+ exports.getComponentByAttr = getComponentByAttr;
9
+ exports.getComponentByContent = getComponentByContent;
4
10
  function getElement(selector, parent, assertion) {
5
11
  var chainable = parent ? parent.get().find(selector) : cy.get(selector);
6
12
  if (assertion) {
@@ -8,28 +14,22 @@ function getElement(selector, parent, assertion) {
8
14
  }
9
15
  return chainable;
10
16
  }
11
- exports.getElement = getElement;
12
17
  function getComponentBySelector(C, selector, parent, assertion) {
13
18
  return new C(getElement(selector, parent, assertion), assertion);
14
19
  }
15
- exports.getComponentBySelector = getComponentBySelector;
16
20
  function getComponent(C, parent, assertion) {
17
21
  return getComponentBySelector(C, C.defaultSelector, parent, assertion);
18
22
  }
19
- exports.getComponent = getComponent;
20
23
  function getComponentByIndex(C, i, parent, assertion) {
21
- return getComponentBySelector(C, C.defaultSelector + ":nth-child(" + i + ")", parent, assertion);
24
+ return getComponentBySelector(C, "".concat(C.defaultSelector, ":nth-child(").concat(i, ")"), parent, assertion);
22
25
  }
23
- exports.getComponentByIndex = getComponentByIndex;
24
26
  function getComponentByRole(C, role, parent, assertion) {
25
- return getComponentBySelector(C, C.defaultSelector + "[data-sel-role=\"" + role + "\"]", parent, assertion);
27
+ return getComponentBySelector(C, "".concat(C.defaultSelector, "[data-sel-role=\"").concat(role, "\"]"), parent, assertion);
26
28
  }
27
- exports.getComponentByRole = getComponentByRole;
28
29
  // eslint-disable-next-line max-params
29
30
  function getComponentByAttr(C, attr, value, parent, assertion) {
30
- return getComponentBySelector(C, C.defaultSelector + "[" + attr + "=\"" + value + "\"]", parent, assertion);
31
+ return getComponentBySelector(C, "".concat(C.defaultSelector, "[").concat(attr, "=\"").concat(value, "\"]"), parent, assertion);
31
32
  }
32
- exports.getComponentByAttr = getComponentByAttr;
33
33
  function getComponentByContent(C, content, parent, assertion) {
34
34
  var chainable = getElement(C.defaultSelector, parent).should('contains', content).contains(content);
35
35
  if (assertion) {
@@ -37,4 +37,3 @@ function getComponentByContent(C, content, parent, assertion) {
37
37
  }
38
38
  return new C(chainable, assertion);
39
39
  }
40
- exports.getComponentByContent = getComponentByContent;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- exports.__esModule = true;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var env = function (on, config) {
4
4
  if (!process.env.JAHIA_URL && !process.env.SUPER_USER_PASSWORD) {
5
5
  console.warn('No environment set, will use default values');
@@ -20,4 +20,4 @@ var env = function (on, config) {
20
20
  console.log('SUPER_USER_PASSWORD =', config.env.SUPER_USER_PASSWORD);
21
21
  return config;
22
22
  };
23
- exports["default"] = env;
23
+ exports.default = env;
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -9,5 +13,5 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
9
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
- exports.__esModule = true;
16
+ Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./env"), exports);
@@ -2,10 +2,10 @@
2
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
- exports.__esModule = true;
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.registerPlugins = void 0;
7
7
  var env_1 = __importDefault(require("./env"));
8
8
  var registerPlugins = function (on, config) {
9
- env_1["default"](on, config);
9
+ (0, env_1.default)(on, config);
10
10
  };
11
11
  exports.registerPlugins = registerPlugins;
@@ -1,4 +1,3 @@
1
- /// <reference types="cypress" />
2
1
  import { ApolloClient, ApolloQueryResult, FetchResult, MutationOptions, QueryOptions } from '@apollo/client/core';
3
2
  declare global {
4
3
  namespace Cypress {
@@ -7,11 +6,11 @@ declare global {
7
6
  }
8
7
  }
9
8
  }
10
- export declare type FileQueryOptions = Partial<QueryOptions> & {
9
+ export type FileQueryOptions = Partial<QueryOptions> & {
11
10
  queryFile?: string;
12
11
  };
13
- export declare type FileMutationOptions = Partial<MutationOptions> & {
12
+ export type FileMutationOptions = Partial<MutationOptions> & {
14
13
  mutationFile?: string;
15
14
  };
16
- export declare type ApolloOptions = (QueryOptions | MutationOptions | FileQueryOptions | FileMutationOptions) & Partial<Cypress.Loggable>;
15
+ export type ApolloOptions = (QueryOptions | MutationOptions | FileQueryOptions | FileMutationOptions) & Partial<Cypress.Loggable>;
17
16
  export declare const apollo: (apollo: ApolloClient<any>, options: ApolloOptions) => void;