odiff icon indicating copy to clipboard operation
odiff copied to clipboard

question how to use your tool with Cypress/Typescript

Open jradom opened this issue 5 years ago • 13 comments

Hello,

I saw your sample images use Cypress screenshots. So, do you have by any chance a sample code with Cypress with necessary configurations?

Thanks

Jeff

jradom avatar Nov 14 '20 08:11 jradom

Thank you @jradom – I will make an example! Thanks

P.S. there is an example of how to use this tool from node.js it's in the readme – but I will add the Cypress.io example as well!

dmtrKovalenko avatar Nov 14 '20 08:11 dmtrKovalenko

sounds great

Thanks (spasibo)

Jeff

jradom avatar Nov 14 '20 09:11 jradom

Hi Dmitriy,

I've tried CLI odiff run and got this

radomj-N7JG5L:~ radomj$ odiff --help

-bash: odiff: command not found

Please advise.

Thanks

Jeff

On Sat, Nov 14, 2020 at 12:43 AM Dmitriy Kovalenko [email protected] wrote:

Thank you @jradom https://github.com/jradom – I will make an example! Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dmtrKovalenko/odiff/issues/6#issuecomment-727169337, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE4ZGPLQ3BT7NPV4NXSDDFDSPY7MZANCNFSM4TVNPRIA .

jradom avatar Nov 15 '20 00:11 jradom

I was able to run your tool like this under no_modules

but got these errors

SyntaxError: Invalid or unexpected token at Module._compile (internal/modules/cjs/loader.js:895:18) at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10) at Module.load (internal/modules/cjs/loader.js:815:32) at Function.Module._load (internal/modules/cjs/loader.js:727:14) at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10) at internal/main/run_main_module.js:17:11 radomj-N7JG5L:bin radomj$ node ODiffBin ~/Downloads/case_baseline.png ~/Downloads/case_actual.png ~/Downloads/case_diff.png

jradom avatar Nov 15 '20 03:11 jradom

I'd also like to know if I run CLI from Typescript or Cypress if I'll get a return code 0 or 1 when images are identical or mismatched

jradom avatar Nov 15 '20 03:11 jradom

Hi Dmitry,

This is just a friendly reminder about Cypress/Typescript sample code you had promised. I really like your tool but need to try it before use. Also, I pretty new to Cypress and Typescript/javascript but use java/Selenium for about 10 years

Thanks

Jeff

On Sat, Nov 14, 2020 at 12:43 AM Dmitriy Kovalenko [email protected] wrote:

Thank you @jradom https://github.com/jradom – I will make an example! Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dmtrKovalenko/odiff/issues/6#issuecomment-727169337, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE4ZGPLQ3BT7NPV4NXSDDFDSPY7MZANCNFSM4TVNPRIA .

jradom avatar Nov 17 '20 06:11 jradom

Sorry, I’ve been working on integrating this with other more complex snapshot-based stuff. But ok I will do a quick demo

dmtrKovalenko avatar Nov 18 '20 07:11 dmtrKovalenko

this sounds really great because I was able to use your tool at all but in readme , it had looked really great

Thanks a lot in advance

Jeff

jradom avatar Nov 18 '20 07:11 jradom

BTW, where in Ukraine are you located? Just curious

jradom avatar Nov 18 '20 08:11 jradom

Hello,

I saw your sample images use Cypress screenshots. So, do you have by any chance a sample code with Cypress with necessary configurations?

Thanks

Jeff

Hello Jeff, were you able to make this work in Cypess? I have been trying but since I am pretty new to Cypress/Typescript I don't really know how to configure it correctly. Thanks

georgio1972 avatar Feb 22 '21 19:02 georgio1972

Hi @dmtrKovalenko, odiff looks promising., could you add some more details on how to integrate with cypress? Maybe an example repo would be a great help.

dhamo-pk avatar Nov 01 '21 10:11 dhamo-pk

Hi everyone, Please check this detailed blog post from @gleb about odiff and cypress integration and here is the repo for the same.

sadeesh-sdet avatar Nov 26 '21 05:11 sadeesh-sdet