diff --git a/package.json b/package.json index fa05ad9b..e01b1050 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,9 @@ "perf_hooks": "^0.0.1", "rxjs": "7.2.0", "uuid": "^9.0.0", - "winston": "3.13.1", - "xml2js": "^0.5.0" + "xml2js": "^0.5.0", + "winston": "3.15.0", + "winston-transport": "4.7.1" }, "scripts": { "start": "webpack-dev-server --config webpack.dev.js", diff --git a/src/App.js b/src/App.js index 726133ef..8ccbf03b 100644 --- a/src/App.js +++ b/src/App.js @@ -117,7 +117,7 @@ export default class App extends Base { process.env.STANDALONE_PREFIX = standalonePrefix; process.env.ID = 0; process.env.REGISTERPROVIDER = true; - + process.env.SDKS_AVAILABLE = [...CONSTANTS.defaultSDKs, ...CONSTANTS.additionalSDKs]; // Set the pubSub URL if present process.env.PUB_SUB_URL = new URLSearchParams(window.location.search).get('pubSubUrl'); diff --git a/src/IntentReader.js b/src/IntentReader.js index 427b9c94..b2b6bcda 100644 --- a/src/IntentReader.js +++ b/src/IntentReader.js @@ -34,7 +34,6 @@ import GetPubSubStatusHandler from './pubsub/handlers/GetPubSubStatusHandler'; import CallMethodHandler from './pubsub/handlers/CallMethodHandler'; import DataFetchHandler from './pubsub/handlers/DataFetchHandler'; import HealthCheckHandler from './pubsub/handlers/HealthCheckHandler'; -import RunTestHandler from './pubsub/handlers/RunTestHandler'; import RegisterEventHandler from './pubsub/handlers/RegisterEventHandler'; import ClearEventListeners from './pubsub/handlers/ClearEventListeners'; import ClearEventHandler from './pubsub/handlers/clearEventHandler'; @@ -45,6 +44,7 @@ import GetEventResponse from './pubsub/handlers/GetEventResponse'; import GetMethodResponseHandler from './pubsub/handlers/GetMethodResponseHandler'; import VisibilityStateHandler from '../src/pubsub/handlers/VisibilityStateHandler'; import LifecycleMethodHandler from './pubsub/handlers/LifecycleMethodHandler'; +import RunTestHandler from 'RunTestHandler'; const logger = require('./utils/Logger')('IntentReader.js'); diff --git a/src/utils/Utils.js b/src/utils/Utils.js index 3ba1d442..4ac82dca 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -119,6 +119,7 @@ async function getschemaValidationDone(name, response, sdkType) { function censorData(methodName, response) { try { const json = censorDataJson; + methodName = methodName.charAt(0).toUpperCase() + methodName.slice(1); if (methodName in json) { for (let i = 0; i < json[methodName].field.length; i++) { if (response[json[methodName].field[i]]) { diff --git a/test/jest.config.js b/test/jest.config.js index aff43ae3..b6e49c41 100644 --- a/test/jest.config.js +++ b/test/jest.config.js @@ -34,6 +34,7 @@ module.exports = { '^EventInvocation$': '/../src//EventInvocation.js', '^IntentReader$': '../src/IntentReader.js', '^CensorData$': '/../src/source/censorData.json', + '^RunTestHandler$': '/../src/pubsub/handlers/RunTestHandler.js', }, collectCoverage: true, coverageThreshold: { diff --git a/webpack.dev.js b/webpack.dev.js index 123e7c79..1cae4777 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -108,6 +108,10 @@ module.exports = { name: 'CensorData', alias: ['/plugins/censorData.json', '/src/source/censorData.json'], }, + { + name: 'RunTestHandler', + alias: ['/plugins/runTestHandler.js', '/src/pubsub/handlers/RunTestHandler.js'], + }, ], 'resolve' ), diff --git a/webpack.prod.js b/webpack.prod.js index 5778ea61..4a58f527 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -91,6 +91,10 @@ module.exports = { name: 'CensorData', alias: ['/plugins/censorData.json', '/src/source/censorData.json'], }, + { + name: 'RunTestHandler', + alias: ['/plugins/runTestHandler.js', '/src/pubsub/handlers/RunTestHandler.js'], + }, ], 'resolve' ),