Files
xod/packages/xod-client-browser/test-func/pageObjects/PatchGroupItemContextMenu.js
Evgeny Kochetkov e6ab08e297 chore(infra): format code with prettier
Just `yarn lint  --fix`
2018-03-05 17:59:03 +03:00

34 lines
829 B
JavaScript

import BasePageObject from './BasePageObject';
class PatchGroupItemContextMenu extends BasePageObject {
async _clickItemWithId(itemId) {
const item = await this.elementHandle.$(
`.react-contextmenu-item[data-id="${itemId}"]`
);
await item.click();
}
clickOpen() {
return this._clickItemWithId('open');
}
clickPlace() {
return this._clickItemWithId('place');
}
clickRename() {
return this._clickItemWithId('rename');
}
clickDelete() {
return this._clickItemWithId('delete');
}
clickHelp() {
return this._clickItemWithId('help');
}
}
PatchGroupItemContextMenu.findOnPage = async page => {
const elementHandle = await page.$('.ContextMenu--PatchGroupItem');
return new PatchGroupItemContextMenu(page, elementHandle);
};
export default PatchGroupItemContextMenu;