-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dashboard-core-plugins typescript conversion #693
Changes from 1 commit
88035d6
2ef053f
fd9ab19
6fa849c
2d02906
68ae4d4
df7466b
2e56756
4778da9
d836ebd
f34ec25
23d4334
0159ade
63bd1f5
a1e3d0a
a2d5c83
99be5d1
f2e3250
c7bb2b2
6e46614
5e62263
33b9895
02e1cb1
c0b115d
e0c51bf
dee6609
3d131a0
f594ae8
ee248c3
9a2554f
8deef88
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { PanelComponent } from '@deephaven/dashboard'; | ||
import { LinkColumn } from '../linker/LinkerUtils'; | ||
|
||
export type ColumnSelectionValidator = ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file should probably be in the |
||
panel: PanelComponent, | ||
tableColumn?: Partial<LinkColumn> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think instead of using With |
||
) => boolean; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
import { CommandHistoryStorage } from '@deephaven/console'; | ||
import { Container } from '@deephaven/golden-layout'; | ||
import { ConsolePanel } from './ConsolePanel'; | ||
import { SessionWrapper } from '../../../code-studio/src/main/SessionUtils'; | ||
|
||
jest.mock('@deephaven/console', () => ({ | ||
...(jest.requireActual('@deephaven/console') as Record<string, unknown>), | ||
Console: jest.fn(() => null), | ||
default: jest.fn(() => null), | ||
})); | ||
|
||
jest.mock('./Panel', () => jest.fn(() => null)); | ||
|
||
function makeSession() { | ||
return { | ||
addEventListener: jest.fn(), | ||
subscribeToFieldUpdates: jest.fn(() => () => null), | ||
removeEventListener: jest.fn(), | ||
getTable: jest.fn(), | ||
getObject: jest.fn(), | ||
runCode: jest.fn(), | ||
}; | ||
} | ||
|
||
it('renders without crashing', () => { | ||
const eventHub = { | ||
emit: () => undefined, | ||
on: () => undefined, | ||
off: () => undefined, | ||
trigger: () => undefined, | ||
unbind: () => undefined, | ||
}; | ||
const container: Partial<Container> = { | ||
emit: () => undefined, | ||
on: () => undefined, | ||
off: () => undefined, | ||
}; | ||
const session = makeSession(); | ||
render( | ||
<ConsolePanel | ||
glEventHub={eventHub} | ||
glContainer={container as Container} | ||
commandHistoryStorage={{} as CommandHistoryStorage} | ||
timeZone="MockTimeZone" | ||
sessionWrapper={({ session, config: {} } as unknown) as SessionWrapper} | ||
/> | ||
); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead I think
isColumnSelectionValid
should also take aPartial<LinkColumn>
rather than justLinkColumn
- you'll need to put the appropriate checks for undefineds in there as well.In particular - in LinkerUtils, there's a check on the
columnType
, checking fornull
: