fix(appium): ensure appiumCliDest is recognized by config file normalizer
Closes
MODIFY
packages/appium/lib/config-file.js
packages/appium/lib/config-file.js
@@ -154,9 +154,8 @@ export function normalizeConfig(config) {
const normalize = (config, section) => {
const obj = _.isUndefined(section) ? config : _.get(config, section, config);
- const mappedObj = _.mapKeys(
- obj,
- (__, prop) => schema.properties[prop]?.appiumCliDest ?? _.camelCase(prop)
+ const mappedObj = _.mapKeys(obj, (__, prop) =>
+ _.get(schema, `properties.server.properties[${prop}].appiumCliDest`, _.camelCase(prop))
);
return _.mapValues(mappedObj, (value, property) => {

MODIFY
packages/appium/test/unit/parser.spec.js
packages/appium/test/unit/parser.spec.js
@@ -148,6 +148,10 @@ describe('parser', function () {
it('should respect --relaxed-security', function () {
p.parseArgs(['--relaxed-security']).should.have.property('relaxedSecurityEnabled', true);
});
+
+ it('should recognize --log-level', function () {
+ p.parseArgs(['--log-level', 'debug']).should.have.property('loglevel', 'debug');
+ });
});
describe('extension arguments', function () {

fix(appium): ensure appiumCliDest is recognized by config file normalizer

Closes #17638