Skip to content

Commit

Permalink
fix(Cypress): update selectors for confirmation dialog
Browse files Browse the repository at this point in the history
Signed-off-by: Cleopatra Enjeck M. <[email protected]>
  • Loading branch information
enjeck committed Jan 4, 2025
1 parent 876a75d commit e43d48b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ Cypress.Commands.add('addUserToGroup', (userId, groupId) => {

Cypress.Commands.add('removeColumn', (title) => {
cy.get('.custom-table table tr th .cell').contains(title).click()
cy.get('.v-popper__popper ul.nc-button-group-content').last().get('button').last().click()
cy.get('.modal__content button').contains('Confirm').click()
cy.get('[data-cy="deleteColumnActionBtn"] button').click()
cy.get('[data-cy="confirmDialog"] button').contains('Confirm').click()
})

// fill in a value in the 'create row' or 'edit row' model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
</NcActionButton>
<NcActionButton v-if="showDeleteColumn"
:aria-label="t('tables', 'Delete column')"
data-cy="deleteColumnActionBtn"
@click="deleteColumn()">
<template #icon>
<Delete :size="25" />
Expand Down
3 changes: 2 additions & 1 deletion src/shared/modals/DialogConfirmation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
-->
<template>
<NcDialog v-if="showModal" :out-transition="true"
size="normal" close-on-click-outside :name="title" @closing="$emit('cancel')">
size="normal" close-on-click-outside :name="title" @closing="$emit('cancel')"
data-cy="confirmDialog">

Check warning on line 8 in src/shared/modals/DialogConfirmation.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Attribute "data-cy" should go before "@closing"
<div class="row">
<div v-if="description" class="col-4">
<p>{{ description }}</p>
Expand Down

0 comments on commit e43d48b

Please sign in to comment.