diff --git a/platform/ui/src/components/userPreferencesForm/UserPreferencesTabs.js b/platform/ui/src/components/userPreferencesForm/UserPreferencesTabs.js index e5d343fd8..47fd764c6 100644 --- a/platform/ui/src/components/userPreferencesForm/UserPreferencesTabs.js +++ b/platform/ui/src/components/userPreferencesForm/UserPreferencesTabs.js @@ -43,6 +43,7 @@ const renderTabsHeader = (tabs, activeTabIndex, onHeaderChanged) => { ? tabs.map((tab, index) => { const { name, hidden = false } = tab; + const cypressSelectorId = name.toLowerCase(); const tabClass = index === activeTabIndex ? 'nav-link active' : 'nav-link'; return !hidden ? ( @@ -52,6 +53,7 @@ const renderTabsHeader = (tabs, activeTabIndex, onHeaderChanged) => { onHeaderChanged(index); }} className={tabClass} + data-cy={cypressSelectorId} > diff --git a/platform/ui/src/viewer/ToolbarButton.js b/platform/ui/src/viewer/ToolbarButton.js index 2959059b3..bebc47850 100644 --- a/platform/ui/src/viewer/ToolbarButton.js +++ b/platform/ui/src/viewer/ToolbarButton.js @@ -23,8 +23,14 @@ export function ToolbarButton(props) { } }; + const cypressSelectorId = props.label.toLowerCase(); + return ( -