mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Bump react-grid-layout (#15067)
* Bump react-grid-layout * Restore getSelection mock after test
This commit is contained in:
parent
c7ce51b5f8
commit
4de1bbd334
2 changed files with 12 additions and 1 deletions
|
@ -172,7 +172,7 @@
|
|||
"react-anything-sortable": "1.6.1",
|
||||
"react-color": "2.11.7",
|
||||
"react-dom": "15.6.1",
|
||||
"react-grid-layout": "0.14.7",
|
||||
"react-grid-layout": "0.16.0",
|
||||
"react-input-autosize": "1.1.0",
|
||||
"react-input-range": "1.2.1",
|
||||
"react-markdown": "2.4.2",
|
||||
|
|
|
@ -25,14 +25,25 @@ function createOldPanelData(col, id, row, sizeX, sizeY, panelIndex) {
|
|||
return { col, id, row, size_x: sizeX, size_y: sizeY, type: 'visualization', panelIndex };
|
||||
}
|
||||
|
||||
const getSelection = window.getSelection;
|
||||
beforeAll(() => {
|
||||
// sizeme detects the width to be 0 in our test environment. noPlaceholder will mean that the grid contents will
|
||||
// get rendered even when width is 0, which will improve our tests.
|
||||
sizeMe.noPlaceholders = true;
|
||||
|
||||
// react-grid-layout calls getSelection which isn't support by jsdom
|
||||
// it's called regardless of whether we need to remove selection,
|
||||
// and in this case we don't need to remove selection
|
||||
window.getSelection = () => {
|
||||
return {
|
||||
removeAllRanges: () => {}
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
sizeMe.noPlaceholders = false;
|
||||
window.getSelection = getSelection;
|
||||
});
|
||||
|
||||
test('loads old panel data in the right order', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue