Skip to content

Commit

Permalink
fix: icon button testid (#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
NateWaldschmidt authored May 6, 2024
1 parent 2975ba0 commit 320c159
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## v2.0.53

- Fixes the `IconButton` test ID

## v2.0.52

- Add new icons for the `Icon` component
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lob/ui-components",
"version": "2.0.52",
"version": "2.0.53",
"engines": {
"node": ">=20.2.0",
"npm": ">=10.2.0"
Expand Down
3 changes: 2 additions & 1 deletion src/components/DataTable/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
: undefined
"
>
<template v-if="!loading" #empty>
<!-- For some reason, if this is not explicit it fails. -->
<template v-if="loading !== true" #empty>
<Alert v-if="error" variant="error">{{ error }}</Alert>
<Alert v-else variant="info">No results</Alert>
</template>
Expand Down
4 changes: 3 additions & 1 deletion src/components/IconButton/IconButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
v-bind="!to ? $attrs : undefined"
:class="`uic-icon-button size-${size} color-${color} variant-${variant}`"
:disabled="disabled"
:data-testid="$attrs['data-testid'] ?? 'uic-icon-button'"
:data-testid="
!to ? $attrs['data-testid'] ?? 'uic-icon-button' : undefined
"
@click="$emit('click', $event)"
>
<Icon :icon="icon" :size="iconSize" />
Expand Down

0 comments on commit 320c159

Please sign in to comment.