-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue #5605: [Bug]: UI regression, Jupyter tab has no vertical sc…
…roll bar, cannot see all actions (#5607)
- Loading branch information
1 parent
08b1031
commit fdc00fb
Showing
5 changed files
with
56 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { render, screen } from "@testing-library/react"; | ||
import { Provider } from "react-redux"; | ||
import { configureStore } from "@reduxjs/toolkit"; | ||
import { JupyterEditor } from "#/components/features/jupyter/jupyter"; | ||
import { jupyterReducer } from "#/state/jupyter-slice"; | ||
import { vi, describe, it, expect } from "vitest"; | ||
|
||
describe("JupyterEditor", () => { | ||
const mockStore = configureStore({ | ||
reducer: { | ||
fileState: () => ({}), | ||
initalQuery: () => ({}), | ||
browser: () => ({}), | ||
chat: () => ({}), | ||
code: () => ({}), | ||
cmd: () => ({}), | ||
agent: () => ({}), | ||
jupyter: jupyterReducer, | ||
securityAnalyzer: () => ({}), | ||
status: () => ({}), | ||
}, | ||
preloadedState: { | ||
jupyter: { | ||
cells: Array(20).fill({ | ||
content: "Test cell content", | ||
type: "input", | ||
output: "Test output", | ||
}), | ||
}, | ||
}, | ||
}); | ||
|
||
it("should have a scrollable container", () => { | ||
render( | ||
<Provider store={mockStore}> | ||
<div style={{ height: "100vh" }}> | ||
<JupyterEditor maxWidth={800} /> | ||
</div> | ||
</Provider> | ||
); | ||
|
||
const container = screen.getByTestId("jupyter-container"); | ||
expect(container).toHaveClass("flex-1 overflow-y-auto"); | ||
}); | ||
}); |
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