@jahia/cypress 6.2.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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jahia/cypress",
3
- "version": "6.2.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
+ };