Skip to content

feat: introduce imagesPath option #152

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

Merged
merged 2 commits into from
Oct 26, 2022
Merged

feat: introduce imagesPath option #152

merged 2 commits into from
Oct 26, 2022

Conversation

FRSgit
Copy link
Member

@FRSgit FRSgit commented Oct 14, 2022

allow relative path resolution
create special {spec_path} variable
allow absolute path resolution (under unix and win systems) refactor afterScreenshot hook to awaits
add deprecation message for imagesDir option
add docs info

BREAKING CHANGE: deprecate imagesDir option in favor of imagesPath - see docs for additional information

references issue #147

Signed-off-by: Jakub Freisler [email protected]

@FRSgit FRSgit added the enhancement New feature or request label Oct 14, 2022
@FRSgit FRSgit self-assigned this Oct 14, 2022
@FRSgit FRSgit force-pushed the feat/redo-images-dir-option branch from 3db1628 to 40e0cec Compare October 14, 2022 21:40
@FRSgit FRSgit changed the title feat: introduct imagesPath option feat: introduce imagesPath option Oct 14, 2022
@FRSgit
Copy link
Member Author

FRSgit commented Oct 14, 2022

It's been released under 2.4.0-alpha.0

@stocksr
Copy link

stocksr commented Oct 17, 2022

I have tested 2.4.0-alpha.0 with the config

env: {
            pluginVisualRegressionImagesPath:
                'cypress/component_test_image_snapshots/{spec_path}',
        },
    and am happy to confirm that this works as I need it to.

@FRSgit
Copy link
Member Author

FRSgit commented Oct 18, 2022

Good to hear that @stocksr, thank you for testing it out!
Use this release for the time being please. I'll try to get this released together with #146 and #124 under v3.0.0 - but first I need to review all three PRs and create more testing scenarios for the future. This might take few days.

@FRSgit FRSgit force-pushed the feat/redo-images-dir-option branch 2 times, most recently from e3217d0 to 25d59f4 Compare October 26, 2022 00:13
@FRSgit FRSgit changed the base branch from main to feat/auto-clean-unused-files October 26, 2022 00:14
@FRSgit FRSgit force-pushed the feat/redo-images-dir-option branch 2 times, most recently from 5abfe8f to 3dbf0e4 Compare October 26, 2022 09:56
Base automatically changed from feat/auto-clean-unused-files to main October 26, 2022 10:00
allow relative path resolution
create special {spec_path} variable
allow absolute path resolution (under unix and win systems)
refactor afterScreenshot hook to awaits
add deprecation message for imagesDir option
add docs info
deprecate imagesDir option in favor of imagesPath

Signed-off-by: Jakub Freisler <[email protected]>
Signed-off-by: Jakub Freisler <[email protected]>
@FRSgit FRSgit force-pushed the feat/redo-images-dir-option branch from 3dbf0e4 to 4ee63c2 Compare October 26, 2022 10:02
@FRSgit FRSgit merged commit b358022 into main Oct 26, 2022
@FRSgit FRSgit deleted the feat/redo-images-dir-option branch October 26, 2022 10:02
FRSgit added a commit that referenced this pull request Oct 26, 2022
allow relative path resolution
create special {spec_path} variable
allow absolute path resolution (under unix and win systems) refactor afterScreenshot hook to awaits
add deprecation message for imagesDir option
add docs info

references issue #147
BREAKING CHANGE: deprecate imagesDir option in favor of imagesPath - see docs for additional information
FRSgit added a commit that referenced this pull request Oct 26, 2022
allow relative path resolution
create special {spec_path} variable
allow absolute path resolution (under unix and win systems) refactor afterScreenshot hook to awaits
add deprecation message for imagesDir option
add docs info

references issue #147
BREAKING CHANGE: deprecate imagesDir option in favor of imagesPath - see docs for additional information
github-actions bot pushed a commit that referenced this pull request Oct 26, 2022
# [3.0.0](v2.3.12...v3.0.0) (2022-10-26)

### Bug Fixes

* security vulnerability ([d6f849c](d6f849c))

### Features

