diff --git a/src/ellipsis/tests/Ellipsis.spec.tsx b/src/ellipsis/tests/Ellipsis.spec.tsx index c679c3271..1380fdc1e 100644 --- a/src/ellipsis/tests/Ellipsis.spec.tsx +++ b/src/ellipsis/tests/Ellipsis.spec.tsx @@ -39,4 +39,24 @@ describe('n-ellipsis', () => { 'n-ellipsis--line-clamp' ) }) + + it('should work with `expand-trigger` prop', async () => { + const wrapper = mount(NEllipsis, { + props: { + expandTrigger: 'click', + tooltip: false + }, + slots: { default: () => 'test n-ellipsis' } + }) + + await wrapper.trigger('click') + expect(wrapper.find('.n-ellipsis').attributes('style')).not.toContain( + 'text-overflow: ellipsis;' + ) + + await wrapper.trigger('click') + expect(wrapper.find('.n-ellipsis').attributes('style')).toContain( + 'text-overflow: ellipsis;' + ) + }) })