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

Demo for #8008 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@ report/
cypress/videos
.DS_Store
cypress/screenshots
.idea
yarn-error.log
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.js
86 changes: 86 additions & 0 deletions .yarn/releases/yarn-2.1.1.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


yarn-path ".yarn/releases/yarn-1.22.4.js"
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarnPath: .yarn/releases/yarn-2.1.1.cjs
1 change: 1 addition & 0 deletions cypress/integration/spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
describe('page', () => {
it('works', () => {
cy.visit('https://example.cypress.io')
cy.document().toMatchImageSnapshot({threshold: 0.001})
})
})
8 changes: 5 additions & 3 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
// https://on.cypress.io/plugins-guide
// ***********************************************************

const {initPlugin} = require('cypress-plugin-snapshots/plugin');

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

/**
* @type {Cypress.PluginConfig}
*/
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
initPlugin(on, config);
return config;
};
2 changes: 2 additions & 0 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })

require('cypress-plugin-snapshots/commands');
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@
"cypress:version": "cypress version",
"list-videos": "ls -l cypress/videos",
"check-videos": "ok-file 'cypress/videos/*.mp4'",
"set-status": "set-status"
"set-status": "set-status",
"test": "yarn cypress:run"
},
"keywords": [],
"author": "Gleb Bahmutov <gleb@cypress.io>",
"license": "ISC",
"dependencies": {
"cypress": "4.11.0",
"cypress-plugin-snapshots": "^1.4.3"
},
"devDependencies": {
"ok-file": "1.5.2"
},
Expand Down
Loading