@jahia/cypress 6.1.0 → 6.3.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.
@@ -0,0 +1,9 @@
1
+ /// <reference types="cypress" />
2
+ declare global {
3
+ namespace Cypress {
4
+ interface Chainable<Subject> {
5
+ installConfig(configFile: string): Chainable<Cypress.Response<any>>;
6
+ }
7
+ }
8
+ }
9
+ export declare const installConfig: (configFile: string) => void;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-namespace */
3
+ exports.__esModule = true;
4
+ exports.installConfig = void 0;
5
+ /// <reference types="cypress" />
6
+ var installConfig = function (configFile) {
7
+ cy.runProvisioningScript({
8
+ script: { fileContent: "- installConfiguration: \"" + configFile + "\"", type: 'application/yaml' },
9
+ files: [{
10
+ fileName: "" + configFile,
11
+ type: 'text/plain'
12
+ }]
13
+ });
14
+ };
15
+ exports.installConfig = installConfig;
@@ -8,7 +8,8 @@ var logout_1 = require("./logout");
8
8
  var fixture_1 = require("./fixture");
9
9
  var repeatUntil_1 = require("./repeatUntil");
10
10
  var testStep_1 = require("./testStep");
11
- var jsErrorsLogger_1 = require("./jsErrorsLogger");
11
+ // FUNCTIONALITY IS TEMPORARY DISABLED DUE TO UNEXPECTED ISSUES
12
+ // import {jsErrorsLogger} from './jsErrorsLogger';
12
13
  var registerSupport = function () {
13
14
  Cypress.Commands.add('apolloClient', apollo_1.apolloClient);
14
15
  Cypress.Commands.add('apollo', { prevSubject: 'optional' }, apollo_1.apollo);
@@ -27,6 +28,7 @@ var registerSupport = function () {
27
28
  // attaching the JavaScript errors logger hooks here ensures that logger is initialized automatically
28
29
  // for all tests without needing to call it explicitly in each test file.
29
30
  // This is useful for capturing and logging JavaScript errors across all tests.
30
- jsErrorsLogger_1.jsErrorsLogger.attachHooks();
31
+ // FUNCTIONALITY IS TEMPORARY DISABLED DUE TO UNEXPECTED ISSUES
32
+ // jsErrorsLogger.attachHooks();
31
33
  };
32
34
  exports.registerSupport = registerSupport;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jahia/cypress",
3
- "version": "6.1.0",
3
+ "version": "6.3.0",
4
4
  "scripts": {
5
5
  "build": "tsc",
6
6
  "lint": "eslint src -c .eslintrc.json --ext .ts --max-warnings=0"
@@ -0,0 +1,23 @@
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
+ installConfig(configFile: string): Chainable<Cypress.Response<any>>;
11
+ }
12
+ }
13
+ }
14
+
15
+ export const installConfig = function (configFile: string): void {
16
+ cy.runProvisioningScript({
17
+ script: {fileContent: `- installConfiguration: "${configFile}"`, type: 'application/yaml'},
18
+ files: [{
19
+ fileName: `${configFile}`,
20
+ type: 'text/plain'
21
+ }]
22
+ });
23
+ };
@@ -5,7 +5,8 @@ import {logout} from './logout';
5
5
  import {fixture} from './fixture';
6
6
  import {repeatUntil} from './repeatUntil';
7
7
  import {step} from './testStep';
8
- import {jsErrorsLogger} from './jsErrorsLogger';
8
+ // FUNCTIONALITY IS TEMPORARY DISABLED DUE TO UNEXPECTED ISSUES
9
+ // import {jsErrorsLogger} from './jsErrorsLogger';
9
10
 
10
11
  export const registerSupport = (): void => {
11
12
  Cypress.Commands.add('apolloClient', apolloClient);
@@ -30,5 +31,6 @@ export const registerSupport = (): void => {
30
31
  // attaching the JavaScript errors logger hooks here ensures that logger is initialized automatically
31
32
  // for all tests without needing to call it explicitly in each test file.
32
33
  // This is useful for capturing and logging JavaScript errors across all tests.
33
- jsErrorsLogger.attachHooks();
34
+ // FUNCTIONALITY IS TEMPORARY DISABLED DUE TO UNEXPECTED ISSUES
35
+ // jsErrorsLogger.attachHooks();
34
36
  };