test: Refactoring toolbar data-cy selectors (#1323)

This commit is contained in:
Mirna Silva authored and Danny Brown committed 2019-12-20 14:07:00 -05:00
1 parent e1142910e4
commit d6d92afbda
6 files changed
+44 -55

No files matched your search

@@ -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}
>
<button>{name}</button>
</li>