visual-regression-tracker / agent-cypress Goto Github PK
View Code? Open in Web Editor NEWVisual Regression Tracker integration plugin
License: Apache License 2.0
Visual Regression Tracker integration plugin
License: Apache License 2.0
No response from server
Because this error occurred during a before all hook we are skipping all of the remaining tests.
node_modules/@visual-regression-tracker/agent-cypress/dist/commands.js:23:1
21 | .then(function (err) {
22 | if (err) {
> 23 | throw new Error(err);
| ^
24 | }
25 | })
26 | .then(function () {
I followed the readme, but I always receive this error message
SDK-JS: Visual-Regression-Tracker/sdk-js#153
Agent-Cypress: #157
I see that the vrtTrackBase64 command requires an image to be added as an argument for execution.
Could you please share some example of how this function can be used?
I found an example here: https://github.com/Visual-Regression-Tracker/examples-js/blob/17575d8621e4974b24b462a009250a281d79616e/agent-cypress/cypress/integration/vrt.spec.js#L18
But is the tool restricted to using an image that exists locally, or can it take as an argument the cy.screenshot command?
Would be interesting to better understand how that works ๐
Also, maybe it'd be interesting for admin to open up a Discussions
section in the VRT Gitlab projects, where we can ask such questions and discuss topics with project administrators and the community.
Hi, I'm currently implementing this and have come across an issue.
We have a cypress command that modifies the viewport and takes 5 screenshots at different screen sizes. The issue is that when the first screenshot has no baseline, the test stops and doesn't take the next 4 screenshots.
Setting enableSoftAssert: true let's the test run all the way through, but then causes another problem - the tests never fail when there are differences.
It would be great to have an auto-approve if no baseline exists setting in VRT, or alternatively a way to take all the screenshots before the test fails.
Thanks.
Adding the VRT plugin, as per the example in the readme: https://github.com/Visual-Regression-Tracker/agent-cypress#add-plugin
Will conflict with other plugins required for some specific cases, for example a plugin created to allow the manipulation of the screen size in run mode: https://docs.cypress.io/api/plugins/browser-launch-api#Set-screen-size-when-running-headless
Due to this matter, the results of the vrtTrack command are different screen sizes between Open Mode and Run Mode, resulting in an error from VRT as the different screen sizes cannot be compared.
There is a simple workaround to this, that is to add the screen-size-manipulation plugin in the same export as the VRT plugin, but would prefer to be able to keep them separately.
This issue might be coming from the fact that the VRT plugin is exported by and then ran by plugins file as a function, instead a module export, as per here:
Line 8 in c8f4775
Would be glad to know your thoughts and if you might have a quick-win solution for this one ๐
Hi, it's pretty similar issue to #217 but the topic was closed.
I am having the following error:
X [ERROR] Could not resolve "fs"
node_modules/@visual-regression-tracker/agent-cypress/dist/plugin.js:13:21:
13 โ const fs_1 = require("fs");
โต ~~~~
The package "fs" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
X [ERROR] Could not resolve "fs"
node_modules/@visual-regression-tracker/sdk-js/dist/helpers/config.helper.js:4:21:
4 โ const fs_1 = require("fs");
โต ~~~~
The package "fs" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
X [ERROR] Could not resolve "fs"
node_modules/@visual-regression-tracker/sdk-js/dist/helpers/dto.helper.js:8:37:
8 โ const fs_1 = __importDefault(require("fs"));
โต ~~~~
The package "fs" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
Oops...we found an error preparing this test file:
> cypress\support\index.ts
The error was:
Error: Build failed with 3 errors:
node_modules/@visual-regression-tracker/agent-cypress/dist/plugin.js:13:21: ERROR: Could not resolve "fs"
node_modules/@visual-regression-tracker/sdk-js/dist/helpers/config.helper.js:4:21: ERROR: Could not resolve "fs"
node_modules/@visual-regression-tracker/sdk-js/dist/helpers/dto.helper.js:8:37: ERROR: Could not resolve "fs"
at failureErrorWithLog (C:\Users\HASAZEN\GitHub\testproject-cbportal-user-interface\node_modules\esbuild\lib\main.js:1650:15)
at C:\Users\HASAZEN\GitHub\testproject-cbportal-user-interface\node_modules\esbuild\lib\main.js:1059:25
at runOnEndCallbacks (C:\Users\HASAZEN\GitHub\testproject-cbportal-user-interface\node_modules\esbuild\lib\main.js:1485:45)
at buildResponseToResult (C:\Users\HASAZEN\GitHub\testproject-cbportal-user-interface\node_modules\esbuild\lib\main.js:1057:7)
at C:\Users\HASAZEN\GitHub\testproject-cbportal-user-interface\node_modules\esbuild\lib\main.js:1086:16
at responseCallbacks.<computed> (C:\Users\HASAZEN\GitHub\testproject-cbportal-user-interface\node_modules\esbuild\lib\main.js:703:9)
at handleIncomingPacket (C:\Users\HASAZEN\GitHub\testproject-cbportal-user-interface\node_modules\esbuild\lib\main.js:763:9)
at Socket.readFromStdout (C:\Users\HASAZEN\GitHub\testproject-cbportal-user-interface\node_modules\esbuild\lib\main.js:679:7)
at Socket.emit (node:events:513:28)
at Socket.emit (node:domain:489:12)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Socket.Readable.push (node:internal/streams/readable:234:10)
when I try to add commands to my e2e project.
Cypress version is: 13.7.3
Is this problem fixed completely with the new version ?
Hello,
The plugin interface has changed on Cypress; I appreciate any example or update in the documentation on maintaining the integration.
Currently logs are shown only in console
Add them with Cypress.Log
command https://docs.cypress.io/api/commands/log.html#Syntax
Hi!
We use this plugin on our CI to make use of the tests and keep the library updated.
But on local env the tests don't run without this plugin configured (and we don't want to configure it locally).
Is there a workaround?
Tested the below use case with the Cypress-Agent:
Is there any way to allow the tests to run async and independent of the engine of VRT, at least when the enableSoftAssert is set to true?
If we don't want to fail the tests because of the results of the visual test, then at least we could leverage the speed of the tests.
Let me know if this issue should actually be moved to the js-sdk - was not 100% sure, but that might be best ๐
PR with details: #159
Trying to use VRT + Cypress agent to compare images for projects that use odiff
or look-same
image compare libraries will result in the following error:
CypressError: `cy.task('VRT_TRACK_IMAGE_MULTIPART')` failed with the following error:
> {
"path": "/test-runs/multipart",
"name": "Error",
"message": "",
"exception": {},
"stack": "Error\n at ChildProcess.<anonymous> (/node_modules/odiff-bin/odiff.js:147:13)\n at ChildProcess.emit (events.js:327:22)\n at maybeClose (internal/child_process.js:1021:16)\n at Socket.<anonymous> (internal/child_process.js:443:11)\n at Socket.emit (events.js:315:20)\n at Pipe.<anonymous> (net.js:674:12)"
}
https://on.cypress.io/api/task
Could you please let me know if
I tried to find some documentation on this or troubleshoot myself, but unfortunately could not find anything.
Thank you ๐
Start build only if it wasn't started before
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.