export class GroupBy { get element() { return cy.get(`.dato-grid-groups-menu`); } getColumns() { this.select.click(); return cy.get('dato-option'); } get select() { return this.element.find('dato-select dato-trigger-single'); } groupBy(index: number) { this.getColumns() .eq(index) .click(); return this; } get selected() { return this.element.find('.group-item'); } clear() { cy.daAttr(`grid-group-menu-clear-groups`).click(); } close() { const waitForElement = this.element; cy.get('h1').click(); } }