mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-27 16:22:20 +01:00
Merge current dev and refresh PR #6741 from the 7011 integration
This commit is contained in:
@@ -27,6 +27,15 @@ def test_deleting_the_last_layer_is_allowed():
|
||||
assert "else { state.activeLayerId = null; state.selectedLayerIds = []; state.activeGroupId = null; }" in panel
|
||||
|
||||
|
||||
def test_enter_confirms_the_transform_even_from_a_transform_field():
|
||||
keyboard = (ROOT / "static/js/editor/keyboard-shortcuts.js").read_text(encoding="utf-8")
|
||||
# A form field would normally swallow Enter; an active transform must still
|
||||
# accept when Enter is pressed from one of its number inputs.
|
||||
assert "!(state.transformActive && e.key === 'Enter')) return;" in keyboard
|
||||
assert "if (e.key === 'Enter' && state.transformActive) {" in keyboard
|
||||
assert "confirmTransform();" in keyboard
|
||||
|
||||
|
||||
def test_ctrl_zoom_shortcuts_drive_the_toolbar_and_override_the_browser():
|
||||
keyboard = (ROOT / "static/js/editor/keyboard-shortcuts.js").read_text(encoding="utf-8")
|
||||
# Ctrl/Cmd +/-/0 zoom the canvas (they call the toolbar zoom buttons and
|
||||
@@ -36,3 +45,19 @@ def test_ctrl_zoom_shortcuts_drive_the_toolbar_and_override_the_browser():
|
||||
assert "document.getElementById('ge-zoom-100')?.click();" in keyboard
|
||||
assert "e.code === 'NumpadAdd'" in keyboard
|
||||
assert "e.code === 'NumpadSubtract'" in keyboard
|
||||
|
||||
|
||||
def test_ctrl_alt_l_opens_the_levels_adjustment():
|
||||
keyboard = (ROOT / "static/js/editor/keyboard-shortcuts.js").read_text(encoding="utf-8")
|
||||
# Photoshop-style chord: reuse the Image menu row so the dialog and the
|
||||
# adjustment-layer plumbing stay in one place.
|
||||
assert "e.altKey && e.code === 'KeyL'" in keyboard
|
||||
assert "document.querySelector('[data-image-action=\"adj-levels\"]')" in keyboard
|
||||
|
||||
|
||||
def test_ctrl_alt_shift_e_stamps_the_visible_layers():
|
||||
keyboard = (ROOT / "static/js/editor/keyboard-shortcuts.js").read_text(encoding="utf-8")
|
||||
# Photoshop's Stamp Visible reuses the layer footer's "Flatten Copy", which
|
||||
# merges every visible layer into a new layer on top and keeps the originals.
|
||||
assert "e.altKey && e.shiftKey && e.code === 'KeyE'" in keyboard
|
||||
assert "document.getElementById('ge-flatten')" in keyboard
|
||||
|
||||
Reference in New Issue
Block a user