This directory contains the end-to-end (E2E) tests for the MetaConfigurator, also known as UI tests. These tests are designed to verify the functionality of MetaConfigurator by simulating user interactions with the UI. The tests are written in TypeScript and utilize the Playwright library for browser automation.
MetaConfigurator needs to be installed. Run the complete E2E test-suite using
npm run test:e2eTo run the tests with a browser visible, run:
npm run test:e2e:uiRunning these commands will first copy the required text-fixtures into the publicfolder and then execute all the E2E tests in the directory.
An individual test file can be executed using
npx playwright test --headed <test_file_name>.spec.tsEach Panel type (e.g., textEditor, guiEditor, schemaDiagram) can modify the internal state of MetaConfigurator.
It can access and read from the data, schema, currentPath and currentSelectedElement (among others) and also write to these properties.
The individual panels are hidden and de-coupled from each other.
We do not have to test the interaction between, for example, the textEditor and the guiEditor and any other specific combination of two panels.
Instead, we can test each panel type in isolation, together with the internal state of MetaConfigurator.
To manipulate or access the internal state of MetaConfigurator, the test panel can be used, see utilsTestPanel.ts for more information.