Issue
You attempt to perform automation testing but you are unable to locate the data-testid attributes for certain controls in the Constellation interface.
Symptoms and Impact
You are unable to configure automatic tests due to nonunique or missing Test ID's. Developers rely on these attributes for automation testing to verify the presence of data-testid's in the DOM. Without the data-testid, they are unable to implement logic for such tests.
Steps to reproduce
In Constellation, users are given the option to update the data-test-id attribute in the property configuration, as shown in the screenshot below:
Test ID behavior:
- If no Test ID is provided for the input field, the Label name is used as the Test ID. For example, if the Label name is "firstname", the Test ID will appear as
data-testid="firstname:input"
.
- If a test ID is provided, it will follow this format:
data-testid="providedtestidname:input".
Despite the ability to manually author Test ID’s, users encounter the below product limitations:
Scenario 1
Non-unique data-testid in the main navigation menu:
-
Log into the portal
-
Inspect the navigation menu in the Document Object Model (DOM)
-
Click on any menu item
-
Each menu item displays the same data-testid:
“data-testid=":link:"
Expected behavior: the menu should display data-testid="menuitemname:link"
. For example, a menu item named "home" should display as data-test-id="home:link"
.
Scenario 2
Case area buttons missing data-testid attributes:
-
Log into the portal
-
Open a stage in the process, which will include case action area buttons.
-
Inspect the case area buttons.
-
None of the buttons will display unique attributes, including the data-testid attribute.
Root Cause
A defect in Pega’s rule or code which currently omits data-test-id on the main navigation menus, as well as on the
and Case Action buttons.Solution
The fix will be implemented in later releases. This Known Issue document will be updated with release details when the fix for this issue is available.
Related content
Tools for testing the traditional UI