Open vorburger opened 6 years ago
Got reasonable far, but am now stuck with an issue I don't understand:
see https://github.com/vorburger/minecraft-storeys-maker/commit/afe832702e129ee773539dee63f9cadc2ce0f446 - running that in the browser as described here reproduces above, and should hopefully make it easy to debug for you @edewit ? (Running SeleniumTest onsee https://github.com/vorburger/minecraft-storeys-maker/commit/afe832702e129ee773539dee63f9cadc2ce0f446 makes it fail with something like #23, which is less clear.)
@edewit pointed out that Uncaught Error: INVALID_STATE_ERR
means we're using SockJS EventBus too early; and indeed a quick hack to use eb.onopen gets us past that (@edewit wants to nicely work that into the Minecraft wrapp class).
This uncovers another problem, for some reason this is not quite working yet:
awaitUntilJSReturnsValue("Client side test is not yet done", "tester.isDone()");
this is not quite working yet
Selenium executeScript()
doesn't know what do with the failures as Set object; RTFM, it's JavaDoc even says so. @edewit suggested to simply use a JS array instead, and that did the trick.
Enough for now. Future enhancement could be to use executeAsyncScript()
instead of executeScript()
with a throws for failures instead. In a sense I guess I'm writing a small Selenium / JS Test infrastructure framework here now...
I've started extending our SeleniumTest with a new
testAPI()
to run more tests written in TS client side instead of in Java server side, and to focus on testing the new API, not the Scratch Binding.Got reasonable far, but am now stuck with an issue I don't understand:
@edewit perhaps you could have a look at this, some time?