Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .claude/commands/test.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Run Cypress tests filtered by tag.
Run end-to-end tests filtered by tag.

Arguments: [tag] - Optional tag to filter by (@core, @attach, etc.) or "all" to
run all tests

1. If a tag argument was provided, use it. Otherwise, ask the user which tag to
filter by (@core, @attach, etc. or "all" to run all tests)
2. If the tag is "all", run the tests using
`CYPRESS_SKIP_OLS_SETUP='true' npm run test-headless`. Otherwise, run the
`SKIP_OLS_SETUP='true' npm run test-headless`. Otherwise, run the
tests using
`CYPRESS_SKIP_OLS_SETUP='true' npm run test-headless -- --expose grepTags="@<tag>"`
`SKIP_OLS_SETUP='true' npm run test-headless -- --grep "@<tag>"`
3. Report the test results

Output a bullet point list of each test that was run with a ✅, ❌ or ⏭️ to
Expand Down
2 changes: 1 addition & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Bash(node --version)",

"Bash(npm --version)",
"Bash(CYPRESS_SKIP_OLS_SETUP='true' npm run test-headless)",
"Bash(SKIP_OLS_SETUP='true' npm run test-headless)",
"Bash(npm run build)",
"Bash(npm run i18n)",
"Bash(npm run lint-fix)",
Expand Down
4 changes: 2 additions & 2 deletions .cursor/skills/test/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: test
description: >-
Run Cypress tests filtered by tag. Use when the user asks to run tests,
run Cypress, or test a specific feature tag like @core or @attach.
Run end-to-end tests filtered by tag. Use when the user asks to run tests,
run Playwright, or test a specific feature tag like @core or @attach.
---

