From 5aeef9daa49c5d79eda8b4c8a36a4bb02273e7a9 Mon Sep 17 00:00:00 2001 From: Tony Atkins Date: Thu, 21 Jan 2021 10:56:21 +0100 Subject: [PATCH 1/4] GH-35: Updated to use kettle@2.1.0. --- package.json | 8 +++--- tests/js/node/kettle-validation-tests.js | 32 +++++++++++------------ tests/js/node/lib/fixtures.js | 2 +- tests/js/node/lib/kettle-test-fixtures.js | 8 ------ tests/js/node/middleware-express-tests.js | 13 ++++----- 5 files changed, 28 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index 88e30e0..a7a6796 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,10 @@ "dependencies": { "ajv": "6.12.3", "fluid-binder": "1.1.2", - "fluid-express": "1.0.17", - "fluid-handlebars": "2.1.4", - "infusion": "3.0.0-dev.20210114T215306Z.2b1fe9609.FLUID-6580", - "kettle": "1.15.0" + "fluid-express": "1.0.18-dev.20210121T091003Z.bfaa948.GH-49", + "fluid-handlebars": "2.1.5-dev.20210121T093854Z.653733b.GH-39", + "infusion": "3.0.0-dev.20210120T204128Z.6e4be079f.FLUID-6580", + "kettle": "2.1.0" }, "devDependencies": { "eslint": "7.18.0", diff --git a/tests/js/node/kettle-validation-tests.js b/tests/js/node/kettle-validation-tests.js index 73763d2..29bdaff 100644 --- a/tests/js/node/kettle-validation-tests.js +++ b/tests/js/node/kettle-validation-tests.js @@ -161,59 +161,59 @@ fluid.defaults("fluid.tests.schema.kettle.caseHolder", { ], components: { validBodyRequest: { - type: "fluid.test.schema.kettle.request", + type: "fluid.test.schema.request", options: { method: "POST", - path: "/gated/body" + endpoint: "gated/body" } }, invalidBodyRequest: { - type: "fluid.test.schema.kettle.request", + type: "fluid.test.schema.request", options: { method: "POST", - path: "/gated/body" + endpoint: "gated/body" } }, validParamsRequest: { - type: "fluid.test.schema.kettle.request", + type: "fluid.test.schema.request", options: { method: "GET", - path: "/gated/params/good" + endpoint: "gated/params/good" } }, invalidParamsRequest: { - type: "fluid.test.schema.kettle.request", + type: "fluid.test.schema.request", options: { method: "GET", - path: "/gated/params/bad" + endpoint: "gated/params/bad" } }, validQueryRequest: { - type: "fluid.test.schema.kettle.request", + type: "fluid.test.schema.request", options: { method: "GET", - path: "/gated/query?hasQueryContent=good" + endpoint: "gated/query?hasQueryContent=good" } }, invalidQueryRequest: { - type: "fluid.test.schema.kettle.request", + type: "fluid.test.schema.request", options: { method: "GET", - path: "/gated/query?hasQueryContent=bad" + endpoint: "gated/query?hasQueryContent=bad" } }, validCombinedRequest: { - type: "fluid.test.schema.kettle.request", + type: "fluid.test.schema.request", options: { method: "POST", - path: "/gated/combined/good?hasQueryContent=good" + endpoint: "gated/combined/good?hasQueryContent=good" } }, invalidCombinedRequest: { - type: "fluid.test.schema.kettle.request", + type: "fluid.test.schema.request", options: { method: "POST", - path: "/gated/combined/bad?hasQueryContent=bad" + endpoint: "gated/combined/bad?hasQueryContent=bad" } } } diff --git a/tests/js/node/lib/fixtures.js b/tests/js/node/lib/fixtures.js index b0e0e0b..5d392df 100644 --- a/tests/js/node/lib/fixtures.js +++ b/tests/js/node/lib/fixtures.js @@ -139,7 +139,7 @@ fluid.defaults("fluid.test.schema.caseHolder", { fluid.defaults("fluid.test.schema.request", { gradeNames: ["kettle.test.request.http"], port: "{testEnvironment}.options.port", - path: { + url: { expander: { funcName: "fluid.stringTemplate", args: ["http://localhost:%port/%endpoint", { port: "{testEnvironment}.options.port", endpoint: "{that}.options.endpoint"}] diff --git a/tests/js/node/lib/kettle-test-fixtures.js b/tests/js/node/lib/kettle-test-fixtures.js index 4d0a43a..cf4d83b 100644 --- a/tests/js/node/lib/kettle-test-fixtures.js +++ b/tests/js/node/lib/kettle-test-fixtures.js @@ -192,11 +192,3 @@ fluid.defaults("fluid.test.schema.kettle.app", { } } }); - -fluid.defaults("fluid.test.schema.kettle.request", { - gradeNames: ["kettle.test.request.http"], - headers: { - accept: "application/json" - }, - port: "{testEnvironment}.options.port" -}); diff --git a/tests/js/node/middleware-express-tests.js b/tests/js/node/middleware-express-tests.js index 4294478..eef5388 100644 --- a/tests/js/node/middleware-express-tests.js +++ b/tests/js/node/middleware-express-tests.js @@ -19,6 +19,8 @@ kettle.loadTestingSupport(); require("../../../"); +require("./lib/fixtures"); + fluid.registerNamespace("fluid.tests.schema.middleware.express.caseHolder"); fluid.tests.schema.middleware.express.caseHolder.examineResponse = function (response, body, shouldBeValid) { if (shouldBeValid) { @@ -37,17 +39,16 @@ fluid.tests.schema.middleware.express.caseHolder.examineResponse = function (res }; fluid.defaults("fluid.tests.schema.middleware.request", { - gradeNames: ["kettle.test.request.http"], - path: { + gradeNames: ["fluid.test.schema.request"], + endpoint: { expander: { funcName: "fluid.stringTemplate", - args: ["/gated/%method", { method: "{that}.options.method"}] + args: ["gated/%method", { method: "{that}.options.method"}] } }, headers: { accept: "application/json" - }, - port: "{testEnvironment}.options.port" + } }); fluid.defaults("fluid.tests.schema.middleware.request.post", { @@ -220,7 +221,7 @@ fluid.defaults("fluid.tests.schema.middleware.express.caseHolder", { goodJsonGetRequest: { type: "fluid.tests.schema.middleware.request.get", options: { - path: "/gated/get?shallowlyRequired=true" + endpoint: "gated/get?shallowlyRequired=true" } }, emptyPostRequest: { From cd3bb5cebe927f37b6a6781203a85738b65fd306 Mon Sep 17 00:00:00 2001 From: Tony Atkins Date: Mon, 15 Feb 2021 10:04:43 +0100 Subject: [PATCH 2/4] GH-35: Updated to released versions of fluid-express and fluid-handlebars. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a7a6796..f86c389 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "dependencies": { "ajv": "6.12.3", "fluid-binder": "1.1.2", - "fluid-express": "1.0.18-dev.20210121T091003Z.bfaa948.GH-49", - "fluid-handlebars": "2.1.5-dev.20210121T093854Z.653733b.GH-39", + "fluid-express": "1.0.18", + "fluid-handlebars": "2.1.5", "infusion": "3.0.0-dev.20210120T204128Z.6e4be079f.FLUID-6580", "kettle": "2.1.0" }, From 0d2771ad948f7a7f6221438b452c9578f7d9bb6d Mon Sep 17 00:00:00 2001 From: Tony Atkins Date: Mon, 15 Feb 2021 10:14:14 +0100 Subject: [PATCH 3/4] GH-35: Updated testem config to address issues with Chromium. --- tests/testem.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/testem.js b/tests/testem.js index 0075766..ef45efd 100644 --- a/tests/testem.js +++ b/tests/testem.js @@ -42,7 +42,9 @@ var testemComponent = fluid.testem.instrumentation({ "Firefox": [ "--no-remote", "--headless" - ] + ], + // Required to get Chromium working on GitHub CI. + "Chromium": "{that}.options.browserArgs.Chrome" }, testemOptions: { // Disable Headless Chrome we can figure out a solution to this issue: https://issues.fluid.net/browse/fluid-4064 From fe349bfd367ca126785fe0043d39b23116077948 Mon Sep 17 00:00:00 2001 From: Tony Atkins Date: Mon, 15 Feb 2021 10:18:51 +0100 Subject: [PATCH 4/4] GH-35: Exclude Chromium from browser test runs. --- tests/testem.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/testem.js b/tests/testem.js index ef45efd..6aa9b34 100644 --- a/tests/testem.js +++ b/tests/testem.js @@ -42,14 +42,12 @@ var testemComponent = fluid.testem.instrumentation({ "Firefox": [ "--no-remote", "--headless" - ], - // Required to get Chromium working on GitHub CI. - "Chromium": "{that}.options.browserArgs.Chrome" + ] }, testemOptions: { // Disable Headless Chrome we can figure out a solution to this issue: https://issues.fluid.net/browse/fluid-4064 // Running Testem with the HEADLESS environment variable still works, and still runs headless. - skip: "PhantomJS,Safari,IE,Headless Chrome" + skip: "PhantomJS,Safari,IE,Headless Chrome,Chromium" }, components: { express: {