[ftr/browser] explicitly export specific keys, keep BACKSPACE name

This commit is contained in:
spalger 2019-02-15 13:27:08 -08:00
parent c2bc1425de
commit 779335f2d4
3 changed files with 12 additions and 3 deletions

View file

@ -68,7 +68,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }) {
await input.pressKeys([browser.keys.CONTROL, 'a']); // Select all for everything else
}
await input.pressKeys(browser.keys.NULL); // Release modifier keys
await input.pressKeys(browser.keys.BACK_SPACE); // Delete all content
await input.pressKeys(browser.keys.BACKSPACE); // Delete all content
await input.type(markdown);
await PageObjects.visualize.waitForRenderingCount(prevRenderingCount + 1);
}

View file

@ -28,7 +28,16 @@ export async function BrowserProvider({ getService }) {
/**
* Keyboard events
*/
keys = Key;
keys = {
ENTER: Key.ENTER,
COMMAND: Key.COMMAND,
CONTROL: Key.CONTROL,
NULL: Key.NULL,
RETURN: Key.RETURN,
SPACE: Key.SPACE,
ARROW_RIGHT: Key.ARROW_RIGHT,
BACKSPACE: Key.BACK_SPACE
};
/**
* Retrieves the a rect describing the current top-level window's size and position.

View file

@ -20,7 +20,7 @@ export function InfraHomePageProvider({ getService }: KibanaFunctionalTestDefaul
`${testSubjSelector('waffleDatePicker')} .euiDatePicker.euiFieldText`
);
await datePickerInput.type(Array(30).fill(browser.keys.BACK_SPACE));
await datePickerInput.type(Array(30).fill(browser.keys.BACKSPACE));
await datePickerInput.type([moment(time).format('L LTS'), browser.keys.RETURN]);
},