* add matchAgainstPath option ([#146](#146)) ([7a5e3a8](7a5e3a8)), closes [#88](#88)
* auto clean unused files ([#124](#124)) ([38679a7](38679a7)), closes [#118](#118)
* introduce imagesPath option ([#152](#152)) ([961e137](961e137)), closes [#147](#147)

### BREAKING CHANGES

* deprecate imagesDir option in favor of imagesPath - see docs for additional information
* To use autocleanup feature you need to update all of the screenshots, best do it by running your test suite with cypress env 'pluginVisualRegressionUpdateImages' set to true.
* matchImage returns object containing comparison details from now on (previously was returning subject element from a chain)
github-actions bot pushed a commit to braze-inc/cypress-plugin-visual-regression-diff that referenced this pull request Oct 31, 2022
# 1.0.0 (2022-10-31)

### Bug Fixes

* btoa utf8 encoding/decoding error ([FRSOURCE#114](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/114)) ([0137014](0137014))
* create missing dirs when renaming screenshot files ([38e5ff5](38e5ff5))
* **deps:** pin dependency vue to 3.2.37 ([FRSOURCE#68](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/68)) ([d09a762](d09a762))
* **deps:** update dependency @frsource/base64 to v1.0.3 ([FRSOURCE#144](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/144)) ([09ecbd8](09ecbd8))
* **deps:** update dependency move-file to v3 ([FRSOURCE#62](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/62)) ([4f6eaf6](4f6eaf6))
* **deps:** update dependency pixelmatch to v5.3.0 ([FRSOURCE#55](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/55)) ([ca5d278](ca5d278))
* **deps:** update dependency sharp to v0.31.1 ([FRSOURCE#132](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/132)) ([15f0f5d](15f0f5d))
* **deps:** update dependency vue to v3.2.38 ([FRSOURCE#101](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/101)) ([e2d3c82](e2d3c82))
* **deps:** update dependency vue to v3.2.39 ([FRSOURCE#110](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/110)) ([8a7f055](8a7f055))
* **deps:** update dependency vue to v3.2.40 ([FRSOURCE#131](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/131)) ([537fd16](537fd16))
* image diff calculation ([529cb22](529cb22)), closes [FRSOURCE#107](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/107)
* proper readme info ([dd87e19](dd87e19))
* remove alias leftovers from dist bundles ([407ce79](407ce79))
* remove automated screenshots update ([acb3ef0](acb3ef0))
* reset name cache after tests run ([bfbf138](bfbf138))
* sanitize screenshot filenames ([fc57380](fc57380))
* security vulnerabilities ([d0bda44](d0bda44))
* security vulnerability ([d6f849c](d6f849c))
* text overflowing when image is small ([3b04f8e](3b04f8e))

### Features

* add forceDeviceFactor option ([8d69632](8d69632))
* add matchAgainstPath option ([FRSOURCE#146](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/146)) ([7a5e3a8](7a5e3a8)), closes [FRSOURCE#88](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/88)
* add possibility to change images dirname ([b831e94](b831e94))
* add queue flushing in after block ([70f828f](70f828f))
* add title option to matchImage command ([FRSOURCE#81](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/81)) ([4d03866](4d03866))
* add typings ([0a0e8e6](0a0e8e6))
* auto clean unused files ([FRSOURCE#124](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/124)) ([38679a7](38679a7)), closes [FRSOURCE#118](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/118)
* don't override screenshots if not needed ([9066017](9066017))
* externalize important APIs ([9f94086](9f94086))
* first implementation ([388cccf](388cccf))
* img diff when resolution differs ([FRSOURCE#108](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/108)) ([c8a5044](c8a5044)), closes [FRSOURCE#94](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/94)
* introduce imagesPath option ([FRSOURCE#152](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/152)) ([961e137](961e137)), closes [FRSOURCE#147](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/147)
* make library cypress 10 compatible ([b26beb3](b26beb3))
* make plugin Cypress 10 compatible ([a03a17d](a03a17d))
* migrate to @frsource/base64 package ([e4f3a14](e4f3a14))
* provide modern exports ([5c911a1](5c911a1))
* show comparison for successful tests ([FRSOURCE#137](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/137)) ([c09bab3](c09bab3)), closes [FRSOURCE#104](https://github.com/braze-inc/cypress-plugin-visual-regression-diff/issues/104)
* show scrollbar for overflowing images ([de994b9](de994b9))
* stop logging all of the tasks ([573e728](573e728))

### BREAKING CHANGES

* deprecate imagesDir option in favor of imagesPath - see docs for additional information
* To use autocleanup feature you need to update all of the screenshots, best do it by running your test suite with cypress env 'pluginVisualRegressionUpdateImages' set to true.
* matchImage returns object containing comparison details from now on (previously was returning subject element from a chain)
* different resolution doesn't fail test immediately - img diff is being done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants