Skip to content

Commit

Permalink
Maintenance: Decrease noise in the frontend test logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvuckovic committed Jan 30, 2024
1 parent b5c375a commit 2827997
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Expand Up @@ -101,25 +101,26 @@ describe('CommonButton.vue', () => {
it('supports prefix/suffix icon props', async () => {
const view = renderComponent(CommonButton, {
props: {
prefixIcon: 'web',
suffixIcon: 'web',
prefixIcon: 'logo',
suffixIcon: 'logo',
},
})

expect(view.getAllByIconName('web').length).toBe(2)
expect(view.getAllByIconName('logo').length).toBe(2)
})

it('supports icon prop', async () => {
const view = renderComponent(CommonButton, {
props: {
icon: 'web',
icon: 'logo',
},
slots: {
default: 'foobar',
},
})

expect(view.getByIconName('web')).toBeInTheDocument()
expect(view.getByIconName('logo')).toBeInTheDocument()

expect(
view.queryByRole('button', { name: 'foobar' }),
).not.toBeInTheDocument()
Expand Down
Expand Up @@ -36,8 +36,8 @@ describe('CommonLabel.vue', () => {
it('renders icons (prefix + suffix)', () => {
const view = renderComponent(CommonLabel, {
props: {
prefixIcon: 'logo',
suffixIcon: 'logo-flat',
prefixIcon: 'web',
suffixIcon: 'web',
},
slots: {
default: 'Dummy',
Expand All @@ -47,7 +47,6 @@ describe('CommonLabel.vue', () => {
const label = view.getByTestId('common-label')

expect(label).toHaveTextContent('Dummy')
expect(view.queryByIconName('logo')).toBeInTheDocument()
expect(view.queryByIconName('logo-flat')).toBeInTheDocument()
expect(view.getAllByIconName('web')).toHaveLength(2)
})
})

0 comments on commit 2827997

Please sign in to comment.