Skip to content

internal(browser): Add Click action support to Browser Test Editor#1156

Merged
going-confetti merged 2 commits intomainfrom
internal/click-action-editor
Apr 9, 2026
Merged

internal(browser): Add Click action support to Browser Test Editor#1156
going-confetti merged 2 commits intomainfrom
internal/click-action-editor

Conversation

@going-confetti
Copy link
Copy Markdown
Collaborator

@going-confetti going-confetti commented Apr 9, 2026

Description

  • Add basic support for the click action
  • ⚠️ This PR doesn't implement any options just yet
grafik

How to Test

  • Add a new "Click element" action
  • Configure the locator
  • Verify that the action appears in the generated script

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have commented on my code, particularly in hard-to-understand areas.

Related PR(s)/Issue(s)


Note

Medium Risk
Adds a new action type that affects browser test script generation and editor behavior; mistakes could produce incorrect or non-functional generated tests, though scope is limited and options are currently hardcoded.

Overview
Adds basic locator.click support end-to-end in the Browser Test Editor.

The editor can now create and edit a new “Click element” action (new ClickActionBody, menu item, and registry entry with icon) and uses a shared createDefaultLocatorOptions() helper for default locator initialization.

Code generation (convertActionsToTest in src/codegen/browser/test.ts) now converts locator.click actions into click test nodes with default left-button and no-modifier settings.

Reviewed by Cursor Bugbot for commit 21ab714. Bugbot is set up for automated code reviews on this repo. Configure here.

@@ -76,6 +76,13 @@ function NewActionMenu({ onAddAction }: NewActionMenuProps) {
</Button>
</DropdownMenu.Trigger>
<DropdownMenu.Content>
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As more actions get added, we'll need to use something better than a simple dropdown menu

@going-confetti going-confetti marked this pull request as ready for review April 9, 2026 10:35
@going-confetti going-confetti requested a review from a team as a code owner April 9, 2026 10:35
Copy link
Copy Markdown
Collaborator

@e-fisher e-fisher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@going-confetti going-confetti merged commit d6a1e14 into main Apr 9, 2026
14 checks passed
@going-confetti going-confetti deleted the internal/click-action-editor branch April 9, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants