Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/freecut-editor/consumer-smoke.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ describe('published FreeCut browser entry', () => {
{ timeout: 10_000 },
)

const library = view.container.querySelector<HTMLElement>('[data-editor-column="library"]')!
expect(library).not.toBeVisible()
fireEvent.click(within(view.container).getByRole('button', { name: 'Show Library' }))
expect(library).toBeVisible()
expect(screen.queryByTestId('properties-clip-panel-host')).not.toBeInTheDocument()
fireEvent.click(within(view.container).getByRole('button', { name: 'Canvas settings' }))
expect(await screen.findByTestId('properties-clip-panel-host')).toBeInTheDocument()
Expand Down
2 changes: 1 addition & 1 deletion packages/freecut-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quantfive/freecut-editor-surface",
"version": "0.3.14",
"version": "0.3.15",
"description": "The host-backed FreeCut browser editor surface.",
"license": "MIT",
"repository": {
Expand Down
11 changes: 11 additions & 0 deletions src/features/editor/components/editor-workspace-shell.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ describe('editor workspace columns', () => {
<input aria-label="Timeline state" />
</EditorWorkspaceShell>,
)
expect(
container.querySelector<HTMLElement>('[data-editor-column="library"]')!.style.display,
).toBe('none')
expect(screen.queryByRole('region', { name: 'editor.refresh.settings' })).toBeNull()
expect(onLayoutChange).toHaveBeenLastCalledWith({
minimumWidth: 480,
libraryVisible: false,
editorVisible: true,
})
fireEvent.click(screen.getByRole('button', { name: 'editor.refresh.showLibrary' }))
const search = screen.getByLabelText('Transcript search') as HTMLInputElement
fireEvent.change(search, { target: { value: 'keep my search' } })
const editor = container.querySelector<HTMLElement>('[data-editor-column="editor"]')!
Expand Down Expand Up @@ -157,6 +167,7 @@ describe('editor workspace columns', () => {
<div />
</EditorWorkspaceShell>,
)
fireEvent.click(screen.getByRole('button', { name: 'editor.refresh.showLibrary' }))
const separator = screen.getByRole('separator')
fireEvent.keyDown(separator, { key: 'ArrowRight' })
expect(separator.getAttribute('aria-valuenow')).toBe('296')
Expand Down
2 changes: 1 addition & 1 deletion src/features/editor/components/editor-workspace-shell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function EditorWorkspaceShell({
const [availableWidth, setAvailableWidth] = useState(280)
const [settingsNotice, setSettingsNotice] = useState(false)
const settingsSelection = useRef<string[]>([])
const [libraryVisible, setLibraryVisible] = useState(true)
const [libraryVisible, setLibraryVisible] = useState(false)
const [editorVisible, setEditorVisible] = useState(true)
const [libraryWidth, setLibraryWidth] = useState(280)
const [metersOpen, setMetersOpen] = useState(false)
Expand Down
Loading