diff --git a/packages/config/src/utils/normalize.js b/packages/config/src/utils/normalize.js index 844fc4de3..1b07c4c42 100644 --- a/packages/config/src/utils/normalize.js +++ b/packages/config/src/utils/normalize.js @@ -5,8 +5,7 @@ import { getSchema } from '../validate.js'; const CAMELCASE_MAP = new Map([ ['css', 'CSS'], ['javascript', 'JavaScript'], - ['dom', 'DOM'], - ['xpaths', 'XPaths'] + ['dom', 'DOM'] ]); // Regular expression that matches words from boundaries or consecutive casing diff --git a/packages/config/test/index.test.js b/packages/config/test/index.test.js index d30ed38b9..c870bd9e5 100644 --- a/packages/config/test/index.test.js +++ b/packages/config/test/index.test.js @@ -1212,7 +1212,7 @@ describe('PercyConfig', () => { enableJavaScript: false, disableShadowDOM: true, cliEnableJavaScript: true, - ignoreRegionXPaths: [''], + ignoreRegionXpaths: [''], enableLayout: false }); }); @@ -1226,7 +1226,7 @@ describe('PercyConfig', () => { enableJavaScript: false, disableShadowDOM: true, cliEnableJavaScript: true, - ignoreRegionXPaths: [''], + ignoreRegionXpaths: [''], enableLayout: false }, { kebab: true })).toEqual({ 'foo-bar': 'baz', @@ -1250,7 +1250,7 @@ describe('PercyConfig', () => { enableJavaScript: false, disableShadowDOM: true, cliEnableJavaScript: true, - ignoreRegionXPaths: [''], + ignoreRegionXpaths: [''], enableLayout: false }, { snake: true })).toEqual({ foo_bar: 'baz', diff --git a/packages/core/src/config.js b/packages/core/src/config.js index 7f20c564a..763ad06db 100644 --- a/packages/core/src/config.js +++ b/packages/core/src/config.js @@ -87,7 +87,7 @@ export const configSchema = { type: 'string' } }, - considerRegionXPaths: { + considerRegionXpaths: { type: 'array', items: { type: 'string' diff --git a/packages/core/src/utils.js b/packages/core/src/utils.js index 6e055a71a..e3a9bab57 100644 --- a/packages/core/src/utils.js +++ b/packages/core/src/utils.js @@ -46,7 +46,7 @@ export function percyAutomateRequestHandler(req, percy) { ignoreRegionSelectors: percy.config.snapshot.ignoreRegions?.ignoreRegionSelectors, ignoreRegionXpaths: percy.config.snapshot.ignoreRegions?.ignoreRegionXpaths, considerRegionSelectors: percy.config.snapshot.considerRegions?.considerRegionSelectors, - considerRegionXPaths: percy.config.snapshot.considerRegions?.considerRegionXPaths + considerRegionXpaths: percy.config.snapshot.considerRegions?.considerRegionXpaths }, camelCasedOptions ], (path, prev, next) => { diff --git a/packages/core/test/api.test.js b/packages/core/test/api.test.js index 06670302f..536037c13 100644 --- a/packages/core/test/api.test.js +++ b/packages/core/test/api.test.js @@ -277,7 +277,7 @@ describe('API Server', () => { percy.config.snapshot.percyCSS = '.global { color: blue }'; percy.config.snapshot.freezeAnimation = false; percy.config.snapshot.ignoreRegions = { ignoreRegionSelectors: ['.selector-global'] }; - percy.config.snapshot.considerRegions = { considerRegionXPaths: ['/xpath-global'] }; + percy.config.snapshot.considerRegions = { considerRegionXpaths: ['/xpath-global'] }; await expectAsync(request('/percy/automateScreenshot', { body: { @@ -302,8 +302,8 @@ describe('API Server', () => { freezeAnimation: true, percyCSS: '.global { color: blue }\n.percy-screenshot: { color: red }', ignoreRegionSelectors: ['.selector-global'], - ignoreRegionXPaths: ['/xpath-per-screenshot'], - considerRegionXPaths: ['/xpath-global', '/xpath-per-screenshot'] + ignoreRegionXpaths: ['/xpath-per-screenshot'], + considerRegionXpaths: ['/xpath-global', '/xpath-per-screenshot'] } }));