diff --git a/src/components/tolariaBlockNoteSideMenu.test.tsx b/src/components/tolariaBlockNoteSideMenu.test.tsx
index 4e9782fa..9facdb75 100644
--- a/src/components/tolariaBlockNoteSideMenu.test.tsx
+++ b/src/components/tolariaBlockNoteSideMenu.test.tsx
@@ -6,20 +6,14 @@ import { TolariaSideMenu } from './tolariaBlockNoteSideMenu'
let capturedDragHandleMenu: ComponentType | null = null
vi.mock('@blocknote/react', () => ({
- AddBlockButton: () => ,
DragHandleMenu: ({ children }: PropsWithChildren) => (
{children}
),
- DragHandleButton: ({ dragHandleMenu }: { dragHandleMenu?: ComponentType }) => {
- capturedDragHandleMenu = dragHandleMenu ?? null
- return (
-
- )
- },
RemoveBlockItem: ({ children }: PropsWithChildren) => {children}
,
- SideMenu: ({ children }: PropsWithChildren) => {children}
,
+ SideMenu: ({ dragHandleMenu }: { dragHandleMenu?: ComponentType }) => {
+ capturedDragHandleMenu = dragHandleMenu ?? null
+ return
+ },
TableColumnHeaderItem: ({ children }: PropsWithChildren) => {children}
,
TableRowHeaderItem: ({ children }: PropsWithChildren) => {children}
,
useDictionary: () => ({
@@ -38,10 +32,6 @@ describe('TolariaSideMenu', () => {
expect(screen.getByTestId('side-menu')).toBeInTheDocument()
expect(capturedDragHandleMenu).not.toBeNull()
- expect(screen.getAllByRole('button').map((button) => button.textContent)).toEqual([
- 'Open block menu',
- 'Add block',
- ])
const DragHandleMenuComponent = capturedDragHandleMenu!
render()
diff --git a/src/components/tolariaBlockNoteSideMenu.tsx b/src/components/tolariaBlockNoteSideMenu.tsx
index 568d0796..2c132ecd 100644
--- a/src/components/tolariaBlockNoteSideMenu.tsx
+++ b/src/components/tolariaBlockNoteSideMenu.tsx
@@ -1,7 +1,5 @@
import {
- AddBlockButton,
DragHandleMenu,
- DragHandleButton,
RemoveBlockItem,
SideMenu,
TableColumnHeaderItem,
@@ -23,10 +21,5 @@ function TolariaDragHandleMenu() {
}
export function TolariaSideMenu(props: SideMenuProps) {
- return (
-
-
-
-
- )
+ return
}
diff --git a/tests/smoke/editor-block-reorder.spec.ts b/tests/smoke/editor-block-reorder.spec.ts
index bd692994..d32420b2 100644
--- a/tests/smoke/editor-block-reorder.spec.ts
+++ b/tests/smoke/editor-block-reorder.spec.ts
@@ -19,11 +19,10 @@ async function blockOuterForText(page: Page, text: string): Promise {
return textNode.locator('xpath=ancestor::*[contains(concat(" ", normalize-space(@class), " "), " bn-block-outer ")][1]')
}
-async function visibleLeftBlockHandle(page: Page, block: Locator): Promise {
+async function visibleDragHandle(page: Page, block: Locator): Promise {
await block.hover()
- const handle = page.locator('.bn-side-menu button').first()
+ const handle = page.locator('.bn-side-menu [draggable="true"]').first()
await expect(handle).toBeVisible({ timeout: 5_000 })
- await expect(handle).toHaveAttribute('draggable', 'true')
return handle
}
@@ -60,7 +59,7 @@ test('dragging the left block handle reorders editor blocks', async ({ page }) =
await expect.poll(async () => editor.textContent()).toMatch(/Alpha Project[\s\S]*This is a test project[\s\S]*Notes/)
- const handle = await visibleLeftBlockHandle(page, notesHeading)
+ const handle = await visibleDragHandle(page, notesHeading)
await dragHandleToBlock(page, handle, paragraph)
await expect.poll(async () => editor.textContent()).toMatch(/Alpha Project[\s\S]*Notes[\s\S]*This is a test project/)