You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2023/01/28 19:19:28 UTC

[sling-org-apache-sling-app-cms] 02/02: Minor - Fixing cypress CI failures

This is an automated email from the ASF dual-hosted git repository.

dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git

commit 1871f8862c97c5940171e6b1cadae5672182dd4e
Author: Dan Klco <kl...@adobe.com>
AuthorDate: Sat Jan 28 14:19:17 2023 -0500

    Minor - Fixing cypress CI failures
---
 it/cypress/e2e/ugc.cy.js |  7 +------
 it/cypress/ready.js      |  2 +-
 it/package-lock.json     | 18 ++++++------------
 it/package.json          |  3 ++-
 it/pom.xml               | 10 ++++++++++
 5 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/it/cypress/e2e/ugc.cy.js b/it/cypress/e2e/ugc.cy.js
index 4fe13889..16fb8c7e 100644
--- a/it/cypress/e2e/ugc.cy.js
+++ b/it/cypress/e2e/ugc.cy.js
@@ -18,12 +18,7 @@
  */
 
 const { doneLoading } = require("../utils");
-const {
-  createComponentPage,
-  configureComponentFromDialog,
-  COMPONENT_SUBPATH,
-  XSS_PAYLOAD,
-} = require("../util/component-test-helper");
+const { createComponentPage } = require("../util/component-test-helper");
 const { login, sendPost } = require("../util/test-helper");
 
 describe("UGC Tests", () => {
diff --git a/it/cypress/ready.js b/it/cypress/ready.js
index b637643e..8ffae2b8 100644
--- a/it/cypress/ready.js
+++ b/it/cypress/ready.js
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-const fetch = require("node-fetch");
+const fetch = require("node-fetch-commonjs");
 
 const url = process.env.CYPRESS_BASE_URL;
 
diff --git a/it/package-lock.json b/it/package-lock.json
index ced1aff1..bf2c8f57 100644
--- a/it/package-lock.json
+++ b/it/package-lock.json
@@ -1364,11 +1364,6 @@
         "assert-plus": "^1.0.0"
       }
     },
-    "data-uri-to-buffer": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz",
-      "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA=="
-    },
     "dayjs": {
       "version": "1.11.7",
       "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.7.tgz",
@@ -2606,14 +2601,13 @@
       "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
       "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="
     },
-    "node-fetch": {
-      "version": "3.3.0",
-      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz",
-      "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==",
+    "node-fetch-commonjs": {
+      "version": "3.2.4",
+      "resolved": "https://registry.npmjs.org/node-fetch-commonjs/-/node-fetch-commonjs-3.2.4.tgz",
+      "integrity": "sha512-bZW7+ldcuuMPLTJk8DufhT6qHDRdljYD0jqBjmrYfcInaYcReX5kK42SQsu/jvtit/tER28yYjnk63PEEmNPtg==",
       "requires": {
-        "data-uri-to-buffer": "^4.0.0",
-        "fetch-blob": "^3.1.4",
-        "formdata-polyfill": "^4.0.10"
+        "formdata-polyfill": "^4.0.10",
+        "web-streams-polyfill": "^3.1.1"
       }
     },
     "node.extend": {
diff --git a/it/package.json b/it/package.json
index 7691e3d7..895605ee 100644
--- a/it/package.json
+++ b/it/package.json
@@ -4,6 +4,7 @@
   "description": "",
   "main": "tests/index.js",
   "scripts": {
+    "cypress:install": "./node_modules/.bin/cypress install",
     "cypress": "./node_modules/.bin/cypress open",
     "test": "./node_modules/.bin/cypress run",
     "wait-for-ready": "node cypress/ready.js"
@@ -18,7 +19,7 @@
   "dependencies": {
     "@cypress-audit/pa11y": "^1.3.1",
     "cypress": "^12.2.0",
-    "node-fetch": "^3.3.0",
+    "node-fetch-commonjs": "^3.2.4",
     "uuid": "^9.0.0"
   }
 }
diff --git a/it/pom.xml b/it/pom.xml
index 869a000e..2f473e48 100644
--- a/it/pom.xml
+++ b/it/pom.xml
@@ -173,6 +173,16 @@
                                     </environmentVariables>
                                 </configuration>
                             </execution>
+                            <execution>
+                                <id>install cypress</id>
+                                <goals>
+                                    <goal>npm</goal>
+                                </goals>
+                                <phase>integration-test</phase>
+                                <configuration>
+                                    <arguments>run cypress:install</arguments>
+                                </configuration>
+                            </execution>
                             <execution>
                                 <id>run cypress</id>
                                 <goals>