Skip to content

feat: add update-che-e2e-tests command for automated e2e test fixes #23899

Description

@olexii4

Is your enhancement related to a problem? Please describe

Summary

Add an /che-ai-assistant update-che-e2e-tests bot command that automatically creates e2e fix PRs for eclipse-che/che when dashboard changes break UI locators.

Problem

Dashboard PRs sometimes change aria-labels, data-testids, or other selectors that e2e tests in eclipse-che/che rely on. Tracking that down currently requires:

  1. Reading the dashboard diff manually
  2. Grepping tests/e2e/pageobjects/ for the old values
  3. Patching the locator methods by hand
  4. Opening a follow-up PR in eclipse-che/che

This is repetitive and easy to miss.

Example: eclipse-che/che-dashboard#1544 changed:

aria-label="Actions"  →  aria-label="Actions for ${workspace.name}"

That broke getActionsLocator() and getExpandedActionsLocator() in
tests/e2e/pageobjects/dashboard/Workspaces.ts. The fix had to be tracked and applied manually in eclipse-che/che#23830.

Describe the solution you'd like

Proposed solution

A new bot subcommand triggered by commenting on a dashboard PR:

/che-ai-assistant update-che-e2e-tests

The command starts a DevWorkspace with Claude Code, which:

  1. Reads the dashboard PR diff to identify changed selectors (aria-labels, data-testids, CSS classes, button text)
  2. Searches tests/e2e/pageobjects/ in eclipse-che/che for page objects using the old values
  3. Patches the affected locator methods
  4. Opens a draft PR in eclipse-che/che and posts the URL back as a comment on the dashboard PR

Implementation scope

File Change
pkg/commands/commands.go Add SubCommandUpdateCheE2ETests constant and register in SubCommands slice
templates/update-che-e2e-tests.tmpl Prompt template guiding the DevWorkspace Claude session
pkg/handlers/update_che_e2e_tests_handler.go Parse the created PR URL from Claude output, post it as a comment
pkg/handlers/update_che_e2e_tests_handler_test.go Unit tests for URL parsing
pkg/processor/processor.go Wire the handler into the command dispatch map
README.md Document the new command and CHE_AI_ASSISTANT_E2E_GITHUB_TOKEN env var

Describe alternatives you've considered

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/enhancementA feature request - must adhere to the feature request template.severity/P2Has a minor but important impact to the usage or development of the system.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions