import {When} from "@cucumber/cucumber";
import pressButton from "../helpers/framework-helpers/action/pressButton";

// Possible keystrokes; Use the normalised keys from
// https://w3c.github.io/webdriver/#keyboard-actions

When(/^I press "([^"]*)?" key$/, async (key: string | string[]) => {
    console.log(`I press ${key} key`);
    await pressButton(key);
});
