aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/support/elements/element.table.actions.ts
blob: 4994723d721558885db69a14be958f0c14459dcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);