Skip to content

Commit 74f17da

Browse files
committed
test: fix react 16/17 issue of different react render versions
1 parent 8174adc commit 74f17da

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/eui/src/components/datagrid/body/cell/data_grid_cell_popover.test.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ describe('useCellPopover', () => {
160160
);
161161

162162
mockCell.append(mockPopoverAnchor);
163-
container.prepend(mockCell);
163+
// NOTE: [issue for React 16/17] we need to append the cell to the body instead of the container
164+
// to prevent issues with unmounting between renders as the cell otherwise
165+
// would not be part of the original render content
166+
document.body.prepend(mockCell);
164167

165168
return { result, container, baseElement, getByTestSubject };
166169
};

0 commit comments

Comments
 (0)