Comments (5)
Hello @djones!
Sorry to reopen this one after such a long time but it seems like my tests running via ./node_modules/.bin/cypress run
(so, without the percy
command as I don't want Percy to be involved here, I need Cypress to run without Percy), my test is failing.
"@percy/cli": "^1.0.0-beta.70",
"@percy/cypress": "^3.1.1",
my become-seller.spec.js
:
describe('Test the Become Seller page', () => {
it('Goes on the registration page', () => {
/**
* @param {Object} routes.statics
* @param {string} routes.statics.becomeSeller
*/
cy.fixture('routes').then((routes) => {
cy.visit(routes.statics.becomeSeller)
})
cy.window()
.scrollTo('bottom', { duration: 50 })
cy.percySnapshot()
})
})
If I remove the cy.percySnapshot()
it works well.
You can find the whole output here: https://gist.github.com/CyrilKrylatov/fff45dc898f77d4bc57103fe89edb2ef
Do you have any input on why the test is failing?
Thank you for your time. ✌️
Edit: oh, it's related to #434.
from percy-cypress.
I made Cypress plugin (cypress/plugins/index.js
):
const process = require('process');
module.exports = (on, config) => {
if (process.env.PERCY_TOKEN) {
// eslint-disable-next-line no-param-reassign
config.env.PERCY_ENABLED = true;
}
return config;
};
And now I can do:
if (Cypress.env('PERCY_ENABLED')) {
cy.percySnapshot();
}
from percy-cypress.
Hi @mitar, Thanks for reporting this and sharing your workaround.
Just to let you know I'm working on support for this feature this week. Percy shouldn't block your local test runs if it's not running.
I'll update the issue when there's progress made.
from percy-cypress.
@mitar if you upgrade to @percy/cypress 0.2.0 you can simply delete the code in your example above 😄
from percy-cypress.
Thanks!
from percy-cypress.
Related Issues (20)
- Cypress timeout reached when asset discovery waits on external (not captured) assets HOT 36
- Your callback function returned a promise that never resolved. HOT 7
- How to select Approved build as base build?
- Webpages behind Netlify Authentication not showing css in Percy snapshot
- [TypeScript] percySnapshot - TypeError: Cannot read properties of undefined (reading 'isTTY') HOT 19
- [Cypress regression]`TypeError: data.hasOwnProperty is not a function` HOT 12
- [percy] Fails to take dom snapshot
- Does percy with cypress support visual testing of shadow dom elements? HOT 1
- `cy.percySnapshot()` not uploading screenshots when used via `browserstack-cypress` HOT 1
- Percy does not work for Cypress component testing
- Cannot read properties of undefined (reading 'isServer') HOT 9
- SyntaxError: Unexpected identifier HOT 2
- Test is marked as successful, but `Could not take DOM snapshot` error is present.
- The term 'percy' is not recognized as the name of a cmdlet
- Duplicate snapshot name in a parallel build causes missing snapshots HOT 13
- Need the ability to set width and height for screenshots HOT 2
- Snapshot ignores the passed `scope` and renders the whole screen HOT 3
- Percy no longer captures embedded pdf viewer since Cypress v12.15.0 and above HOT 4
- Uncaught error was detected outside of a test: No commands were issued in this test HOT 3
- Specifying "width" instead of "widths" in percySnapshot HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from percy-cypress.