diff --git a/app/common/renderer/actions/Session.js b/app/common/renderer/actions/Session.js index d5c6a7a81..129590e7d 100644 --- a/app/common/renderer/actions/Session.js +++ b/app/common/renderer/actions/Session.js @@ -241,17 +241,17 @@ export function newSession(caps, attachSessId = null) { // Get capabilities and interpolate environment variables let desiredCapabilities = caps ? getCapsObject(caps) : {}; - + // Modify this section to handle W3C capabilities format if (desiredCapabilities.alwaysMatch) { desiredCapabilities.alwaysMatch = interpolateEnvironmentVariables( desiredCapabilities.alwaysMatch, - environmentVariables + environmentVariables, ); } else { desiredCapabilities = interpolateEnvironmentVariables( desiredCapabilities, - environmentVariables + environmentVariables, ); } @@ -1225,7 +1225,7 @@ export function setEnvironmentVariables(envVars) { export function loadEnvironmentVariables() { return async (dispatch) => { - const envVars = await getSetting(ENVIRONMENT_VARIABLES) || []; + const envVars = (await getSetting(ENVIRONMENT_VARIABLES)) || []; dispatch({type: SET_ENVIRONMENT_VARIABLES, envVars}); }; } diff --git a/app/common/renderer/components/Session/EnvironmentVariables.jsx b/app/common/renderer/components/Session/EnvironmentVariables.jsx index 2691fe3ca..136722e27 100644 --- a/app/common/renderer/components/Session/EnvironmentVariables.jsx +++ b/app/common/renderer/components/Session/EnvironmentVariables.jsx @@ -86,7 +86,13 @@ const EnvironmentVariables = ({t, envVars, addVariable, deleteVariable}) => { - +
); diff --git a/app/common/renderer/reducers/Inspector.js b/app/common/renderer/reducers/Inspector.js index 42c8e9f18..650fa3751 100644 --- a/app/common/renderer/reducers/Inspector.js +++ b/app/common/renderer/reducers/Inspector.js @@ -141,7 +141,6 @@ let nextState; export default function inspector(state = INITIAL_STATE, action) { switch (action.type) { - case SET_SOURCE_AND_SCREENSHOT: return { ...state, @@ -677,7 +676,7 @@ export default function inspector(state = INITIAL_STATE, action) { ...state, environmentVariables: [ ...(state.environmentVariables || []), - {key: action.key, value: action.value} + {key: action.key, value: action.value}, ], }; @@ -685,7 +684,7 @@ export default function inspector(state = INITIAL_STATE, action) { return { ...state, environmentVariables: (state.environmentVariables || []).filter( - (envVar) => envVar.key !== action.key + (envVar) => envVar.key !== action.key, ), }; diff --git a/app/common/renderer/reducers/Session.js b/app/common/renderer/reducers/Session.js index 12541daa1..d7bbdfbc2 100644 --- a/app/common/renderer/reducers/Session.js +++ b/app/common/renderer/reducers/Session.js @@ -41,7 +41,7 @@ import { SWITCHED_TABS, SET_ENVIRONMENT_VARIABLES, ADD_ENVIRONMENT_VARIABLE, - DELETE_ENVIRONMENT_VARIABLE + DELETE_ENVIRONMENT_VARIABLE, } from '../actions/Session'; import {SERVER_TYPES, SESSION_BUILDER_TABS} from '../constants/session-builder';