Commit eb2e31a7 authored by Andrey Azov's avatar Andrey Azov
Browse files

Use uuid for titles of added tabs

parent 65c3514c
Pipeline #195887 passed with stages
in 4 minutes and 28 seconds
......@@ -32,11 +32,11 @@ const createTabGroup = (): Tab[] => {
// Make sure we have atleast one enabled and one disabled entry
options.push({
title: faker.random.words(),
title: faker.datatype.uuid(),
isDisabled: true
});
options.push({
title: faker.random.words(),
title: faker.datatype.uuid(),
isDisabled: false
});
......@@ -100,9 +100,8 @@ describe('<Tabs />', () => {
const unselectedTabIndex = tabsData.findIndex(
(tab) => tab.title !== defaultProps.selectedTab && !tab.isDisabled
);
const unselectedTab = container.querySelectorAll('.tab')[
unselectedTabIndex
];
const unselectedTab =
container.querySelectorAll('.tab')[unselectedTabIndex];
userEvent.click(unselectedTab);
......@@ -114,9 +113,8 @@ describe('<Tabs />', () => {
const unselectedDisabledTabIndex = tabsData.findIndex(
(tab) => tab.title !== defaultProps.selectedTab && tab.isDisabled
);
const disabledTab = container.querySelectorAll('.tab')[
unselectedDisabledTabIndex
];
const disabledTab =
container.querySelectorAll('.tab')[unselectedDisabledTabIndex];
userEvent.click(disabledTab);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment