There is a comprehensive quick start guide in the Storybook Documentation to setting up an Insights environment complete with:
-
npm install -
npm run start
Checkout https://stage.foo.redhat.com:1337/ Read more.
npm run testtestsnpm run lintwill run the linter
Opens the Cypress GUI for running end-to-end tests. Similar to npm test, this script requires environment variables for authentication:
E2E_USER=<your-e2e-user> E2E_PASSWORD=<your-e2e-password> npm run cypress -- openReplace the placeholders with appropriate values.
This script requires running the application locally. If you want to use stage environment you have to provide URL and HTTP_PROXY variables
URL=https://console.stage.redhat.com HTTP_PROXY=<corporate-proxy-URL> E2E_USER=<your-e2e-user> E2E_PASSWORD=<your-e2e-password> npm run cypres -- openIf you want to use production site you can use just the URL
URL=https://console.redhat.com E2E_USER=<your-e2e-user> E2E_PASSWORD=<your-e2e-password> npm run cypres -- openRun the Playwright E2E tests. Authentication is handled automatically via the @redhat-cloud-services/playwright-test-auth package, which performs Red Hat SSO login once during global setup and reuses the authenticated session across all tests.
Requirements:
E2E_USERandE2E_PASSWORDenvironment variables
Basic usage:
E2E_USER=<your-e2e-user> E2E_PASSWORD=<your-e2e-password> npm run test:playwrightTargeting a specific environment:
Set BASE (or reuse URL) to point at different environments:
BASE=https://cloud.redhat.com E2E_USER=<your-e2e-user> E2E_PASSWORD=<your-e2e-password> npm run test:playwrightUsing a proxy:
If you see a preprod lockdown page when targeting stage, your Playwright browser likely isn’t on VPN. In that case, run with a proxy:
BASE=https://console.stage.redhat.com \
HTTPS_PROXY=http://<your-corp-proxy>:<port> \
NO_PROXY=localhost,127.0.0.1 \
E2E_USER=<your-e2e-user> E2E_PASSWORD=<your-e2e-password> \
npm run test:playwrightHow it works:
- Authentication happens once via global setup (before any tests run)
- The authenticated session is stored in
playwright/.auth/user.json - All tests automatically use this session, eliminating repetitive login steps
- Cookie prompts are handled by importing
disableCookiePromptfrom the package
The following four branches are used
-
Stable
- prod-stable -> releases to console.redhat.com
- master-stable -> releases to console.stage.redhat.com
-
Beta
- prod-beta -> releases to console.redhat.com/beta
- master -> releases to console.stage.redhat.com/beta