Launchpad is next-gen Vue application that is rendered by Electron. This acts as the visual user interface you see when running: cypress open
.
It replaces the original electron app, desktop-gui
.
Launchpad has the following responsibilities:
- Allow users to log in through the Dashboard Service
- Onboarding for new users (configure Component Testing dev server, install dependencies, etc)
- Select testing mode (E2E, Component, Node.js)
It is using the following technologies:
- Vue 3 for the UI framework
- code is written with the Composition API
- uses the new
<script setup>
syntax for beter TypeScript support
- Vite for the dev server
- TypeScript
- Urql for the GraphQL client
More details on the front-end setup are found in the @packages/frontend-shared
package README.
Cypress' entire back-end is powered by the @packages/server
package. Launchpad interfaces with it via a GraphQL layer, found in @packages/graphql
.
Here is a short tutorial building a simple app using the same technologies we are using for launchpad. There are a lot of moving pieces; understanding how everything works will help you contribute to Launchpad.
## from repo root
yarn workspace @packages/launchpad build
For the best development experience, you will want to use VS Code with the Volar extension. This will give you type completion inside vue
files.
## from repo root
yarn watch
This starts Vite in watch mode, and any code-generation scripts that need to be running in the background to support our environment. While developing, you might want to consider the CYPRESS_INTERNAL_VITE_DEV option.
In a separate terminal, run:
## from repo root
yarn cypress:open
This starts the GraphQL Server, and opens Cypress. By running this separate from the yarn watch
, you can kill & respawn the Cypress binary without the overhead of the watch processes you'd see by running yarn dev
.
You can access the GraphQL inspector on http://localhost:52200/graphql
.
If you notice your IDE has not updated and is showing errors, even after yarn watch
has run, you might need to reload your IDE. With the amount of code generation running, sometimes the IDE does not recognize that the code has changed.
This project is tested with Cypress itself. It acts exactly like any other Cypress project. It has more component tests than E2E, as we are using Launchpad to dogfood Component Testing.
Component Tests:
## from repo root
yarn workspace @packages/launchpad cypress:open:ct
E2E tests:
## from repo root
yarn workspace @packages/launchpad cypress:open