Skip to content

Commit

Permalink
Use the right keyboard shortcut for Undo/Redo tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemelia committed Sep 18, 2023
1 parent 069865e commit 4bc718a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/acceptance/editor-undo-redo-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { MODIFIERS } from 'mobiledoc-kit/utils/key';
import Helpers from '../test-helpers';
import Browser from 'mobiledoc-kit/utils/browser';

const { module, test } = Helpers;

Expand All @@ -8,11 +9,11 @@ const undoBlockTimeout = 2000;
let editor, editorElement, oldDateNow;

function undo(editor) {
Helpers.dom.triggerKeyCommand(editor, 'Z', [MODIFIERS.META]);
Helpers.dom.triggerKeyCommand(editor, 'Z', [Browser.isMac() ? MODIFIERS.META : MODIFIERS.CTRL]);
}

function redo(editor) {
Helpers.dom.triggerKeyCommand(editor, 'Z', [MODIFIERS.META, MODIFIERS.SHIFT]);
Helpers.dom.triggerKeyCommand(editor, 'Z', [Browser.isMac() ? MODIFIERS.META : MODIFIERS.CTRL, MODIFIERS.SHIFT]);
}

module('Acceptance: Editor: Undo/Redo', {
Expand Down

0 comments on commit 4bc718a

Please sign in to comment.