Skip to content

Commit 69e648a

Browse files
feat(AnalyticalTable): Add Highlight Column (#391)
Closes #312
1 parent 193e8ef commit 69e648a

File tree

11 files changed

+728
-11
lines changed

11 files changed

+728
-11
lines changed

packages/main/src/components/AnalyticalTable/AnalyticalTable.test.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { createPassThroughPropsTest } from '@shared/tests/utils';
22
import { mount } from 'enzyme';
33
import { AnalyticalTable } from '@ui5/webcomponents-react/lib/AnalyticalTable';
4+
import { ValueState } from '@ui5/webcomponents-react/lib/ValueState';
45
import { TableSelectionMode } from '@ui5/webcomponents-react/lib/TableSelectionMode';
56
import { AnalyticalTableScrollMode } from '@ui5/webcomponents-react/lib/AnalyticalTableScrollMode';
67
import React, { useRef } from 'react';
@@ -31,7 +32,8 @@ const data = [
3132
friend: {
3233
name: 'MAR',
3334
age: 28
34-
}
35+
},
36+
status: ValueState.Success
3537
},
3638
{
3739
name: 'bla',
@@ -293,5 +295,19 @@ describe('AnalyticalTable', () => {
293295
expect(tableInnerRef.scrollTop).toBe(2);
294296
});
295297

298+
test('with highlight row', () => {
299+
const wrapper = mount(
300+
<AnalyticalTable
301+
title="Table Title"
302+
data={data}
303+
columns={columns}
304+
selectionMode={TableSelectionMode.SINGLE_SELECT}
305+
withRowHighlight
306+
/>
307+
);
308+
309+
expect(wrapper.render()).toMatchSnapshot();
310+
});
311+
296312
createPassThroughPropsTest(AnalyticalTable);
297313
});

0 commit comments

Comments
 (0)