Read and follow the instructions in `.claude/commands/test.md`.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
.gitignore
.tekton
.vscode
cypress
dist
gui_test_screenshots
node_modules
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ CLAUDE.local.md
dist/
gui_test_screenshots/
node_modules/
tests/.auth/
40 changes: 18 additions & 22 deletions .tekton/integration-tests/lightspeed-console-pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ spec:
env:
- name: COMMIT_SHA
value: $(params.commit)
image: cypress/browsers:26.0.0
image: mcr.microsoft.com/playwright:v1.60.0-noble
resources:
limits:
memory: 4Gi
Expand Down Expand Up @@ -219,31 +219,29 @@ spec:
- name: credentials
mountPath: /credentials
env:
- name: CYPRESS_KUBECONFIG_PATH
- name: KUBECONFIG_PATH
value: "/credentials/$(steps.get-kubeconfig.results.kubeconfig)"
- name: CYPRESS_LOGIN_IDP
- name: LOGIN_IDP
value: "kube:admin"
- name: LLM_TOKEN_PATH
value: "/var/run/openai/token"
- name: CYPRESS_CONSOLE_IMAGE
- name: CONSOLE_IMAGE
value: "$(params.console-image)"
- name: COMMIT_SHA
value: "$(params.commit)"
- name: PASSWORD_PATH
value: "/credentials/$(steps.get-kubeconfig.results.passwordPath)"
- name: CYPRESS_BASE_URL
- name: BASE_URL
value: "$(steps.get-kubeconfig.results.consoleURL)"
resources:
limits:
memory: 8Gi
image: cypress/browsers:26.0.0
image: mcr.microsoft.com/playwright:v1.60.0-noble
script: |
echo "COMMIT_SHA: ${COMMIT_SHA}"
echo "CYPRESS_BASE_URL: ${CYPRESS_BASE_URL}"
echo "CYPRESS_CONSOLE_IMAGE: ${CYPRESS_CONSOLE_IMAGE}"
echo "CYPRESS_KUBECONFIG_PATH: ${CYPRESS_KUBECONFIG_PATH}"
echo "---------------------------------------------"
cat "${CYPRESS_KUBECONFIG_PATH}"
echo "BASE_URL: ${BASE_URL}"
echo "CONSOLE_IMAGE: ${CONSOLE_IMAGE}"
echo "KUBECONFIG_PATH: ${KUBECONFIG_PATH}"
echo "---------------------------------------------"
wget --no-verbose -O oc.tar.gz https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest/openshift-client-linux.tar.gz \
&& tar -xvzf oc.tar.gz \
Expand Down Expand Up @@ -276,18 +274,16 @@ spec:
echo "---------------------------------------------"
NODE_OPTIONS=--max-old-space-size=4096 npm ci --omit=optional --no-fund
echo "---------------------------------------------"
npx cypress install
echo "---------------------------------------------"
export CYPRESS_LOGIN_PASSWORD=$(cat ${PASSWORD_PATH})
export LOGIN_PASSWORD=$(cat ${PASSWORD_PATH})
set +e
NO_COLOR=1 npx cypress run
npx playwright test
err_status=$?
echo -n "${err_status}" > /workspace/cypress-exit-code
echo -n "${err_status}" > /workspace/playwright-exit-code
echo "---------------------------------------------"
ls ./gui_test_screenshots
mv ./gui_test_screenshots /workspace/artifacts/
set -e
echo "Cypress exit code: ${err_status}"
echo "Playwright exit code: ${err_status}"
echo "---------------------------------------------"
- name: gather-cluster-resources
onError: continue
Expand Down Expand Up @@ -334,23 +330,23 @@ spec:
value: "quay.io/openshift-lightspeed/ols-console-artifacts:$(params.commit)"
- name: credentials-volume-name
value: ols-konflux-artifacts-bot-creds
- name: assert-cypress-succeeded
- name: assert-playwright-succeeded
image: quay.io/konflux-qe-incubator/konflux-qe-tools:latest
workingDir: "/workspace/"
script: |
#!/bin/bash
set -euo pipefail
code_file="/workspace/cypress-exit-code"
code_file="/workspace/playwright-exit-code"
if [ ! -f "$code_file" ]; then
echo "Cypress exit code file missing at $code_file"
echo "Playwright exit code file missing at $code_file"
exit 99
fi
code=$(cat "$code_file")
if [ "$code" != "0" ]; then
echo "Cypress failed with exit code: $code"
echo "Playwright failed with exit code: $code"
exit "$code"
fi
echo "Cypress tests passed"
echo "Playwright tests passed"
- name: fail-if-any-step-failed
ref:
resolver: git
Expand Down
10 changes: 5 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ All conversation state (chat history, attachments, etc.) is managed in Redux.
- Put images and other assets in `src/assets/`
- Modules and extensions exposed by the plugin are added to
`console-extensions.json`
- End-to-end tests live in `tests/` and `cypress/`
- End-to-end tests live in `tests/`
- Unit tests live in `unit-tests/`

### Coding style
Expand Down Expand Up @@ -84,8 +84,6 @@ All conversation state (chat history, attachments, etc.) is managed in Redux.
### Running

- Dependencies are installed by running `npm install`
- Then run `npx cypress install` to download the Cypress binary (required
because `.npmrc` sets `ignore-scripts=true`)
- To run the project locally:
- Run `npm run start` in one terminal
- Starts the dev server for the plugin on port 9001
Expand All @@ -97,11 +95,13 @@ All conversation state (chat history, attachments, etc.) is managed in Redux.
- The `start-console.sh` script includes a proxy configuration that routes
requests through the console, avoiding CORS issues

### End-to-end tests (Cypress)
### End-to-end tests (Playwright)

- Run `npx playwright install` to download browser binaries (required because
`.npmrc` sets `ignore-scripts=true`)
- To run all tests: `npm run test-headless`
- To run just some tests filtered by tag:
`npm run test-headless -- --expose grepTags="@attach"`
`npm run test-headless -- --grep "@attach"`
- See `tests/README.md` for full details and environment variables

### Unit tests
Expand Down
99 changes: 0 additions & 99 deletions cypress.config.ts

This file was deleted.

2 changes: 0 additions & 2 deletions cypress/OWNERS

This file was deleted.

Loading