Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added support for extracting and passing header and footer heights #1305

Merged
merged 28 commits into from
Jul 14, 2023

Conversation

nilshah98
Copy link
Contributor

@nilshah98 nilshah98 commented Jul 7, 2023

Context -

  • When capturing screenshots for mobile devices we have observed instances where we are also adding nav / status / url bars to the screenshot image.
  • We want to remove these extra heights as they are not the part of the webpage.
  • To remove these elements, we need some way to identify the device / platform / browser combination and subsequently find the heights for the sections to remove.

@nilshah98 nilshah98 marked this pull request as ready for review July 7, 2023 05:22
@nilshah98 nilshah98 requested review from a team, yashdsaraf and Amit3200 and removed request for a team July 13, 2023 04:37
const resolution = await this.metaData.screenResolution();
const orientation = this.metaData.orientation();
[this.header, this.footer] = await this.getHeaderFooter();
// for android window size only constitutes of browser viewport, hence adding nav / status / url bar heights
height = this.capabilities.platformName && this.capabilities.platformName.toLowerCase() === 'android' ? height + this.header + this.footer : height;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all the devices will have this please confirm that this will not break for ios and desktop. Also do we not need to do this on ios?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check resolver once where we check divide the flow between mobileResolver and desktopResolver, check that flow once as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using metaData.osName() now.
verified that it is working as expected and is present for both desktop and mobile metadata resolvers.

