As we scale up RAISE Playground extension development (enabling not only the development of new extensions, but also the improvement and expansion of existing extensions), we need a way to ensure our updates to existing extensions don't break already saved projects.
In order to do this, we need two distinct automated workflows (which can eventually be joined into a single workflow that runs via a github action):
On a given branch, generate an sb3 project that sufficiently utilizes the blocks of an extension.
The definition of sufficiently might change over time, but at least to begin with it can simply be that all blocks are included in the saved project
On a given branch (likely one that branches off from dev), load in ansb3` project that is assumed to be the output of workflow (1) based on a previous version of the extension under test. Assert that no errors in loading occur, and thus no 'breaking' changes have occurred as far as project loading is concerned.
In order to accomplish the above workflows, we should use something like playwright so that we can fully leverage the actual scratch-gui / scratch-vm saving and loading mechanisms.
To implement the above tests, you'll likely have a node script coordinate the following activities:
bundle the extension under test
build and serve the scratch-gui
have a playwright test that navigates to the served location and does things like:
probe for block information (you can set up some global 'hooks' in the framework code to likely make this easier -- and later we can think about how to only include this during test, like using a build flag)
interact with the DOM to drag in blocks, save/ load, things like that
As we scale up RAISE Playground extension development (enabling not only the development of new extensions, but also the improvement and expansion of existing extensions), we need a way to ensure our updates to existing extensions don't break already saved projects.
In order to do this, we need two distinct automated workflows (which can eventually be joined into a single workflow that runs via a github action):
sb3
project that sufficiently utilizes the blocks of an extension.dev), load in an
sb3` project that is assumed to be the output of workflow (1) based on a previous version of the extension under test. Assert that no errors in loading occur, and thus no 'breaking' changes have occurred as far as project loading is concerned.In order to accomplish the above workflows, we should use something like playwright so that we can fully leverage the actual scratch-gui / scratch-vm saving and loading mechanisms.
To implement the above tests, you'll likely have a node script coordinate the following activities: