diff --git a/packages/core/src/utils.js b/packages/core/src/utils.js index ea210323e..24bb37002 100644 --- a/packages/core/src/utils.js +++ b/packages/core/src/utils.js @@ -48,7 +48,8 @@ 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, + version: 'v2' }, camelCasedOptions ], (path, prev, next) => { diff --git a/packages/core/test/api.test.js b/packages/core/test/api.test.js index d0a5a620d..8a3f6493b 100644 --- a/packages/core/test/api.test.js +++ b/packages/core/test/api.test.js @@ -307,7 +307,8 @@ describe('API Server', () => { percyCSS: '.global { color: blue }\n.percy-screenshot: { color: red }', ignoreRegionSelectors: ['.selector-global'], ignoreRegionXpaths: ['/xpath-per-screenshot'], - considerRegionXpaths: ['/xpath-global', '/xpath-per-screenshot'] + considerRegionXpaths: ['/xpath-global', '/xpath-per-screenshot'], + version: 'v2' } })); diff --git a/packages/webdriver-utils/src/providers/automateProvider.js b/packages/webdriver-utils/src/providers/automateProvider.js index 882b71902..9ffa6f3bf 100644 --- a/packages/webdriver-utils/src/providers/automateProvider.js +++ b/packages/webdriver-utils/src/providers/automateProvider.js @@ -127,7 +127,6 @@ export default class AutomateProvider extends GenericProvider { if (!this.driver) throw new Error('Driver is null, please initialize driver with createDriver().'); log.debug('Starting actual screenshotting phase'); const dpr = await this.metaData.devicePixelRatio(); - this.options.version = 'v2'; const response = await TimeIt.run('percyScreenshot:screenshot', async () => { return await this.browserstackExecutor('percyScreenshot', { state: 'screenshot',