<commit_before>package guitests;

import org.junit.Test;

import javafx.scene.input.KeyCode;

public class KeyboardShortcutsTest extends UITest {

    // TODO test that events have been triggered
    @Test
    public void keyboardShortcutsTest() {
        // maximize
        press(KeyCode.CONTROL).press(KeyCode.X).release(KeyCode.X).release(KeyCode.CONTROL);

        // mid-sized window
        press(KeyCode.CONTROL).press(KeyCode.D).release(KeyCode.D).release(KeyCode.CONTROL);

        // jump from filter box to first issue
        press(KeyCode.CONTROL).press(KeyCode.DOWN).release(KeyCode.DOWN).release(KeyCode.CONTROL);

        // jump from issue list to filter box
        press(KeyCode.CONTROL).press(KeyCode.UP).release(KeyCode.UP).release(KeyCode.CONTROL);

        // jump from filter box to first issue
        push(KeyCode.SPACE).push(KeyCode.SPACE);

        // jump from issue list to filter box
        push(KeyCode.SPACE).push(KeyCode.SPACE);

        push(KeyCode.SPACE).push(KeyCode.SPACE);

        // jump to last issue
        push(KeyCode.END);

        // jump to first issue
        push(KeyCode.HOME);

        push(KeyCode.V);
        push(KeyCode.V);
        push(KeyCode.T);

        press(KeyCode.CONTROL).press(KeyCode.P).release(KeyCode.P).release(KeyCode.CONTROL);
        push(KeyCode.SPACE).push(KeyCode.SPACE);

        push(KeyCode.F);
        push(KeyCode.D);
        push(KeyCode.F);
        push(KeyCode.D);

        click("#dummy/dummy_col1_1");

        // mark as read/unread
        push(KeyCode.E);
        push(KeyCode.U);

        // minimize window
        press(KeyCode.CONTROL).press(KeyCode.N).release(KeyCode.N).release(KeyCode.CONTROL); // run this last
    }
}
<commit_msg>updated KeyboardShortcutsTest to reference KeyboardShortcuts for some keys<commit_after>package guitests;

import javafx.scene.input.KeyCode;
import org.junit.Test;
import ui.components.KeyboardShortcuts;

import static ui.components.KeyboardShortcuts.DOUBLE_PRESS;

public class KeyboardShortcutsTest extends UITest {

    // TODO test that events have been triggered
    @Test
    public void keyboardShortcutsTest() {
        // maximize
        press(KeyCode.CONTROL).press(KeyCode.X).release(KeyCode.X).release(KeyCode.CONTROL);

        // mid-sized window
        press(KeyCode.CONTROL).press(KeyCode.D).release(KeyCode.D).release(KeyCode.CONTROL);

        // jump from filter box to first issue
        press(KeyCode.CONTROL).press(KeyCode.DOWN).release(KeyCode.DOWN).release(KeyCode.CONTROL);

        // jump from issue list to filter box
        press(KeyCode.CONTROL).press(KeyCode.UP).release(KeyCode.UP).release(KeyCode.CONTROL);

        // jump from filter box to first issue
        push(DOUBLE_PRESS).push(DOUBLE_PRESS);

        // jump from issue list to filter box
        push(DOUBLE_PRESS).push(DOUBLE_PRESS);

        push(DOUBLE_PRESS).push(DOUBLE_PRESS);

        // jump to last issue
        push(KeyCode.END);

        // jump to first issue
        push(KeyCode.HOME);

        push(getKeyCode("DOWN_ISSUE"));
        push(getKeyCode("DOWN_ISSUE"));
        push(getKeyCode("UP_ISSUE"));

        press(KeyCode.CONTROL).press(KeyCode.P).release(KeyCode.P).release(KeyCode.CONTROL);
        push(DOUBLE_PRESS).push(DOUBLE_PRESS);

        push(getKeyCode("RIGHT_PANEL"));
        push(getKeyCode("LEFT_PANEL"));
        push(getKeyCode("RIGHT_PANEL"));
        push(getKeyCode("LEFT_PANEL"));

        click("#dummy/dummy_col1_1");

        // mark as read/unread
        push(getKeyCode("MARK_AS_READ"));
        push(getKeyCode("MARK_AS_UNREAD"));

        // minimize window
        press(KeyCode.CONTROL).press(KeyCode.N).release(KeyCode.N).release(KeyCode.CONTROL); // run this last
    }

    public KeyCode getKeyCode(String shortcut) {
        return KeyCode.getKeyCode(KeyboardShortcuts.getDefaultKeyboardShortcuts().get(shortcut));
    }
}

{'fraction_non_alphanumeric': 0.12423312883435583, 'fraction_numerical': 0.0010224948875255625, 'mean_word_length': 2.847590953785644, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5622348', 'n_tokens_mistral': 1188, 'n_tokens_neox': 1170, 'n_words': 200}