Skip to content

Conversation

@GuiLeme
Copy link
Collaborator

@GuiLeme GuiLeme commented Dec 10, 2025

What does this PR do?

This PR adds data-test attributes to all extensible areas available to plugin developers, improving testability and enabling automated testing of plugins through Playwright or other testing frameworks.

One other thing: in order to enhance developer experience with testing, in the generic-content-sidekick-area, there are a couple of auto-set data-tests (to avoid possible collisions - One plugin set a data-test different than the other to the same item, for example):

image

Take into consideration the above namings for the following rules:

  • data-test for the Sidekick Header: sidekick_header_${dataTest} - dataTest is set by user;
  • data-test for the Section Title: sidekick_section_title_${section} - section is the name of the secion;
  • data-test for the Section Name: sidekick_menu_item_${dataTest} - dataTest is set by user;

Motivation

Plugin developers need a reliable way to test their plugins through automated testing frameworks like Playwright. Without standardized data-test attributes on extensible area components, it's difficult to target and interact with plugin UI elements in tests. This change provides a consistent testing interface across all extensible areas, making it easier for developers to write robust automated tests for their plugins.

More

Closely related to PR

Testing changes: to test these changes, one can use the sample-generic-content-sidekick-plugin and see data-test in the HTML elements like the following:

image

Copy link
Member

@antonbsa antonbsa left a comment

Choose a reason for hiding this comment

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

LGTM

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