Note: If you are just looking to use Gel UI, then you don't need to do any of
these steps, just run the gel ui command from your project directory.
Prerequisites: You will need to have Yarn 2+ installed, and have run the
yarncommand to install the workspace's dependencies.
To start the UI dev server:
yarn devThe app is served at http://localhost:3002/ui.
The Gel server needs to be run separately with cors_allow_origins
configured to allow the UI's localhost:3002 origin:
edb server
# Only needs to be run once:
edb cli configure set cors_allow_origins '*'
To customize the Gel server address (if it's not running at the
default of localhost:5656):
env VITE_GEL_SERVER_URL="192.168.0.123:5656" yarn devPrerequisites: The UI tests use Selenium WebDriver to run tests on Chrome. You will need to have Chrome browser installed, and to have
chromedriverinstalled and available in the systemPATH.(Instructions to install
chromedriver: https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/#3-the-path-environment-variable)
To run the UI tests:
yarn testIf there is already an instance of an Gel dev server running on port 5656, or the UI dev server running on port 3000, then they will be used by the tests. If not (or the tests are running in CI), the test runner will start temporary instances of them for the duration of the tests.
By default the tests run chromedriver in headless mode, but to see the
Chrome window during the tests (eg. for debugging), run with the --no-headless
flag:
yarn test --no-headlessThe tests use the Jest framework, with a custom
environment that provides an already configured instance of the WebDriver
class as the global variable driver. The following common webdriver API's
are also exposed as global variables: By, until, Key.