21 lines
649 B
JavaScript
21 lines
649 B
JavaScript
Cypress.Commands.add('getRow', (index = 1) =>
|
|
cy.get(`.vnTable .q-virtual-scroll__content tr:nth-child(${index})`),
|
|
);
|
|
Cypress.Commands.add('getRowCol', (field, index = 1) =>
|
|
cy.getRow(index).find(`[data-col-field="${field}"]`),
|
|
);
|
|
|
|
Cypress.Commands.add('vnTableCreateBtn', () =>
|
|
cy.dataCy('vnTableCreateBtn').should('exist').click(),
|
|
);
|
|
|
|
Cypress.Commands.add('waitTableScrollLoad', () =>
|
|
cy.waitForElement('[data-q-vs-anchor]'),
|
|
);
|
|
|
|
Cypress.Commands.add('tableActions', (n = 0, child = 1) =>
|
|
cy.get(
|
|
`:nth-child(${child}) > .q-table--col-auto-width > [data-cy="tableAction-${n}"] > .q-btn__content > .q-icon`,
|
|
),
|
|
);
|