diff --git a/public/app/features/admin/Users/UsersTable.test.tsx b/public/app/features/admin/Users/UsersTable.test.tsx
new file mode 100644
index 00000000000..667aca52b89
--- /dev/null
+++ b/public/app/features/admin/Users/UsersTable.test.tsx
@@ -0,0 +1,69 @@
+import { render } from '@testing-library/react';
+import { MemoryRouter } from 'react-router-dom-v5-compat';
+
+import { UserDTO } from '../../../types';
+
+import { UsersTable, UsersTableProps } from './UsersTable';
+
+const setup = (propOverrides?: object) => {
+ const props: UsersTableProps = {
+ users: [] as UserDTO[],
+ showPaging: true,
+ totalPages: 1,
+ onChangePage: jest.fn(),
+ currentPage: 1,
+ fetchData: jest.fn(),
+ };
+
+ Object.assign(props, propOverrides);
+
+ render(
+
+
+
+ );
+};
+
+describe('Render', () => {
+ it('should render component', () => {
+ expect(() => setup()).not.toThrow();
+ });
+
+ it('should render when user has licensed role None', () => {
+ expect(() =>
+ setup({
+ users: [
+ {
+ id: 1,
+ uid: '1',
+ login: '1',
+ email: '1',
+ name: '1',
+ isGrafanaAdmin: false,
+ isDisabled: false,
+ licensedRole: 'None',
+ },
+ ],
+ })
+ ).not.toThrow();
+ });
+
+ it('should render when user belongs to org', () => {
+ expect(() =>
+ setup({
+ users: [
+ {
+ id: 1,
+ uid: '1',
+ login: '1',
+ email: '1',
+ name: '1',
+ isGrafanaAdmin: false,
+ isDisabled: false,
+ orgs: [{ name: 'test', url: 'test' }],
+ },
+ ],
+ })
+ ).not.toThrow();
+ });
+});
diff --git a/public/app/features/admin/Users/UsersTable.tsx b/public/app/features/admin/Users/UsersTable.tsx
index 07ac760e087..c397dccf6b7 100644
--- a/public/app/features/admin/Users/UsersTable.tsx
+++ b/public/app/features/admin/Users/UsersTable.tsx
@@ -23,7 +23,7 @@ import { OrgUnits } from './OrgUnits';
type Cell = CellProps;
-interface UsersTableProps {
+export interface UsersTableProps {
users: UserDTO[];
showPaging?: boolean;
totalPages: number;