@nilshah98 nilshah98 merged commit 079afd9 into poa-base-branch Jul 14, 2023
32 of 33 checks passed
@nilshah98 nilshah98 deleted the PPLT-2192 branch July 14, 2023 12:25
itsjwala pushed a commit that referenced this pull request Aug 7, 2023
* ✨ Integrate selenium and appium session support (#1239)

* [PPLT-2008] POC CLI

* [refactor] remove selenium-webdriver dependency in poa

* [refactor] rename driver2 -> driver

* [refactor] remove all usage of metaData

* [refactor] rename getTag1 -> getTag

* [chore] remove unused metaData resolvers

* [feat] add screenshot feature for driverWrapper

* [refactor] use await in function calls + use fs/promises

* [refactor] remove un-necessary async-await in metadata resolvers

* [wip] added genericProvider

* [feat] added support for automateprovider + debugUrl

* [chore] update packages.json

* [chore] remove snapshotName from constructor initialization

* [chore] rename endpoint driverWrapper -> automateScreenshot

* [refactor] move driverResolver/driverWrapper -> driver.js

* [refactor] use cli-poa/main.js only for import and export, use AutomateProvider in percy.js

* [chore] lint using --fix flag

* [chore] remove constructor from automateProvider as it is just initializing parent

* [test] instantiate tests

* [test] verify browserstackExecutor passed correct arguments

* [fix] await on response.json()

* [chore] add test and test:coverage scripts

* [test] update automateProvider coverage to 100%

* [test] add tests for providerResolver

* [test] add commonMetaDataResolver.test.js

* [test] added driver check for commonMetaDataResolver

* [test] added desktop and mobile metadata resolver tests

* [chore] lint using lint:fix

* [test] added genericProvider tests

* [chore] lint using lint:fix

* [refactor] move automateScreenshot to poa

* [refactor] rename cli-poa to selenium-utils

* [refactor] rename selenium-utils -> webdriver-utils

* [refactor] instantiate logging in individual files

* [chore] updated webdriver-utils package.json

* [feat] updated getTag as per BYOS contract

* [feat] update test.yml + move from main.js to index.js for tests to run smoothly

* [chore] lint using yarn lint --fix

* [chore] fix lint errors

* [feat] add support for adding individual coverage threshold levels

* [chore] rename commonMetadata to Metadata

* [fix] update content-type headers for executeScript call

* [fix] handle embedded url

* [feat] use sdk-utils/requests instead of node-fetch

* [feat] call percy.upload(...) directly which skips latency due to serialise and deserialise

* [refactor] pass base64 data directly instead of writing to temp files

* [chore] yarn lint fix

* [refactor] use ternary opeartor instead of if-else

* [fix] refactor conditional imports

* [refactor] switch to importing default and extract props from it

* [test] added tests for webdriver-utils/driver

* [test] added genericProvider tests

* [chore] removed fallback parameters as we always pass some capabilities

* [refactor] remove customized threshold support for nyc

* [chore] lint using fix

* [feat] added cache support

* [test] add cache, genericProvider tests for webdriver-utils

* [refactor] webdriverutils to class based structure for better testability

* [test] added api.test.js

* [test] setup https server + tests for requests

* [chore] lint using lint --fix

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* POA Ignore Region changes (#1250)

* [PPLT-2008] POC CLI

* [refactor] remove selenium-webdriver dependency in poa

* [refactor] rename driver2 -> driver

* [refactor] remove all usage of metaData

* [refactor] rename getTag1 -> getTag

* [chore] remove unused metaData resolvers

* [feat] add screenshot feature for driverWrapper

* [refactor] use await in function calls + use fs/promises

* [refactor] remove un-necessary async-await in metadata resolvers

* [wip] added genericProvider

* [feat] added support for automateprovider + debugUrl

* [chore] update packages.json

* [chore] remove snapshotName from constructor initialization

* [chore] rename endpoint driverWrapper -> automateScreenshot

* [refactor] move driverResolver/driverWrapper -> driver.js

* [refactor] use cli-poa/main.js only for import and export, use AutomateProvider in percy.js

* [chore] lint using --fix flag

* [chore] remove constructor from automateProvider as it is just initializing parent

* [test] instantiate tests

* [test] verify browserstackExecutor passed correct arguments

* [fix] await on response.json()

* [chore] add test and test:coverage scripts

* [test] update automateProvider coverage to 100%

* [test] add tests for providerResolver

* [test] add commonMetaDataResolver.test.js

* [test] added driver check for commonMetaDataResolver

* [test] added desktop and mobile metadata resolver tests

* [chore] lint using lint:fix

* [test] added genericProvider tests

* [chore] lint using lint:fix

* [refactor] move automateScreenshot to poa

* [refactor] rename cli-poa to selenium-utils

* [refactor] rename selenium-utils -> webdriver-utils

* [refactor] instantiate logging in individual files

* [chore] updated webdriver-utils package.json

* [feat] updated getTag as per BYOS contract

* [feat] update test.yml + move from main.js to index.js for tests to run smoothly

* [chore] lint using yarn lint --fix

* [chore] fix lint errors

* [feat] add support for adding individual coverage threshold levels

* [chore] rename commonMetadata to Metadata

* [fix] update content-type headers for executeScript call

* [fix] handle embedded url

* [feat] use sdk-utils/requests instead of node-fetch

* [feat] call percy.upload(...) directly which skips latency due to serialise and deserialise

* [refactor] pass base64 data directly instead of writing to temp files

* [chore] yarn lint fix

* [refactor] use ternary opeartor instead of if-else

* [fix] refactor conditional imports

* [refactor] switch to importing default and extract props from it

* [test] added tests for webdriver-utils/driver

* [test] added genericProvider tests

* [chore] removed fallback parameters as we always pass some capabilities

* [refactor] remove customized threshold support for nyc

* [chore] lint using fix

* [feat] added cache support

* Changes for js sdk POA

* [test] add cache, genericProvider tests for webdriver-utils

* Changes for ignoreRegion

* Fix testcase and edge case

* Fix test case

* Added test for ignore region

* Test case for driver

* Add testcase for postScreenshot

* Fixed tests and addressed comments

* Updated name as per suggestion

* Fix test case

* Changes according to comments

* Changes acc to comment

* rename ignore region selenium element to generic name

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>
Co-authored-by: nilshah98 <neelshah.1998@gmail.com>

* Feat: Send domInfoSha & PoA optimizations (#1270)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* Appium JS SDK related cli changes (#1282)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* Added logic for session type for js sdk

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Fix type logic for js sdk

* Added test

* Fix test case

* Ignore region fix

* Feat: Send domInfoSha & PoA optimizations (#1270)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* undo changes

* Pplt 2118 resolution and desktop tweaks (#1291)

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

* Adding resolution details

* Adding default resolutions and making timings

* Adding Tests

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>
Co-authored-by: Neel Shah <neelshah.1998@gmail.com>

* [PER-2063] Percy upload for BYOS (#1288)

* PER-2063 percy-upload-logic-change

* PR comments resolve

* added stripExtension test

* fix tests

* fix test

* error message fix

* update error message

* update name

---------

Co-authored-by: “Shahid <“shahid.k@browserstack.com”>
Co-authored-by: Samarjeet <samarjeet@browserstack.com>

* making webutils package access public

* 🔖 v1.27.0-alpha.0

* Mark tag as alpha on sub-packages

* Poa/start support (#1302)

* Adding Start Stop Support for PoA

* Adding tests to improve coverage

* Make Freeze Animation false by default (#1309)

* Make Freeze Animation false by default

* Updating Unit Test + More Check

* Adding Dpr fixes (#1303)

* feat: added support for extracting and passing header and footer heights (#1305)

* feat: added support for extracting and passing header and footer heights

* test: getHeaderFooter

* chore: lint using fix

* fix: use header and footer height for calculating tag

* test: updated percy-cli tests

* test: update expectations for header and footer heights for getTiles;

* feat: updated getTiles function to use header and footer params, so that it is more testable

* feat: update comparison tag logic

* test: updated getTag spec

* chore: lint using yarn

* feat: add support for header and footer extraction;

* test: update test for extracting header and footer

* chore: lint using fix

* fix: use metadata.osName to detect android

* test: update generaticProvider tests

* chore: added some logging

* fix: webdriver-utils/index logging

* chore: lint using fix

* feat: added caching support for devicesJson

* chore: lint using fix

* test: updated getHeaderFooter spec

* chore: lint fix

* feat: change desktop deviceName format

* test: increase coverage

* chore: add comments around skipping request.test from browser tests

* chore: add webdriver-utils as dependency for core package

* chore: resolve TODO comments

* chore: add percy/webdriver-utils to windows ci workflow

* :bookmark v1.27.0-beta.0 (#1313)

* :bookmark v1.27.0-beta.0

* Update publishConfig tag as well

* Support Old App Percy Tokens (#1321)

* Support Old App Percy Tokens

* Adding logs and tests for branch

* Fixing broken tests

* Increase coverage

* Increase coverage - 1

* Increase coverage - 2

* Increase coverage - 3

* [PER-2277] Add consider regions (#1318)

* Add consider regions

* consider regions client changes

* update schema

* lint fix

* Consider region schema fix (#1328)

* Consider region schema fix

* selector name fix

* [PPLT-2230] Add anchor comment to executeScript (#1334)

* feat: add anchor comment

* fix: do not add anchor_comment for browserstack_executor

* Adding support for legacy protocol (#1323)

* feat: publichConfig -> beta

---------

Co-authored-by: Neel Shah <neelshah.1998@gmail.com>
Co-authored-by: chinmay-browserstack <92926953+chinmay-browserstack@users.noreply.github.com>
Co-authored-by: shahidk8 <133638356+shahidk8@users.noreply.github.com>
Co-authored-by: “Shahid <“shahid.k@browserstack.com”>
Co-authored-by: Samarjeet <samarjeet@browserstack.com>
Co-authored-by: Samarjeet <samarsault@gmail.com>
rishigupta1599 pushed a commit that referenced this pull request Aug 7, 2023
* ✨ Integrate selenium and appium session support (#1239)

* [PPLT-2008] POC CLI

* [refactor] remove selenium-webdriver dependency in poa

* [refactor] rename driver2 -> driver

* [refactor] remove all usage of metaData

* [refactor] rename getTag1 -> getTag

* [chore] remove unused metaData resolvers

* [feat] add screenshot feature for driverWrapper

* [refactor] use await in function calls + use fs/promises

* [refactor] remove un-necessary async-await in metadata resolvers

* [wip] added genericProvider

* [feat] added support for automateprovider + debugUrl

* [chore] update packages.json

* [chore] remove snapshotName from constructor initialization

* [chore] rename endpoint driverWrapper -> automateScreenshot

* [refactor] move driverResolver/driverWrapper -> driver.js

* [refactor] use cli-poa/main.js only for import and export, use AutomateProvider in percy.js

* [chore] lint using --fix flag

* [chore] remove constructor from automateProvider as it is just initializing parent

* [test] instantiate tests

* [test] verify browserstackExecutor passed correct arguments

* [fix] await on response.json()

* [chore] add test and test:coverage scripts

* [test] update automateProvider coverage to 100%

* [test] add tests for providerResolver

* [test] add commonMetaDataResolver.test.js

* [test] added driver check for commonMetaDataResolver

* [test] added desktop and mobile metadata resolver tests

* [chore] lint using lint:fix

* [test] added genericProvider tests

* [chore] lint using lint:fix

* [refactor] move automateScreenshot to poa

* [refactor] rename cli-poa to selenium-utils

* [refactor] rename selenium-utils -> webdriver-utils

* [refactor] instantiate logging in individual files

* [chore] updated webdriver-utils package.json

* [feat] updated getTag as per BYOS contract

* [feat] update test.yml + move from main.js to index.js for tests to run smoothly

* [chore] lint using yarn lint --fix

* [chore] fix lint errors

* [feat] add support for adding individual coverage threshold levels

* [chore] rename commonMetadata to Metadata

* [fix] update content-type headers for executeScript call

* [fix] handle embedded url

* [feat] use sdk-utils/requests instead of node-fetch

* [feat] call percy.upload(...) directly which skips latency due to serialise and deserialise

* [refactor] pass base64 data directly instead of writing to temp files

* [chore] yarn lint fix

* [refactor] use ternary opeartor instead of if-else

* [fix] refactor conditional imports

* [refactor] switch to importing default and extract props from it

* [test] added tests for webdriver-utils/driver

* [test] added genericProvider tests

* [chore] removed fallback parameters as we always pass some capabilities

* [refactor] remove customized threshold support for nyc

* [chore] lint using fix

* [feat] added cache support

* [test] add cache, genericProvider tests for webdriver-utils

* [refactor] webdriverutils to class based structure for better testability

* [test] added api.test.js

* [test] setup https server + tests for requests

* [chore] lint using lint --fix

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* POA Ignore Region changes (#1250)

* [PPLT-2008] POC CLI

* [refactor] remove selenium-webdriver dependency in poa

* [refactor] rename driver2 -> driver

* [refactor] remove all usage of metaData

* [refactor] rename getTag1 -> getTag

* [chore] remove unused metaData resolvers

* [feat] add screenshot feature for driverWrapper

* [refactor] use await in function calls + use fs/promises

* [refactor] remove un-necessary async-await in metadata resolvers

* [wip] added genericProvider

* [feat] added support for automateprovider + debugUrl

* [chore] update packages.json

* [chore] remove snapshotName from constructor initialization

* [chore] rename endpoint driverWrapper -> automateScreenshot

* [refactor] move driverResolver/driverWrapper -> driver.js

* [refactor] use cli-poa/main.js only for import and export, use AutomateProvider in percy.js

* [chore] lint using --fix flag

* [chore] remove constructor from automateProvider as it is just initializing parent

* [test] instantiate tests

* [test] verify browserstackExecutor passed correct arguments

* [fix] await on response.json()

* [chore] add test and test:coverage scripts

* [test] update automateProvider coverage to 100%

* [test] add tests for providerResolver

* [test] add commonMetaDataResolver.test.js

* [test] added driver check for commonMetaDataResolver

* [test] added desktop and mobile metadata resolver tests

* [chore] lint using lint:fix

* [test] added genericProvider tests

* [chore] lint using lint:fix

* [refactor] move automateScreenshot to poa

* [refactor] rename cli-poa to selenium-utils

* [refactor] rename selenium-utils -> webdriver-utils

* [refactor] instantiate logging in individual files

* [chore] updated webdriver-utils package.json

* [feat] updated getTag as per BYOS contract

* [feat] update test.yml + move from main.js to index.js for tests to run smoothly

* [chore] lint using yarn lint --fix

* [chore] fix lint errors

* [feat] add support for adding individual coverage threshold levels

* [chore] rename commonMetadata to Metadata

* [fix] update content-type headers for executeScript call

* [fix] handle embedded url

* [feat] use sdk-utils/requests instead of node-fetch

* [feat] call percy.upload(...) directly which skips latency due to serialise and deserialise

* [refactor] pass base64 data directly instead of writing to temp files

* [chore] yarn lint fix

* [refactor] use ternary opeartor instead of if-else

* [fix] refactor conditional imports

* [refactor] switch to importing default and extract props from it

* [test] added tests for webdriver-utils/driver

* [test] added genericProvider tests

* [chore] removed fallback parameters as we always pass some capabilities

* [refactor] remove customized threshold support for nyc

* [chore] lint using fix

* [feat] added cache support

* Changes for js sdk POA

* [test] add cache, genericProvider tests for webdriver-utils

* Changes for ignoreRegion

* Fix testcase and edge case

* Fix test case

* Added test for ignore region

* Test case for driver

* Add testcase for postScreenshot

* Fixed tests and addressed comments

* Updated name as per suggestion

* Fix test case

* Changes according to comments

* Changes acc to comment

* rename ignore region selenium element to generic name

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>
Co-authored-by: nilshah98 <neelshah.1998@gmail.com>

* Feat: Send domInfoSha & PoA optimizations (#1270)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* Appium JS SDK related cli changes (#1282)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* Added logic for session type for js sdk

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Fix type logic for js sdk

* Added test

* Fix test case

* Ignore region fix

* Feat: Send domInfoSha & PoA optimizations (#1270)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* undo changes

* Pplt 2118 resolution and desktop tweaks (#1291)

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

* Adding resolution details

* Adding default resolutions and making timings

* Adding Tests

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>
Co-authored-by: Neel Shah <neelshah.1998@gmail.com>

* [PER-2063] Percy upload for BYOS (#1288)

* PER-2063 percy-upload-logic-change

* PR comments resolve

* added stripExtension test

* fix tests

* fix test

* error message fix

* update error message

* update name

---------

Co-authored-by: “Shahid <“shahid.k@browserstack.com”>
Co-authored-by: Samarjeet <samarjeet@browserstack.com>

* making webutils package access public

* 🔖 v1.27.0-alpha.0

* Mark tag as alpha on sub-packages

* Poa/start support (#1302)

* Adding Start Stop Support for PoA

* Adding tests to improve coverage

* Make Freeze Animation false by default (#1309)

* Make Freeze Animation false by default

* Updating Unit Test + More Check

* Adding Dpr fixes (#1303)

* feat: added support for extracting and passing header and footer heights (#1305)

* feat: added support for extracting and passing header and footer heights

* test: getHeaderFooter

* chore: lint using fix

* fix: use header and footer height for calculating tag

* test: updated percy-cli tests

* test: update expectations for header and footer heights for getTiles;

* feat: updated getTiles function to use header and footer params, so that it is more testable

* feat: update comparison tag logic

* test: updated getTag spec

* chore: lint using yarn

* feat: add support for header and footer extraction;

* test: update test for extracting header and footer

* chore: lint using fix

* fix: use metadata.osName to detect android

* test: update generaticProvider tests

* chore: added some logging

* fix: webdriver-utils/index logging

* chore: lint using fix

* feat: added caching support for devicesJson

* chore: lint using fix

* test: updated getHeaderFooter spec

* chore: lint fix

* feat: change desktop deviceName format

* test: increase coverage

* chore: add comments around skipping request.test from browser tests

* chore: add webdriver-utils as dependency for core package

* chore: resolve TODO comments

* chore: add percy/webdriver-utils to windows ci workflow

* :bookmark v1.27.0-beta.0 (#1313)

* :bookmark v1.27.0-beta.0

* Update publishConfig tag as well

* Support Old App Percy Tokens (#1321)

* Support Old App Percy Tokens

* Adding logs and tests for branch

* Fixing broken tests

* Increase coverage

* Increase coverage - 1

* Increase coverage - 2

* Increase coverage - 3

* [PER-2277] Add consider regions (#1318)

* Add consider regions

* consider regions client changes

* update schema

* lint fix

* Consider region schema fix (#1328)

* Consider region schema fix

* selector name fix

* [PPLT-2230] Add anchor comment to executeScript (#1334)

* feat: add anchor comment

* fix: do not add anchor_comment for browserstack_executor

* Adding support for legacy protocol (#1323)

* feat: publichConfig -> beta

---------

Co-authored-by: Neel Shah <neelshah.1998@gmail.com>
Co-authored-by: chinmay-browserstack <92926953+chinmay-browserstack@users.noreply.github.com>
Co-authored-by: shahidk8 <133638356+shahidk8@users.noreply.github.com>
Co-authored-by: “Shahid <“shahid.k@browserstack.com”>
Co-authored-by: Samarjeet <samarjeet@browserstack.com>
Co-authored-by: Samarjeet <samarsault@gmail.com>
rishigupta1599 pushed a commit that referenced this pull request Aug 7, 2023
…hts (#1305)

* feat: added support for extracting and passing header and footer heights

* test: getHeaderFooter

* chore: lint using fix

* fix: use header and footer height for calculating tag

* test: updated percy-cli tests

* test: update expectations for header and footer heights for getTiles;

* feat: updated getTiles function to use header and footer params, so that it is more testable

* feat: update comparison tag logic

* test: updated getTag spec

* chore: lint using yarn

* feat: add support for header and footer extraction;

* test: update test for extracting header and footer

* chore: lint using fix

* fix: use metadata.osName to detect android

* test: update generaticProvider tests

* chore: added some logging

* fix: webdriver-utils/index logging

* chore: lint using fix

* feat: added caching support for devicesJson

* chore: lint using fix

* test: updated getHeaderFooter spec

* chore: lint fix

* feat: change desktop deviceName format

* test: increase coverage

* chore: add comments around skipping request.test from browser tests

* chore: add webdriver-utils as dependency for core package

* chore: resolve TODO comments
rishigupta1599 pushed a commit that referenced this pull request Aug 7, 2023
* ✨ Integrate selenium and appium session support (#1239)

* [PPLT-2008] POC CLI

* [refactor] remove selenium-webdriver dependency in poa

* [refactor] rename driver2 -> driver

* [refactor] remove all usage of metaData

* [refactor] rename getTag1 -> getTag

* [chore] remove unused metaData resolvers

* [feat] add screenshot feature for driverWrapper

* [refactor] use await in function calls + use fs/promises

* [refactor] remove un-necessary async-await in metadata resolvers

* [wip] added genericProvider

* [feat] added support for automateprovider + debugUrl

* [chore] update packages.json

* [chore] remove snapshotName from constructor initialization

* [chore] rename endpoint driverWrapper -> automateScreenshot

* [refactor] move driverResolver/driverWrapper -> driver.js

* [refactor] use cli-poa/main.js only for import and export, use AutomateProvider in percy.js

* [chore] lint using --fix flag

* [chore] remove constructor from automateProvider as it is just initializing parent

* [test] instantiate tests

* [test] verify browserstackExecutor passed correct arguments

* [fix] await on response.json()

* [chore] add test and test:coverage scripts

* [test] update automateProvider coverage to 100%

* [test] add tests for providerResolver

* [test] add commonMetaDataResolver.test.js

* [test] added driver check for commonMetaDataResolver

* [test] added desktop and mobile metadata resolver tests

* [chore] lint using lint:fix

* [test] added genericProvider tests

* [chore] lint using lint:fix

* [refactor] move automateScreenshot to poa

* [refactor] rename cli-poa to selenium-utils

* [refactor] rename selenium-utils -> webdriver-utils

* [refactor] instantiate logging in individual files

* [chore] updated webdriver-utils package.json

* [feat] updated getTag as per BYOS contract

* [feat] update test.yml + move from main.js to index.js for tests to run smoothly

* [chore] lint using yarn lint --fix

* [chore] fix lint errors

* [feat] add support for adding individual coverage threshold levels

* [chore] rename commonMetadata to Metadata

* [fix] update content-type headers for executeScript call

* [fix] handle embedded url

* [feat] use sdk-utils/requests instead of node-fetch

* [feat] call percy.upload(...) directly which skips latency due to serialise and deserialise

* [refactor] pass base64 data directly instead of writing to temp files

* [chore] yarn lint fix

* [refactor] use ternary opeartor instead of if-else

* [fix] refactor conditional imports

* [refactor] switch to importing default and extract props from it

* [test] added tests for webdriver-utils/driver

* [test] added genericProvider tests

* [chore] removed fallback parameters as we always pass some capabilities

* [refactor] remove customized threshold support for nyc

* [chore] lint using fix

* [feat] added cache support

* [test] add cache, genericProvider tests for webdriver-utils

* [refactor] webdriverutils to class based structure for better testability

* [test] added api.test.js

* [test] setup https server + tests for requests

* [chore] lint using lint --fix

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* POA Ignore Region changes (#1250)

* [PPLT-2008] POC CLI

* [refactor] remove selenium-webdriver dependency in poa

* [refactor] rename driver2 -> driver

* [refactor] remove all usage of metaData

* [refactor] rename getTag1 -> getTag

* [chore] remove unused metaData resolvers

* [feat] add screenshot feature for driverWrapper

* [refactor] use await in function calls + use fs/promises

* [refactor] remove un-necessary async-await in metadata resolvers

* [wip] added genericProvider

* [feat] added support for automateprovider + debugUrl

* [chore] update packages.json

* [chore] remove snapshotName from constructor initialization

* [chore] rename endpoint driverWrapper -> automateScreenshot

* [refactor] move driverResolver/driverWrapper -> driver.js

* [refactor] use cli-poa/main.js only for import and export, use AutomateProvider in percy.js

* [chore] lint using --fix flag

* [chore] remove constructor from automateProvider as it is just initializing parent

* [test] instantiate tests

* [test] verify browserstackExecutor passed correct arguments

* [fix] await on response.json()

* [chore] add test and test:coverage scripts

* [test] update automateProvider coverage to 100%

* [test] add tests for providerResolver

* [test] add commonMetaDataResolver.test.js

* [test] added driver check for commonMetaDataResolver

* [test] added desktop and mobile metadata resolver tests

* [chore] lint using lint:fix

* [test] added genericProvider tests

* [chore] lint using lint:fix

* [refactor] move automateScreenshot to poa

* [refactor] rename cli-poa to selenium-utils

* [refactor] rename selenium-utils -> webdriver-utils

* [refactor] instantiate logging in individual files

* [chore] updated webdriver-utils package.json

* [feat] updated getTag as per BYOS contract

* [feat] update test.yml + move from main.js to index.js for tests to run smoothly

* [chore] lint using yarn lint --fix

* [chore] fix lint errors

* [feat] add support for adding individual coverage threshold levels

* [chore] rename commonMetadata to Metadata

* [fix] update content-type headers for executeScript call

* [fix] handle embedded url

* [feat] use sdk-utils/requests instead of node-fetch

* [feat] call percy.upload(...) directly which skips latency due to serialise and deserialise

* [refactor] pass base64 data directly instead of writing to temp files

* [chore] yarn lint fix

* [refactor] use ternary opeartor instead of if-else

* [fix] refactor conditional imports

* [refactor] switch to importing default and extract props from it

* [test] added tests for webdriver-utils/driver

* [test] added genericProvider tests

* [chore] removed fallback parameters as we always pass some capabilities

* [refactor] remove customized threshold support for nyc

* [chore] lint using fix

* [feat] added cache support

* Changes for js sdk POA

* [test] add cache, genericProvider tests for webdriver-utils

* Changes for ignoreRegion

* Fix testcase and edge case

* Fix test case

* Added test for ignore region

* Test case for driver

* Add testcase for postScreenshot

* Fixed tests and addressed comments

* Updated name as per suggestion

* Fix test case

* Changes according to comments

* Changes acc to comment

* rename ignore region selenium element to generic name

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>
Co-authored-by: nilshah98 <neelshah.1998@gmail.com>

* Feat: Send domInfoSha & PoA optimizations (#1270)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* Appium JS SDK related cli changes (#1282)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* Added logic for session type for js sdk

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Fix type logic for js sdk

* Added test

* Fix test case

* Ignore region fix

* Feat: Send domInfoSha & PoA optimizations (#1270)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* undo changes

* Pplt 2118 resolution and desktop tweaks (#1291)

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

* Adding resolution details

* Adding default resolutions and making timings

* Adding Tests

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>
Co-authored-by: Neel Shah <neelshah.1998@gmail.com>

* [PER-2063] Percy upload for BYOS (#1288)

* PER-2063 percy-upload-logic-change

* PR comments resolve

* added stripExtension test

* fix tests

* fix test

* error message fix

* update error message

* update name

---------

Co-authored-by: “Shahid <“shahid.k@browserstack.com”>
Co-authored-by: Samarjeet <samarjeet@browserstack.com>

* making webutils package access public

* 🔖 v1.27.0-alpha.0

* Mark tag as alpha on sub-packages

* Poa/start support (#1302)

* Adding Start Stop Support for PoA

* Adding tests to improve coverage

* Make Freeze Animation false by default (#1309)

* Make Freeze Animation false by default

* Updating Unit Test + More Check

* Adding Dpr fixes (#1303)

* feat: added support for extracting and passing header and footer heights (#1305)

* feat: added support for extracting and passing header and footer heights

* test: getHeaderFooter

* chore: lint using fix

* fix: use header and footer height for calculating tag

* test: updated percy-cli tests

* test: update expectations for header and footer heights for getTiles;

* feat: updated getTiles function to use header and footer params, so that it is more testable

* feat: update comparison tag logic

* test: updated getTag spec

* chore: lint using yarn

* feat: add support for header and footer extraction;

* test: update test for extracting header and footer

* chore: lint using fix

* fix: use metadata.osName to detect android

* test: update generaticProvider tests

* chore: added some logging

* fix: webdriver-utils/index logging

* chore: lint using fix

* feat: added caching support for devicesJson

* chore: lint using fix

* test: updated getHeaderFooter spec

* chore: lint fix

* feat: change desktop deviceName format

* test: increase coverage

* chore: add comments around skipping request.test from browser tests

* chore: add webdriver-utils as dependency for core package

* chore: resolve TODO comments

* chore: add percy/webdriver-utils to windows ci workflow

* :bookmark v1.27.0-beta.0 (#1313)

* :bookmark v1.27.0-beta.0

* Update publishConfig tag as well

* Support Old App Percy Tokens (#1321)

* Support Old App Percy Tokens

* Adding logs and tests for branch

* Fixing broken tests

* Increase coverage

* Increase coverage - 1

* Increase coverage - 2

* Increase coverage - 3

* [PER-2277] Add consider regions (#1318)

* Add consider regions

* consider regions client changes

* update schema

* lint fix

* Consider region schema fix (#1328)

* Consider region schema fix

* selector name fix

* [PPLT-2230] Add anchor comment to executeScript (#1334)

* feat: add anchor comment

* fix: do not add anchor_comment for browserstack_executor

* Adding support for legacy protocol (#1323)

* feat: publichConfig -> beta

---------

Co-authored-by: Neel Shah <neelshah.1998@gmail.com>
Co-authored-by: chinmay-browserstack <92926953+chinmay-browserstack@users.noreply.github.com>
Co-authored-by: shahidk8 <133638356+shahidk8@users.noreply.github.com>
Co-authored-by: “Shahid <“shahid.k@browserstack.com”>
Co-authored-by: Samarjeet <samarjeet@browserstack.com>
Co-authored-by: Samarjeet <samarsault@gmail.com>
rishigupta1599 pushed a commit that referenced this pull request Aug 7, 2023
…hts (#1305)

* feat: added support for extracting and passing header and footer heights

* test: getHeaderFooter

* chore: lint using fix

* fix: use header and footer height for calculating tag

* test: updated percy-cli tests

* test: update expectations for header and footer heights for getTiles;

* feat: updated getTiles function to use header and footer params, so that it is more testable

* feat: update comparison tag logic

* test: updated getTag spec

* chore: lint using yarn

* feat: add support for header and footer extraction;

* test: update test for extracting header and footer

* chore: lint using fix

* fix: use metadata.osName to detect android

* test: update generaticProvider tests

* chore: added some logging

* fix: webdriver-utils/index logging

* chore: lint using fix

* feat: added caching support for devicesJson

* chore: lint using fix

* test: updated getHeaderFooter spec

* chore: lint fix

* feat: change desktop deviceName format

* test: increase coverage

* chore: add comments around skipping request.test from browser tests

* chore: add webdriver-utils as dependency for core package

* chore: resolve TODO comments
rishigupta1599 pushed a commit that referenced this pull request Aug 7, 2023
* ✨ Integrate selenium and appium session support (#1239)

* [PPLT-2008] POC CLI

* [refactor] remove selenium-webdriver dependency in poa

* [refactor] rename driver2 -> driver

* [refactor] remove all usage of metaData

* [refactor] rename getTag1 -> getTag

* [chore] remove unused metaData resolvers

* [feat] add screenshot feature for driverWrapper

* [refactor] use await in function calls + use fs/promises

* [refactor] remove un-necessary async-await in metadata resolvers

* [wip] added genericProvider

* [feat] added support for automateprovider + debugUrl

* [chore] update packages.json

* [chore] remove snapshotName from constructor initialization

* [chore] rename endpoint driverWrapper -> automateScreenshot

* [refactor] move driverResolver/driverWrapper -> driver.js

* [refactor] use cli-poa/main.js only for import and export, use AutomateProvider in percy.js

* [chore] lint using --fix flag

* [chore] remove constructor from automateProvider as it is just initializing parent

* [test] instantiate tests

* [test] verify browserstackExecutor passed correct arguments

* [fix] await on response.json()

* [chore] add test and test:coverage scripts

* [test] update automateProvider coverage to 100%

* [test] add tests for providerResolver

* [test] add commonMetaDataResolver.test.js

* [test] added driver check for commonMetaDataResolver

* [test] added desktop and mobile metadata resolver tests

* [chore] lint using lint:fix

* [test] added genericProvider tests

* [chore] lint using lint:fix

* [refactor] move automateScreenshot to poa

* [refactor] rename cli-poa to selenium-utils

* [refactor] rename selenium-utils -> webdriver-utils

* [refactor] instantiate logging in individual files

* [chore] updated webdriver-utils package.json

* [feat] updated getTag as per BYOS contract

* [feat] update test.yml + move from main.js to index.js for tests to run smoothly

* [chore] lint using yarn lint --fix

* [chore] fix lint errors

* [feat] add support for adding individual coverage threshold levels

* [chore] rename commonMetadata to Metadata

* [fix] update content-type headers for executeScript call

* [fix] handle embedded url

* [feat] use sdk-utils/requests instead of node-fetch

* [feat] call percy.upload(...) directly which skips latency due to serialise and deserialise

* [refactor] pass base64 data directly instead of writing to temp files

* [chore] yarn lint fix

* [refactor] use ternary opeartor instead of if-else

* [fix] refactor conditional imports

* [refactor] switch to importing default and extract props from it

* [test] added tests for webdriver-utils/driver

* [test] added genericProvider tests

* [chore] removed fallback parameters as we always pass some capabilities

* [refactor] remove customized threshold support for nyc

* [chore] lint using fix

* [feat] added cache support

* [test] add cache, genericProvider tests for webdriver-utils

* [refactor] webdriverutils to class based structure for better testability

* [test] added api.test.js

* [test] setup https server + tests for requests

* [chore] lint using lint --fix

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* POA Ignore Region changes (#1250)

* [PPLT-2008] POC CLI

* [refactor] remove selenium-webdriver dependency in poa

* [refactor] rename driver2 -> driver

* [refactor] remove all usage of metaData

* [refactor] rename getTag1 -> getTag

* [chore] remove unused metaData resolvers

* [feat] add screenshot feature for driverWrapper

* [refactor] use await in function calls + use fs/promises

* [refactor] remove un-necessary async-await in metadata resolvers

* [wip] added genericProvider

* [feat] added support for automateprovider + debugUrl

* [chore] update packages.json

* [chore] remove snapshotName from constructor initialization

* [chore] rename endpoint driverWrapper -> automateScreenshot

* [refactor] move driverResolver/driverWrapper -> driver.js

* [refactor] use cli-poa/main.js only for import and export, use AutomateProvider in percy.js

* [chore] lint using --fix flag

* [chore] remove constructor from automateProvider as it is just initializing parent

* [test] instantiate tests

* [test] verify browserstackExecutor passed correct arguments

* [fix] await on response.json()

* [chore] add test and test:coverage scripts

* [test] update automateProvider coverage to 100%

* [test] add tests for providerResolver

* [test] add commonMetaDataResolver.test.js

* [test] added driver check for commonMetaDataResolver

* [test] added desktop and mobile metadata resolver tests

* [chore] lint using lint:fix

* [test] added genericProvider tests

* [chore] lint using lint:fix

* [refactor] move automateScreenshot to poa

* [refactor] rename cli-poa to selenium-utils

* [refactor] rename selenium-utils -> webdriver-utils

* [refactor] instantiate logging in individual files

* [chore] updated webdriver-utils package.json

* [feat] updated getTag as per BYOS contract

* [feat] update test.yml + move from main.js to index.js for tests to run smoothly

* [chore] lint using yarn lint --fix

* [chore] fix lint errors

* [feat] add support for adding individual coverage threshold levels

* [chore] rename commonMetadata to Metadata

* [fix] update content-type headers for executeScript call

* [fix] handle embedded url

* [feat] use sdk-utils/requests instead of node-fetch

* [feat] call percy.upload(...) directly which skips latency due to serialise and deserialise

* [refactor] pass base64 data directly instead of writing to temp files

* [chore] yarn lint fix

* [refactor] use ternary opeartor instead of if-else

* [fix] refactor conditional imports

* [refactor] switch to importing default and extract props from it

* [test] added tests for webdriver-utils/driver

* [test] added genericProvider tests

* [chore] removed fallback parameters as we always pass some capabilities

* [refactor] remove customized threshold support for nyc

* [chore] lint using fix

* [feat] added cache support

* Changes for js sdk POA

* [test] add cache, genericProvider tests for webdriver-utils

* Changes for ignoreRegion

* Fix testcase and edge case

* Fix test case

* Added test for ignore region

* Test case for driver

* Add testcase for postScreenshot

* Fixed tests and addressed comments

* Updated name as per suggestion

* Fix test case

* Changes according to comments

* Changes acc to comment

* rename ignore region selenium element to generic name

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>
Co-authored-by: nilshah98 <neelshah.1998@gmail.com>

* Feat: Send domInfoSha & PoA optimizations (#1270)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* Appium JS SDK related cli changes (#1282)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* Added logic for session type for js sdk

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Fix type logic for js sdk

* Added test

* Fix test case

* Ignore region fix

* Feat: Send domInfoSha & PoA optimizations (#1270)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* undo changes

* Pplt 2118 resolution and desktop tweaks (#1291)

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

* Adding resolution details

* Adding default resolutions and making timings

* Adding Tests

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>
Co-authored-by: Neel Shah <neelshah.1998@gmail.com>

* [PER-2063] Percy upload for BYOS (#1288)

* PER-2063 percy-upload-logic-change

* PR comments resolve

* added stripExtension test

* fix tests

* fix test

* error message fix

* update error message

* update name

---------

Co-authored-by: “Shahid <“shahid.k@browserstack.com”>
Co-authored-by: Samarjeet <samarjeet@browserstack.com>

* making webutils package access public

* 🔖 v1.27.0-alpha.0

* Mark tag as alpha on sub-packages

* Poa/start support (#1302)

* Adding Start Stop Support for PoA

* Adding tests to improve coverage

* Make Freeze Animation false by default (#1309)

* Make Freeze Animation false by default

* Updating Unit Test + More Check

* Adding Dpr fixes (#1303)

* feat: added support for extracting and passing header and footer heights (#1305)

* feat: added support for extracting and passing header and footer heights

* test: getHeaderFooter

* chore: lint using fix

* fix: use header and footer height for calculating tag

* test: updated percy-cli tests

* test: update expectations for header and footer heights for getTiles;

* feat: updated getTiles function to use header and footer params, so that it is more testable

* feat: update comparison tag logic

* test: updated getTag spec

* chore: lint using yarn

* feat: add support for header and footer extraction;

* test: update test for extracting header and footer

* chore: lint using fix

* fix: use metadata.osName to detect android

* test: update generaticProvider tests

* chore: added some logging

* fix: webdriver-utils/index logging

* chore: lint using fix

* feat: added caching support for devicesJson

* chore: lint using fix

* test: updated getHeaderFooter spec

* chore: lint fix

* feat: change desktop deviceName format

* test: increase coverage

* chore: add comments around skipping request.test from browser tests

* chore: add webdriver-utils as dependency for core package

* chore: resolve TODO comments

* chore: add percy/webdriver-utils to windows ci workflow

* :bookmark v1.27.0-beta.0 (#1313)

* :bookmark v1.27.0-beta.0

* Update publishConfig tag as well

* Support Old App Percy Tokens (#1321)

* Support Old App Percy Tokens

* Adding logs and tests for branch

* Fixing broken tests

* Increase coverage

* Increase coverage - 1

* Increase coverage - 2

* Increase coverage - 3

* [PER-2277] Add consider regions (#1318)

* Add consider regions

* consider regions client changes

* update schema

* lint fix

* Consider region schema fix (#1328)

* Consider region schema fix

* selector name fix

* [PPLT-2230] Add anchor comment to executeScript (#1334)

* feat: add anchor comment

* fix: do not add anchor_comment for browserstack_executor

* Adding support for legacy protocol (#1323)

* feat: publichConfig -> beta

---------

Co-authored-by: Neel Shah <neelshah.1998@gmail.com>
Co-authored-by: chinmay-browserstack <92926953+chinmay-browserstack@users.noreply.github.com>
Co-authored-by: shahidk8 <133638356+shahidk8@users.noreply.github.com>
Co-authored-by: “Shahid <“shahid.k@browserstack.com”>
Co-authored-by: Samarjeet <samarjeet@browserstack.com>
Co-authored-by: Samarjeet <samarsault@gmail.com>
rishigupta1599 pushed a commit that referenced this pull request Aug 7, 2023
…hts (#1305)

* feat: added support for extracting and passing header and footer heights

* test: getHeaderFooter

* chore: lint using fix

* fix: use header and footer height for calculating tag

* test: updated percy-cli tests

* test: update expectations for header and footer heights for getTiles;

* feat: updated getTiles function to use header and footer params, so that it is more testable

* feat: update comparison tag logic

* test: updated getTag spec

* chore: lint using yarn

* feat: add support for header and footer extraction;

* test: update test for extracting header and footer

* chore: lint using fix

* fix: use metadata.osName to detect android

* test: update generaticProvider tests

* chore: added some logging

* fix: webdriver-utils/index logging

* chore: lint using fix

* feat: added caching support for devicesJson

* chore: lint using fix

* test: updated getHeaderFooter spec

* chore: lint fix

* feat: change desktop deviceName format

* test: increase coverage

* chore: add comments around skipping request.test from browser tests

* chore: add webdriver-utils as dependency for core package

* chore: resolve TODO comments
rishigupta1599 pushed a commit that referenced this pull request Aug 7, 2023
* ✨ Integrate selenium and appium session support (#1239)

* [PPLT-2008] POC CLI

* [refactor] remove selenium-webdriver dependency in poa

* [refactor] rename driver2 -> driver

* [refactor] remove all usage of metaData

* [refactor] rename getTag1 -> getTag

* [chore] remove unused metaData resolvers

* [feat] add screenshot feature for driverWrapper

* [refactor] use await in function calls + use fs/promises

* [refactor] remove un-necessary async-await in metadata resolvers

* [wip] added genericProvider

* [feat] added support for automateprovider + debugUrl

* [chore] update packages.json

* [chore] remove snapshotName from constructor initialization

* [chore] rename endpoint driverWrapper -> automateScreenshot

* [refactor] move driverResolver/driverWrapper -> driver.js

* [refactor] use cli-poa/main.js only for import and export, use AutomateProvider in percy.js

* [chore] lint using --fix flag

* [chore] remove constructor from automateProvider as it is just initializing parent

* [test] instantiate tests

* [test] verify browserstackExecutor passed correct arguments

* [fix] await on response.json()

* [chore] add test and test:coverage scripts

* [test] update automateProvider coverage to 100%

* [test] add tests for providerResolver

* [test] add commonMetaDataResolver.test.js

* [test] added driver check for commonMetaDataResolver

* [test] added desktop and mobile metadata resolver tests

* [chore] lint using lint:fix

* [test] added genericProvider tests

* [chore] lint using lint:fix

* [refactor] move automateScreenshot to poa

* [refactor] rename cli-poa to selenium-utils

* [refactor] rename selenium-utils -> webdriver-utils

* [refactor] instantiate logging in individual files

* [chore] updated webdriver-utils package.json

* [feat] updated getTag as per BYOS contract

* [feat] update test.yml + move from main.js to index.js for tests to run smoothly

* [chore] lint using yarn lint --fix

* [chore] fix lint errors

* [feat] add support for adding individual coverage threshold levels

* [chore] rename commonMetadata to Metadata

* [fix] update content-type headers for executeScript call

* [fix] handle embedded url

* [feat] use sdk-utils/requests instead of node-fetch

* [feat] call percy.upload(...) directly which skips latency due to serialise and deserialise

* [refactor] pass base64 data directly instead of writing to temp files

* [chore] yarn lint fix

* [refactor] use ternary opeartor instead of if-else

* [fix] refactor conditional imports

* [refactor] switch to importing default and extract props from it

* [test] added tests for webdriver-utils/driver

* [test] added genericProvider tests

* [chore] removed fallback parameters as we always pass some capabilities

* [refactor] remove customized threshold support for nyc

* [chore] lint using fix

* [feat] added cache support

* [test] add cache, genericProvider tests for webdriver-utils

* [refactor] webdriverutils to class based structure for better testability

* [test] added api.test.js

* [test] setup https server + tests for requests

* [chore] lint using lint --fix

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* POA Ignore Region changes (#1250)

* [PPLT-2008] POC CLI

* [refactor] remove selenium-webdriver dependency in poa

* [refactor] rename driver2 -> driver

* [refactor] remove all usage of metaData

* [refactor] rename getTag1 -> getTag

* [chore] remove unused metaData resolvers

* [feat] add screenshot feature for driverWrapper

* [refactor] use await in function calls + use fs/promises

* [refactor] remove un-necessary async-await in metadata resolvers

* [wip] added genericProvider

* [feat] added support for automateprovider + debugUrl

* [chore] update packages.json

* [chore] remove snapshotName from constructor initialization

* [chore] rename endpoint driverWrapper -> automateScreenshot

* [refactor] move driverResolver/driverWrapper -> driver.js

* [refactor] use cli-poa/main.js only for import and export, use AutomateProvider in percy.js

* [chore] lint using --fix flag

* [chore] remove constructor from automateProvider as it is just initializing parent

* [test] instantiate tests

* [test] verify browserstackExecutor passed correct arguments

* [fix] await on response.json()

* [chore] add test and test:coverage scripts

* [test] update automateProvider coverage to 100%

* [test] add tests for providerResolver

* [test] add commonMetaDataResolver.test.js

* [test] added driver check for commonMetaDataResolver

* [test] added desktop and mobile metadata resolver tests

* [chore] lint using lint:fix

* [test] added genericProvider tests

* [chore] lint using lint:fix

* [refactor] move automateScreenshot to poa

* [refactor] rename cli-poa to selenium-utils

* [refactor] rename selenium-utils -> webdriver-utils

* [refactor] instantiate logging in individual files

* [chore] updated webdriver-utils package.json

* [feat] updated getTag as per BYOS contract

* [feat] update test.yml + move from main.js to index.js for tests to run smoothly

* [chore] lint using yarn lint --fix

* [chore] fix lint errors

* [feat] add support for adding individual coverage threshold levels

* [chore] rename commonMetadata to Metadata

* [fix] update content-type headers for executeScript call

* [fix] handle embedded url

* [feat] use sdk-utils/requests instead of node-fetch

* [feat] call percy.upload(...) directly which skips latency due to serialise and deserialise

* [refactor] pass base64 data directly instead of writing to temp files

* [chore] yarn lint fix

* [refactor] use ternary opeartor instead of if-else

* [fix] refactor conditional imports

* [refactor] switch to importing default and extract props from it

* [test] added tests for webdriver-utils/driver

* [test] added genericProvider tests

* [chore] removed fallback parameters as we always pass some capabilities

* [refactor] remove customized threshold support for nyc

* [chore] lint using fix

* [feat] added cache support

* Changes for js sdk POA

* [test] add cache, genericProvider tests for webdriver-utils

* Changes for ignoreRegion

* Fix testcase and edge case

* Fix test case

* Added test for ignore region

* Test case for driver

* Add testcase for postScreenshot

* Fixed tests and addressed comments

* Updated name as per suggestion

* Fix test case

* Changes according to comments

* Changes acc to comment

* rename ignore region selenium element to generic name

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>
Co-authored-by: nilshah98 <neelshah.1998@gmail.com>

* Feat: Send domInfoSha & PoA optimizations (#1270)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* Appium JS SDK related cli changes (#1282)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* Added logic for session type for js sdk

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Fix type logic for js sdk

* Added test

* Fix test case

* Ignore region fix

* Feat: Send domInfoSha & PoA optimizations (#1270)

* Adding Optimizations for Screenshot and all

* Adding major poa v2 changes

* Updating tests for cli v2

* [lint fix] Updating lint

* [add tests, few feats] + tokentype, + misc

* Addressing few changes

* Adding percyCSS options for PoA [Snapshot level] (#1281)

* Adding percyCSS options for PoA

* [addressing comments]

* Addressing comments on test

* fixing tests

* [Refactor], Resolving comments

* Increase Statement Coverage

* fixing tests and small comments

* fixing core tests

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>

* undo changes

* Pplt 2118 resolution and desktop tweaks (#1291)

* Making backward compatability

* make sdk-utils like before

* making timin.test.js less strict

* making import changes as per comment

* adding changes as per suggestion

* increase coverage for client

* adding param to getToken

* adding tests for getToken

* Adding resolution details

* Adding default resolutions and making timings

* Adding Tests

---------

Co-authored-by: amit3200 <tusharamit@yahoo.com>
Co-authored-by: Neel Shah <neelshah.1998@gmail.com>

* [PER-2063] Percy upload for BYOS (#1288)

* PER-2063 percy-upload-logic-change

* PR comments resolve

* added stripExtension test

* fix tests

* fix test

* error message fix

* update error message

* update name

---------

Co-authored-by: “Shahid <“shahid.k@browserstack.com”>
Co-authored-by: Samarjeet <samarjeet@browserstack.com>

* making webutils package access public

* 🔖 v1.27.0-alpha.0

* Mark tag as alpha on sub-packages

* Poa/start support (#1302)

* Adding Start Stop Support for PoA

* Adding tests to improve coverage

* Make Freeze Animation false by default (#1309)

* Make Freeze Animation false by default

* Updating Unit Test + More Check

* Adding Dpr fixes (#1303)

* feat: added support for extracting and passing header and footer heights (#1305)

* feat: added support for extracting and passing header and footer heights

* test: getHeaderFooter

* chore: lint using fix

* fix: use header and footer height for calculating tag

* test: updated percy-cli tests

* test: update expectations for header and footer heights for getTiles;

* feat: updated getTiles function to use header and footer params, so that it is more testable

* feat: update comparison tag logic

* test: updated getTag spec

* chore: lint using yarn

* feat: add support for header and footer extraction;

* test: update test for extracting header and footer

* chore: lint using fix

* fix: use metadata.osName to detect android

* test: update generaticProvider tests

* chore: added some logging

* fix: webdriver-utils/index logging

* chore: lint using fix

* feat: added caching support for devicesJson

* chore: lint using fix

* test: updated getHeaderFooter spec

* chore: lint fix

* feat: change desktop deviceName format

* test: increase coverage

* chore: add comments around skipping request.test from browser tests

* chore: add webdriver-utils as dependency for core package

* chore: resolve TODO comments

* chore: add percy/webdriver-utils to windows ci workflow

* :bookmark v1.27.0-beta.0 (#1313)

* :bookmark v1.27.0-beta.0

* Update publishConfig tag as well

* Support Old App Percy Tokens (#1321)

* Support Old App Percy Tokens

* Adding logs and tests for branch

* Fixing broken tests

* Increase coverage

* Increase coverage - 1

* Increase coverage - 2

* Increase coverage - 3

* [PER-2277] Add consider regions (#1318)

* Add consider regions

* consider regions client changes

* update schema

* lint fix

* Consider region schema fix (#1328)

* Consider region schema fix

* selector name fix

* [PPLT-2230] Add anchor comment to executeScript (#1334)

* feat: add anchor comment

* fix: do not add anchor_comment for browserstack_executor

* Adding support for legacy protocol (#1323)

* feat: publichConfig -> beta

---------

Co-authored-by: Neel Shah <neelshah.1998@gmail.com>
Co-authored-by: chinmay-browserstack <92926953+chinmay-browserstack@users.noreply.github.com>
Co-authored-by: shahidk8 <133638356+shahidk8@users.noreply.github.com>
Co-authored-by: “Shahid <“shahid.k@browserstack.com”>
Co-authored-by: Samarjeet <samarjeet@browserstack.com>
Co-authored-by: Samarjeet <samarsault@gmail.com>
rishigupta1599 pushed a commit that referenced this pull request Aug 7, 2023
…hts (#1305)

* feat: added support for extracting and passing header and footer heights

* test: getHeaderFooter

* chore: lint using fix

* fix: use header and footer height for calculating tag

* test: updated percy-cli tests

* test: update expectations for header and footer heights for getTiles;

* feat: updated getTiles function to use header and footer params, so that it is more testable

* feat: update comparison tag logic

* test: updated getTag spec

* chore: lint using yarn

* feat: add support for header and footer extraction;

* test: update test for extracting header and footer

* chore: lint using fix

* fix: use metadata.osName to detect android

* test: update generaticProvider tests

* chore: added some logging

* fix: webdriver-utils/index logging

* chore: lint using fix

* feat: added caching support for devicesJson

* chore: lint using fix

* test: updated getHeaderFooter spec

* chore: lint fix

* feat: change desktop deviceName format

* test: increase coverage

* chore: add comments around skipping request.test from browser tests

* chore: add webdriver-utils as dependency for core package

* chore: resolve TODO comments
rishigupta1599 pushed a commit that referenced this pull request Aug 7, 2023
…hts (#1305)

* feat: added support for extracting and passing header and footer heights

* test: getHeaderFooter

* chore: lint using fix

* fix: use header and footer height for calculating tag

* test: updated percy-cli tests

* test: update expectations for header and footer heights for getTiles;

* feat: updated getTiles function to use header and footer params, so that it is more testable

* feat: update comparison tag logic

* test: updated getTag spec

* chore: lint using yarn

* feat: add support for header and footer extraction;

* test: update test for extracting header and footer

* chore: lint using fix

* fix: use metadata.osName to detect android

* test: update generaticProvider tests

* chore: added some logging

* fix: webdriver-utils/index logging

* chore: lint using fix

* feat: added caching support for devicesJson

* chore: lint using fix

* test: updated getHeaderFooter spec

* chore: lint fix

* feat: change desktop deviceName format

* test: increase coverage

* chore: add comments around skipping request.test from browser tests

* chore: add webdriver-utils as dependency for core package

* chore: resolve TODO comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants