Improved settings section names

This commit is contained in:
Alejandro Celaya
2022-02-14 20:28:28 +01:00
parent ae9e5a0566
commit 30a71ac8b7
6 changed files with 28 additions and 27 deletions

View File

@@ -22,8 +22,8 @@ describe('<Settings />', () => {
const items = wrapper.find(NavPillItem);
expect(items).toHaveLength(3);
expect(items.first().prop('to')).toEqual('app');
expect(items.first().prop('to')).toEqual('general');
expect(items.at(1).prop('to')).toEqual('short-urls');
expect(items.last().prop('to')).toEqual('others');
expect(items.last().prop('to')).toEqual('secondary-items');
});
});

View File

@@ -17,9 +17,13 @@ describe('<NavPills />', () => {
}
});
it('renders provided items', () => {
it.each([
[ undefined ],
[ true ],
[ false ],
])('renders provided items', (fill) => {
const wrapper = shallow(
<NavPills>
<NavPills fill={fill}>
<NavPillItem to="1">1</NavPillItem>
<NavPillItem to="2">2</NavPillItem>
<NavPillItem to="3">3</NavPillItem>
@@ -32,6 +36,6 @@ describe('<NavPills />', () => {
expect(card.prop('body')).toEqual(true);
expect(nav).toHaveLength(1);
expect(nav.prop('pills')).toEqual(true);
expect(nav.prop('fill')).toEqual(true);
expect(nav.prop('fill')).toEqual(!!fill);
});
});