trezor/connect

Unable to run test suite

Closed this issue · 3 comments

After following the instructions on running the test suite, I end up in a state where none of the tests seem capable of running. For example, running npm run test -- -t signTransaction gives me

> bash ./src/__tests__/run.sh "-t" "signTransaction"

Value 17 unknown for type Capability
Value 17 unknown for type Capability
Value 17 unknown for type Capability
ℹ 「wdm」: Compiled successfully.
ℹ 「wdm」: Compiling...
ℹ 「wdm」: Compiled successfully.
LOG: 'Test: SignTransaction'
LOG: '- Running /oneThreeFee ...'
WARN: Object{event: 'RESPONSE_EVENT', type: 'RESPONSE_EVENT', id: 1, success: false, payload: Object{error: 'Device is not a debug link'}}
ERROR: 'Cannot load debugLink state', 'Device is not a debug link'
Chrome 80.0.3987 (Mac OS X 10.15.3) ERROR
  Some of your tests did a full page reload!
Chrome 80.0.3987 (Mac OS X 10.15.3): Executed 0 of 13 ERROR (15.047 secs / 0 secs)

The trezord seems to be running as I can access the status page at http://127.0.0.1:21325/status/.
When I run the test, the emulator is spun up and I can see the emulated trezor screen run through some steps and finish on a screen that includes a warning that there is no pin set (which I believe is expected). I tried to run on specific tests as well as the whole test suite with the same result. Anything else I'm missing?

Are you sure that you are running those test agains emulator and not physical trezor device?
Error clearly says that this is not a debug link device.
Debug link (emulator) is mandatory to allow "click on device" (decision) operation

Hi @bucko13
In case you have not given up yet, you may try this.
https://github.com/trezor/connect/tree/develop/tests
I am closing it now but if feel free to reopen anytime if anything remains unclear

Sorry, had to move on to other things and let this sit. I was running against an emulator which is what was confusing about the message. In any case, I was able to get working what I needed to test anyway so didn't need to revisit. Thanks for the link. I'll try it out next time!