-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
progress on UI: SNMP version added to form + test improvements + depl…
…oyment to GitHub pages
- Loading branch information
1 parent
83234e4
commit 6a38840
Showing
33 changed files
with
569 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
import '@testing-library/jest-dom' | ||
|
||
Object.defineProperty(window, 'matchMedia', { | ||
writable: true, | ||
value: jest.fn().mockImplementation((query) => ({ | ||
matches: false, | ||
media: query, | ||
onchange: null, | ||
addListener: jest.fn(), | ||
removeListener: jest.fn(), | ||
addEventListener: jest.fn(), | ||
removeEventListener: jest.fn(), | ||
dispatchEvent: jest.fn(), | ||
jest.mock('@tanstack/react-table', () => ({ | ||
getCoreRowModel: jest.fn(), | ||
getSortedRowModel: jest.fn(), | ||
useReactTable: jest.fn().mockImplementation(() => ({ | ||
getSelectedRowModel: jest.fn().mockImplementation(() => ({ flatRows: [] })), | ||
getHeaderGroups: jest.fn().mockImplementation(() => []), | ||
getRowModel: jest.fn().mockImplementation(() => ({ rows: [] })), | ||
})), | ||
}) | ||
})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/components/DataTable/DataTableCheckbox/DataTableCheckbox.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { screen } from '@testing-library/react' | ||
import React from 'react' | ||
import { customRender } from '../../../utils/testUtils/testUtils' | ||
import { DataTableCheckbox } from './DataTableCheckbox' | ||
|
||
describe('DataTableCheckbox', () => { | ||
it(`should render the component`, async () => { | ||
customRender(<DataTableCheckbox data-testid="test" />) | ||
|
||
expect(screen.getByTestId('test')).toBeInTheDocument() | ||
}) | ||
}) |
6 changes: 3 additions & 3 deletions
6
src/components/DataTable/DataTableCheckbox/DataTableCheckbox.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/components/DataTable/tableColumns/handleResource.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { getOperationProperties } from './handleResource' | ||
|
||
describe('getOperationProperties', () => { | ||
it(`should generate the correct operation properties`, async () => { | ||
const messages = getOperationProperties({ resource: 'agents' }) | ||
|
||
expect(messages.post).toStrictEqual({ url: `/api/agents`, message: `Agent created!` }) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.