diff options
Diffstat (limited to 'vid-webpack-master/cypress/support/elements/element.table.actions.ts')
-rw-r--r-- | vid-webpack-master/cypress/support/elements/element.table.actions.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vid-webpack-master/cypress/support/elements/element.table.actions.ts b/vid-webpack-master/cypress/support/elements/element.table.actions.ts new file mode 100644 index 000000000..4994723d7 --- /dev/null +++ b/vid-webpack-master/cypress/support/elements/element.table.actions.ts @@ -0,0 +1,15 @@ +declare namespace Cypress { + interface Chainable { + getTableRowByIndex : typeof getTableRowByIndex; + } +} + +/*************************************** + get table row by table id and index + *************************************/ +function getTableRowByIndex(id : string, index : number) : Chainable<JQuery<HTMLElement>> { + return cy.get('table#' + id + ' tbody tr').eq(index); +} + +Cypress.Commands.add('getTableRowByIndex', getTableRowByIndex); + |