diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index c1188ec47..e1d8e56b5 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -861,6 +861,7 @@ function cardClick(_, row) { :key="index" :title="btn.title" :icon="btn.icon" + data-cy="cardBtn" class="q-pa-xs" :class=" btn.isPrimary diff --git a/test/cypress/integration/entry/myEntry.spec.js b/test/cypress/integration/entry/myEntry.spec.js index 49d75cf39..ed469d9e2 100644 --- a/test/cypress/integration/entry/myEntry.spec.js +++ b/test/cypress/integration/entry/myEntry.spec.js @@ -8,11 +8,9 @@ describe('EntryMy when is supplier', () => { }, }); }); - + it('should open buyLabel when is supplier', () => { - cy.get( - '[to="/null/3"] > .q-card > :nth-child(2) > .q-btn > .q-btn__content > .q-icon' - ).click(); + cy.dataCy('cardBtn').eq(2).click(); cy.dataCy('printLabelsBtn').click(); cy.window().its('open').should('be.called'); });