(
{`${cell.contents} ${rowIndex}*${colIndex}`}
),
className: 'class-test-1'
},
{
field: 'networks',
headerName: 'Networks',
type: 'textList',
cellClassName: () => 'class-test-2'
},
{
field: 'actionButtons',
type: 'actionButtons',
actions: [],
cellClassName: 'class-test-3'
}
]}
rows={[
{
id: 'row1',
name: {
contents: 'Row*Col:'
},
networks: {
text: ['Developers', 'Sales', 'Production', 'All Users', 'Admins']
}
}
]}
/>
);
expect(baseElement).toBeTruthy();
});
it('should render Groups mock and click twice', () => {
const { getAllByRole, getByTestId } = render();
const firstCellEl = getAllByRole('gridcell')[0];
firstCellEl.click();
expect(cellClickHandler).toHaveBeenCalled();
const actionViewEl = getByTestId(`${mockGroupsRowId}_view`);
actionViewEl.click();
expect(actionClickHandler).toHaveBeenCalled();
});
it('should render Integrations mock and click twice', () => {
const { getAllByRole, getByTestId } = render();
const firstCellEl = getAllByRole('gridcell')[0];
firstCellEl.click();
expect(cellClickHandler).toHaveBeenCalled();
const actionEditEl = getByTestId(`${mockIntegrationsRowId}_edit`);
actionEditEl.click();
expect(actionClickHandler).toHaveBeenCalled();
});
});