diff --git a/packages/components/pagination/src/pagination-large.vue b/packages/components/pagination/src/pagination-large.vue index a67c8b52..df5ccb00 100644 --- a/packages/components/pagination/src/pagination-large.vue +++ b/packages/components/pagination/src/pagination-large.vue @@ -29,6 +29,9 @@ :key="page" :model-value="page" :disabled="disabled" + :data-test=" + dataTest != undefined ? `pageSelector-${dataTest}` : undefined + " class="puik-pagination__select" @update:model-value="emit('update:page', $event)" > @@ -36,6 +39,11 @@ v-for="index in maxPage" :key="`puik-pagination__page-selector__option-${index}`" :value="index" + :data-test=" + dataTest != undefined + ? `pageSelectorOption-${dataTest}-${index}` + : undefined + " > {{ index }} diff --git a/packages/components/table/src/table.ts b/packages/components/table/src/table.ts index f5fb713f..456d88b1 100644 --- a/packages/components/table/src/table.ts +++ b/packages/components/table/src/table.ts @@ -61,6 +61,7 @@ export interface TableProps { fullWidth?: boolean stickyFirstCol?: boolean stickyLastCol?: boolean + dataTest?: string } export type TableEmits = { diff --git a/packages/components/table/src/table.vue b/packages/components/table/src/table.vue index d604485e..ee9078ff 100644 --- a/packages/components/table/src/table.vue +++ b/packages/components/table/src/table.vue @@ -6,10 +6,20 @@ - + - @@ -28,11 +38,21 @@ { 'puik-table__head__row__item--selection': selectable }, { 'puik-table__head__row__item--expandable': expandable }, ]" + :data-test=" + dataTest != undefined + ? `table-header-th-${dataTest}-selection` + : undefined + " > @@ -75,10 +95,21 @@ }, ]" :style="{ minWidth: header.width, width: header.width }" + :data-test=" + dataTest != undefined + ? `table-header-th-${dataTest}-${header.value}` + : undefined + " >
- +
@@ -102,7 +146,11 @@
- @@ -124,11 +172,21 @@ { 'puik-table__head__row__item--selection': selectable }, { 'puik-table__head__row__item--expandable': expandable }, ]" + :data-test=" + dataTest != undefined + ? `table-header-th-${dataTest}-searchBar-selection` + : undefined + " > @@ -171,6 +229,11 @@ }, ]" :style="{ minWidth: header.width, width: header.width }" + :data-test=" + dataTest != undefined + ? `table-header-th-${dataTest}-${header.value}-searchBar` + : undefined + " >
+
+