GoJS Robot broken in 3.0.4

I’m not entirely sure this is the case, but it would be quite a coincidence if not.

I updated to GoJS 3.0.4 from 2.2.6 recently, and I’ve been going through fixing some tests. One of the tests that’s failing was a delete test, which I hadn’t been able to track the source down for.

As part of that, I did some poking around in y’alls example tests to make sure I hadn’t missed anything, and I noticed your example test here: Simulating Input | GoJS appears to have the exact same failure. All of the buttons work in order, except for the delete, which fails silently, while a manualy delete keypress works. Can you sanity check for me that there’s not something broken on your end?

Ah, that’s true. Sorry about that – we didn’t completely update the Robot.ts code in the upgrade to v3.0. That will be fixed in 3.0.6.

In the meantime, if you want, you can edit the Robot.ts or Robot.js file so:

    if (typeof keyorcode === 'string') {
      n.key = keyorcode;
      n.code = keyorcode;
    } else if (typeof keyorcode === 'number') {
      n.key = String.fromCharCode(keyorcode);
      n.code = n.key;

in both Robot.doKeyDown and doKeyUp.

Do you have a rough timeline for that update? If it’ll be in the next week or two I’ll probably just comment out the test and make a note to myself to readd it with the 3.0.6 update.

In a few days.

1 Like