Skip to content

Commit

Permalink
feat(AnalyticalTable): Add Highlight Column (#391)
Browse files Browse the repository at this point in the history
Closes #312
  • Loading branch information
MarcusNotheis authored Mar 27, 2020
1 parent 193e8ef commit 69e648a
Show file tree
Hide file tree
Showing 11 changed files with 728 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { createPassThroughPropsTest } from '@shared/tests/utils';
import { mount } from 'enzyme';
import { AnalyticalTable } from '@ui5/webcomponents-react/lib/AnalyticalTable';
import { ValueState } from '@ui5/webcomponents-react/lib/ValueState';
import { TableSelectionMode } from '@ui5/webcomponents-react/lib/TableSelectionMode';
import { AnalyticalTableScrollMode } from '@ui5/webcomponents-react/lib/AnalyticalTableScrollMode';
import React, { useRef } from 'react';
Expand Down Expand Up @@ -31,7 +32,8 @@ const data = [
friend: {
name: 'MAR',
age: 28
}
},
status: ValueState.Success
},
{
name: 'bla',
Expand Down Expand Up @@ -293,5 +295,19 @@ describe('AnalyticalTable', () => {
expect(tableInnerRef.scrollTop).toBe(2);
});

test('with highlight row', () => {
const wrapper = mount(
<AnalyticalTable
title="Table Title"
data={data}
columns={columns}
selectionMode={TableSelectionMode.SINGLE_SELECT}
withRowHighlight
/>
);

expect(wrapper.render()).toMatchSnapshot();
});

createPassThroughPropsTest(AnalyticalTable);
});
Loading

0 comments on commit 69e648a

Please sign in to comment.