p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

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

Open Irfan762 opened this issue 9 months ago • 3 comments

p5.js version

No response

What is your operating system?

None

Web browser and version

No response

Actual Behavior

Actual Behavior Play and Stop buttons in the toolbar lack data-testid attributes, making them difficult to target reliably in automated E2E tests. Tests currently must rely on CSS classes (fragile) or ARIA labels (not always present).

This makes it harder to write stable E2E tests for the core sketch execution workflow.

Expected Behavior

Expected behavior: Play and Stop buttons should have semantic test identifiers:

data-testid="play-button" data-testid="stop-button"

Steps to reproduce

Inspect Play button in toolbar No data-testid attribute present E2E tests must use fragile selectors like CSS classes

Irfan762 avatar Mar 03 '26 04:03 Irfan762

@raclim assign me

Irfan762 avatar Mar 03 '26 09:03 Irfan762

Hi! I’d like to work on this issue. I’m currently exploring E2E testing improvements for the editor and this seems like a great starting point.

sanchit955 avatar Mar 25 '26 23:03 sanchit955

Hi, thanks for this idea, sorry it took a while to get to! We're reviewed it with @clairep94 and in the current state of the E2E testing, this is not necessary. So I'll close this one.

ksen0 avatar Sep 18 '26 15:09 ksen0