edi9999 / jsqrcode

[deprecated] Lazarsoft's jsqrcode as a node module, object oriented, and with tests
Apache License 2.0
280 stars 63 forks source link

Create a browser based test. #12

Open TCMiranda opened 8 years ago

TCMiranda commented 8 years ago

We support 3 kinds of input: canvas with "qr-canvas" id, image src url and image data.

Our testing framework support only the image data api, because it runs on Node.

I think we should use Nightmare or another similar library to test the browser based apis.

Thanks!

edi9999 commented 8 years ago

Hi,

I never heard of Nightmare, however, it seems to be a great library for that. It is based on Electron which is quite modern. I remember having worked with PhantomJS but the JS engine is very old (comparable to IE7), so it was a big hassle to test in the browser with automation.

Do you have some time to add these tests with Nightmare ?

TCMiranda commented 8 years ago

Well, not much, but I have it already set up. Used about a year ago. So I'll try to update it and post a simple test as soon as i can

software-fang commented 7 years ago

where is "dist/index.js" in examples?

edi9999 commented 7 years ago

you have to run npm run prepublish to generate this file

software-fang commented 7 years ago

Thank you for your solution! But when I run index.html in examples, it reports an error: "Couldn't find enough finder patterns:1 patterns found". why? I upload a local image with qrcode.

edi9999 commented 7 years ago

This means that it did not detect the qrcode.