mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-31 01:35:15 +02:00
Ivan - Frontend - Update menu tests [skip ci]
This commit is contained in:
parent
7bad36f107
commit
75a839dea7
@ -37,7 +37,8 @@ describe('Menu component', function () {
|
|||||||
{content: 'Second Item', icon: 'ICON_2'},
|
{content: 'Second Item', icon: 'ICON_2'},
|
||||||
{content: 'Third Item', icon: 'ICON_3'},
|
{content: 'Third Item', icon: 'ICON_3'},
|
||||||
{content: 'Fourth Item', icon: 'ICON_4'}
|
{content: 'Fourth Item', icon: 'ICON_4'}
|
||||||
]
|
],
|
||||||
|
itemsRole: 'some_role'
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(items.length).to.equal(4);
|
expect(items.length).to.equal(4);
|
||||||
@ -47,6 +48,7 @@ describe('Menu component', function () {
|
|||||||
expect(items[3].textContent).to.equal('Fourth Item');
|
expect(items[3].textContent).to.equal('Fourth Item');
|
||||||
|
|
||||||
items.forEach((item, index) => {
|
items.forEach((item, index) => {
|
||||||
|
expect(item.getAttribute('role')).to.equal('some_role');
|
||||||
expect(item.className).to.contain('menu__list-item');
|
expect(item.className).to.contain('menu__list-item');
|
||||||
expect(item.childNodes[0]).to.equal(ReactDOM.findDOMNode(icons[index]));
|
expect(item.childNodes[0]).to.equal(ReactDOM.findDOMNode(icons[index]));
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user