oasislabs / secret-ballot

Secret Ballot example dApp
Apache License 2.0
7 stars 7 forks source link

CI/CD and tests #21

Open ryscheng-mobile opened 5 years ago

ryscheng-mobile commented 5 years ago

The deployed DApp is broken:

app.js:2760 TypeError: Cannot read property 'then' of undefined at load (app.js:2739) window.ethereum.enable.then.catch @ app.js:2760 inpage.js:1 Uncaught TypeError: e is not a function at inpage.js:1 at inpage.js:1 at inpage.js:1 at inpage.js:1 at i (inpage.js:1) at inpage.js:1 at inpage.js:1 at u (inpage.js:1) at a (inpage.js:1) at inpage.js:1 /favicon.ico:1 Failed to load resource: the server responded with a status of 403 ()

CI should have enough tests to catch a broken build

willscott commented 5 years ago

that's a metamask interaction error. you're asking for an instrumented browser for tests... which i don't think can be done headless. This is probably too much work for anytime soon.

ryscheng commented 5 years ago

Armani found the cause of the error. In one place we weren't using web3c. https://github.com/oasislabs/secret-ballot/commit/261e6bcd3369e0e1d7a58d66bb5a0a621ff06b4c

I expect we should be able to write an end to end mocha test for something like this no?

On Wed, Nov 14, 2018, 01:27 Will notifications@github.com wrote:

that's a metamask interaction error. you're asking for an instrumented browser for tests... which i don't think can be done headless. This is probably too much work for anytime soon.

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/oasislabs/secret-ballot/issues/21#issuecomment-438595203, or mute the thread https://github.com/notifications/unsubscribe-auth/AAimah0MZXP2R4t5jja6Wvy1zNg-dcAFks5uu-HggaJpZM4Yc0y7 .

willscott commented 5 years ago

for truffle side, not for the in-browser against metamask side nearly as easily.

On Wed, Nov 14, 2018 at 7:29 AM Raymond Cheng notifications@github.com wrote:

Armani found the cause of the error. In one place we weren't using web3c.

https://github.com/oasislabs/secret-ballot/commit/261e6bcd3369e0e1d7a58d66bb5a0a621ff06b4c

I expect we should be able to write an end to end mocha test for something like this no?

On Wed, Nov 14, 2018, 01:27 Will notifications@github.com wrote:

that's a metamask interaction error. you're asking for an instrumented browser for tests... which i don't think can be done headless. This is probably too much work for anytime soon.

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/oasislabs/secret-ballot/issues/21#issuecomment-438595203 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAimah0MZXP2R4t5jja6Wvy1zNg-dcAFks5uu-HggaJpZM4Yc0y7

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/oasislabs/secret-ballot/issues/21#issuecomment-438702875, or mute the thread https://github.com/notifications/unsubscribe-auth/AAaIp8smveIKnTdc4TZhIxh2h7Tact4Pks5uvDbTgaJpZM4Yc0y7 .