Collapsible Left Panel - Ensure that panels have non-fractional widths (#33052)
* Expand panel to full width * Write tests * Resize to nearest whole number if necessary * Update screenshots * Early return when resizing to whole width * Update screenshot
This commit is contained in:
@@ -105,4 +105,15 @@ describe("LeftPanelResizerViewModel", () => {
|
||||
vm.onBlur();
|
||||
expect(vm.getSnapshot().isFocusedViaKeyboard).toStrictEqual(false);
|
||||
});
|
||||
|
||||
it("should resize to nearest whole number", () => {
|
||||
const vm = new ResizerViewModel();
|
||||
const mockHandle = {
|
||||
resize: jest.fn(),
|
||||
} as unknown as PanelImperativeHandle;
|
||||
vm.setPanelHandle(mockHandle);
|
||||
|
||||
vm.onLeftPanelResized(25.515);
|
||||
expect(mockHandle.resize).toHaveBeenCalledWith("26%");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user