Skip to content

Commit

Permalink
fix: add data-test attribute to sortable new button
Browse files Browse the repository at this point in the history
  • Loading branch information
devmiguelangel committed Jun 10, 2024
1 parent 0e90fed commit e0c378b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/computed-properties.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
:items="current"
filter-key="name"
:inline-edit="false"
:data-test-actions="{ btnNew: { 'data-cy': 'calcs-add-property' } }"
@item-edit="editProperty"
@item-delete="deleteProperty"
@add-page="displayFormProperty"
Expand Down
5 changes: 5 additions & 0 deletions src/components/sortable/Sortable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<button
type="button"
class="btn sortable-btn-new"
v-bind="dataTestActions?.btnNew"
@click="$emit('add-page', $event)"
>
<i class="fa fa-plus"></i>
Expand Down Expand Up @@ -51,6 +52,10 @@ export default {
items: { type: Array, required: true },
filterKey: { type: String, required: true },
inlineEdit: { type: Boolean, default: true },
dataTestActions: {
type: Object,
default: () => ({ btnNew: { 'data-test': 'sortable-btn-new' } }),
},
},
data() {
return {
Expand Down

0 comments on commit e0c378b

Please sign in to comment.