mirror of https://github.com/nocodb/nocodb
Raju Udava
2 years ago
5 changed files with 80 additions and 1 deletions
@ -0,0 +1,26 @@
|
||||
import BasePage from '../../Base'; |
||||
import { GridPage } from './index'; |
||||
|
||||
export class RowPageObject extends BasePage { |
||||
readonly grid: GridPage; |
||||
|
||||
constructor(grid: GridPage) { |
||||
super(grid.rootPage); |
||||
this.grid = grid; |
||||
} |
||||
|
||||
get() { |
||||
return this.rootPage.locator('tr.nc-grid-row'); |
||||
} |
||||
|
||||
async getRecord(index: number) { |
||||
return this.get().nth(index); |
||||
} |
||||
|
||||
// style="height: 3rem;"
|
||||
async getRecordHeight(index: number) { |
||||
const record = await this.getRecord(index); |
||||
const style = await record.getAttribute('style'); |
||||
return style.split(':')[1].split(';')[0].trim(); |
||||
} |
||||
} |
@ -0,0 +1,19 @@
|
||||
import BasePage from '../../../Base'; |
||||
import { ToolbarPage } from './index'; |
||||
|
||||
export class RowHeight extends BasePage { |
||||
readonly toolbar: ToolbarPage; |
||||
|
||||
constructor(toolbar: ToolbarPage) { |
||||
super(toolbar.rootPage); |
||||
this.toolbar = toolbar; |
||||
} |
||||
|
||||
get() { |
||||
return this.rootPage.locator(`[data-testid="nc-height-menu"]`); |
||||
} |
||||
|
||||
click({ title }: { title: string }) { |
||||
return this.get().locator(`.nc-row-height-option:has-text("${title}")`).click(); |
||||
} |
||||
} |
Loading…
Reference in new issue