Skip to content

Add data-testid attributes to Play and Stop buttons for E2E testing#4037

Open
sanchit955 wants to merge 1 commit intoprocessing:developfrom
sanchit955:fix/clean-testid
Open

Add data-testid attributes to Play and Stop buttons for E2E testing#4037
sanchit955 wants to merge 1 commit intoprocessing:developfrom
sanchit955:fix/clean-testid

Conversation

@sanchit955
Copy link
Copy Markdown

Summary

Adds data-testid attributes to the Play and Stop buttons in the toolbar to support stable E2E testing.

Changes

  • Added data-testid="play-button" to the main Play button (id="play-sketch")
  • Added data-testid="stop-button" to the Stop button

Why

Currently, E2E tests rely on fragile selectors like CSS classes or IDs, which may change during refactoring or styling updates.

Using data-testid provides a stable and explicit contract between the UI and test code, improving test reliability.

Impact

  • No functional changes
  • Improves testability of core sketch execution flow

@welcome
Copy link
Copy Markdown

welcome bot commented Mar 26, 2026

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

@sanchit955
Copy link
Copy Markdown
Author

Happy to add corresponding Playwright E2E tests for these selectors if needed.

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.

1 participant