├── .babelrc ├── .circleci └── config.yml ├── .eslintrc ├── .github └── workflows │ └── issue_watcher.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── bin └── cypress-image-diff.js ├── cypress-image-diff-logo.png ├── cypress-image-diff-screenshots └── baseline │ ├── folder-structure.cy-wholePage.png │ ├── image-diff.cy-element.png │ ├── image-diff.cy-hideElement.png │ ├── image-diff.cy-wholePage.png │ ├── image-diff.cy-wholePageThreshold.png │ └── retry.cy-retry.png ├── cypress-image-diff.config.js ├── cypress-visual-screenshots └── baseline │ ├── folder-structure.cy-wholePage.png │ ├── image-diff.cy-element.png │ ├── image-diff.cy-hideElement.png │ ├── image-diff.cy-wholePage.png │ ├── image-diff.cy-wholePageThreshold.png │ └── retry.cy-retry.png ├── cypress.config.js ├── cypress ├── plugins │ └── index.js ├── specs │ ├── folder-structure-test │ │ └── folder-structure.cy.js │ ├── image-diff.cy.js │ └── retry.cy.js └── support │ ├── commands.js │ └── e2e.js ├── docker-compose.yml ├── docs ├── CLI.md ├── CONTRIBUTING.md ├── Cypress integration.md ├── Publishing.md ├── Reporting.md ├── Running tests.md └── gitbook.pdf ├── package-lock.json ├── package.json ├── prettier.config.js ├── release.config.js ├── report-example.html ├── report-example.json ├── report-example.png ├── retry-example.html ├── src ├── cli.js ├── cli.test.js ├── command.js ├── config.default.js ├── config.js ├── config.test.js ├── plugin.js ├── reporter │ ├── __snapshots__ │ │ └── reporter.test.js.snap │ ├── index.js │ ├── reporter.test.js │ ├── template.hbs │ ├── test-status.js │ └── test-status.test.js ├── utils.browser.js ├── utils.js └── utils.test.js └── types ├── command.d.ts ├── options.d.ts └── plugin.d.ts /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["@babel/preset-env", { 4 | "useBuiltIns": false, 5 | }] 6 | ], 7 | "plugins": ["@babel/plugin-transform-runtime"] 8 | } -------------------------------------------------------------------------------- /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | aliases: 3 | - &node_version node:14.17.0 4 | 5 | jobs: 6 | test: 7 | machine: 8 | docker_layer_caching: true 9 | working_directory: ~/cypress-image-diff 10 | steps: 11 | - checkout 12 | - run: 13 | name: Build docker 14 | command: make build 15 | - run: 16 | name: Run eslint 17 | command: make lint-test 18 | - run: 19 | name: Run unit 20 | command: make unit-test 21 | - run: 22 | name: Run e2e 23 | command: make e2e-test 24 | - store-artifacts: 25 | path: cypress-image-diff-screenshots 26 | - store-artifacts: 27 | path: cypress-image-diff-html-report 28 | 29 | build_and_publish: 30 | docker: 31 | - image: *node_version 32 | working_directory: ~/cypress-image-diff 33 | steps: 34 | - checkout 35 | - run: npm install 36 | - run: 37 | name: Build 38 | command: npm run build 39 | - run: 40 | name: Publish (semantic release - main only) 41 | command: ./node_modules/.bin/semantic-release 42 | 43 | workflows: 44 | version: 2 45 | cypressimagediff: 46 | jobs: 47 | - test 48 | - build_and_publish: 49 | requires: 50 | - test 51 | filters: 52 | branches: 53 | only: 54 | - main 55 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "airbnb-base", 4 | "prettier" 5 | ], 6 | "rules": { 7 | "prefer-object-spread": 0 8 | }, 9 | "overrides": [ 10 | { 11 | "files": ["src/**/*.js", "cypress/**/*.js"], 12 | "rules": { 13 | "no-undef": "off" 14 | } 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /.github/workflows/issue_watcher.yml: -------------------------------------------------------------------------------- 1 | name: Close inactive issues 2 | on: 3 | schedule: 4 | - cron: "30 1 * * *" 5 | 6 | jobs: 7 | close-issues: 8 | runs-on: ubuntu-latest 9 | permissions: 10 | issues: write 11 | pull-requests: write 12 | steps: 13 | - uses: actions/stale@v5 14 | with: 15 | days-before-issue-stale: 30 16 | days-before-issue-close: 30 17 | stale-issue-label: "stale" 18 | stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." 19 | close-issue-message: "This issue was closed because it has been inactive for 30 days since being marked as stale." 20 | days-before-pr-stale: -1 21 | days-before-pr-close: -1 22 | repo-token: ${{ secrets.GITHUB_TOKEN }} 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | 4 | # test 5 | cypress-image-diff-screenshots/comparison 6 | cypress-image-diff-screenshots/diff 7 | cypress-image-diff-html-report 8 | cypress/videos 9 | cypress/fixtures -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | ## 1. Purpose 4 | A primary goal of Cypress Image Diff is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe, and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, socioeconomic status, and religion (or lack thereof). 5 | 6 | This Code of Conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behavior. 7 | 8 | ## 2. Open Source Citizenship 9 | A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognize and strengthen the relationships between our actions and their effects on our community. 10 | 11 | Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society. 12 | 13 | ## 3. Expected Behavior 14 | The following behaviors are expected and requested of all community members: 15 | 16 | - Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community. 17 | - Exercise consideration and respect in your speech and actions. 18 | - Attempt collaboration before conflict. 19 | - Refrain from demeaning, discriminatory, or harassing behavior and speech. 20 | - Be mindful of your surroundings and of your fellow participants. 21 | - Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential. 22 | 23 | ## 4. Unacceptable Behavior 24 | The following behaviors are considered harassment and are unacceptable within our community: 25 | 26 | - Violence, threats of violence, or violent language directed against another person. 27 | - Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language. 28 | - Posting or displaying sexually explicit or violent material. 29 | - Posting or threatening to post other people’s personally identifying information ("doxing"). 30 | - Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability. 31 | - Inappropriate photography or recording. 32 | - Inappropriate physical contact. You should have someone's consent before touching them. 33 | - Unwelcome sexual attention. This includes sexualized comments or jokes; inappropriate touching, groping, and unwelcome sexual advances. 34 | - Deliberate intimidation, stalking, or following (online or in-person). 35 | - Advocating for or encouraging any of the above behavior. 36 | 37 | ## 5. Consequences of Unacceptable Behavior 38 | Unacceptable behavior from any community member, including sponsors and those with decision-making authority, will not be tolerated. 39 | 40 | Anyone asked to stop unacceptable behavior is expected to comply immediately. 41 | 42 | If a community member engages in unacceptable behavior, the community organizers may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning. 43 | 44 | ## 6. Reporting Guidelines 45 | If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community organizer as soon as possible. 46 | 47 | filipporai@gmail.com 48 | kienht.dev@gmail.com 49 | tamas.magyar.py@gmail.com 50 | 51 | Additionally, community organizers are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. 52 | 53 | ## 7. Addressing Grievances 54 | If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify the project team with a concise description of your grievance. 55 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, please first discuss the change you wish to make via issue, 4 | email, or any other method with the owners of this repository before making a change. 5 | 6 | Please note we have a code of conduct, please follow it in all your interactions with the project. 7 | 8 | ## Commits 9 | 10 | When committing please always use the following pattern for you messages (scope, body and footer are optional): 11 | 12 | ``` 13 | (): 14 | 15 | 16 | 17 |