test(import-window): update UI tests for floating window
Updates test assertions to match new window IDs and function names: - import-window-shell, window-minimize-button, window-maximize-button, window-close-button, window-restore-button, import-window-minimized-bar - window-project-label, window-collection-tree, window-collection-items - window-selected-count, window-clear-selection-button - window-import-selected-items-button - isImportWindowOpen, openImportWindow, closeImportWindow - New window management functions in CSS and JS Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
947cef19ec
commit
034da6e136
@ -26,21 +26,42 @@ def test_index_contains_base_page_forms(tmp_path) -> None:
|
|||||||
assert 'id="plan-form"' in html
|
assert 'id="plan-form"' in html
|
||||||
|
|
||||||
|
|
||||||
def test_index_contains_import_modal_controls(tmp_path) -> None:
|
def test_index_contains_import_window_controls(tmp_path) -> None:
|
||||||
html = _get_index_html(tmp_path)
|
html = _get_index_html(tmp_path)
|
||||||
|
|
||||||
assert 'id="open-import-modal-button"' in html
|
assert 'id="open-import-modal-button"' in html
|
||||||
assert 'id="import-modal"' in html
|
assert 'id="import-window-shell"' in html
|
||||||
assert 'id="close-import-modal-button"' in html
|
assert 'id="window-minimize-button"' in html
|
||||||
assert 'id="modal-collection-tree"' in html
|
assert 'id="window-maximize-button"' in html
|
||||||
assert 'id="modal-collection-items"' in html
|
assert 'id="window-close-button"' in html
|
||||||
assert 'id="modal-selected-count"' in html
|
assert 'id="window-restore-button"' in html
|
||||||
assert 'id="modal-select-descendants-button"' in html
|
assert 'id="import-window-minimized-bar"' in html
|
||||||
assert 'id="modal-clear-selection-button"' in html
|
assert 'id="window-project-label"' in html
|
||||||
assert 'id="modal-import-selected-items-button"' in html
|
assert 'id="window-collection-tree"' in html
|
||||||
|
assert 'id="window-collection-items"' in html
|
||||||
|
assert 'id="window-selected-count"' in html
|
||||||
|
assert 'id="window-clear-selection-button"' in html
|
||||||
|
assert 'id="window-import-selected-items-button"' in html
|
||||||
assert 'id="item-preview-popover"' in html
|
assert 'id="item-preview-popover"' in html
|
||||||
assert 'isImportModalOpen: false' in html
|
assert 'isImportWindowOpen: false' in html
|
||||||
assert "function openImportModal()" in html
|
assert "function openImportWindow()" in html
|
||||||
assert "function closeImportModal()" in html
|
assert "function closeImportWindow()" in html
|
||||||
assert "function updateImportActionState()" in html
|
assert "function updateImportActionState()" in html
|
||||||
assert 'document.body.classList.toggle("modal-open"' in html
|
assert 'document.body.classList.toggle("modal-open"' in html
|
||||||
|
|
||||||
|
|
||||||
|
def test_index_window_frame_css(tmp_path) -> None:
|
||||||
|
html = _get_index_html(tmp_path)
|
||||||
|
|
||||||
|
assert ".window-frame" in html
|
||||||
|
assert ".window-shell" in html
|
||||||
|
assert ".window-toolbar" in html
|
||||||
|
assert ".window-body" in html
|
||||||
|
assert ".window-minimized-bar" in html
|
||||||
|
assert '"zotero-kb.import-window"' in html
|
||||||
|
assert "startWindowDrag" in html
|
||||||
|
assert "minimizeWindow" in html
|
||||||
|
assert "maximizeWindow" in html
|
||||||
|
assert "restoreWindow" in html
|
||||||
|
assert "initWindowFromSession" in html
|
||||||
|
assert "persistWindowSessionState" in html
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user