diff --git a/tests/test_ui.py b/tests/test_ui.py index 2eb2397..ac21368 100644 --- a/tests/test_ui.py +++ b/tests/test_ui.py @@ -26,21 +26,42 @@ def test_index_contains_base_page_forms(tmp_path) -> None: 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) assert 'id="open-import-modal-button"' in html - assert 'id="import-modal"' in html - assert 'id="close-import-modal-button"' in html - assert 'id="modal-collection-tree"' in html - assert 'id="modal-collection-items"' in html - assert 'id="modal-selected-count"' in html - assert 'id="modal-select-descendants-button"' in html - assert 'id="modal-clear-selection-button"' in html - assert 'id="modal-import-selected-items-button"' in html + assert 'id="import-window-shell"' in html + assert 'id="window-minimize-button"' in html + assert 'id="window-maximize-button"' in html + assert 'id="window-close-button"' in html + assert 'id="window-restore-button"' in html + assert 'id="import-window-minimized-bar"' in html + assert 'id="window-project-label"' 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 'isImportModalOpen: false' in html - assert "function openImportModal()" in html - assert "function closeImportModal()" in html + assert 'isImportWindowOpen: false' in html + assert "function openImportWindow()" in html + assert "function closeImportWindow()" in html assert "function updateImportActionState()" 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