import { mount } from '@vue/test-utils' import { describe, expect, it } from 'vitest' import ProgressBar from '../../components/ProgressBar.vue' describe('ProgressBar', () => { it('clamps rail values and exposes an accessible label', () => { const wrapper = mount(ProgressBar, { props: { value: 130, ariaLabel: 'Connection pool usage', }, }) const progress = wrapper.get('[role="progressbar"]') expect(progress.attributes('aria-valuenow')).toBe('100') expect(progress.attributes('aria-label')).toBe('Connection pool usage') }) it('should not declare the removed segmented variant prop (2c)', () => { expect(ProgressBar.props).not.toHaveProperty('variant') }) it('should not declare the removed step labels prop (2c)', () => { expect(ProgressBar.props).not.toHaveProperty('steps') }) it('should not declare the removed current step prop (2c)', () => { expect(ProgressBar.props).not.toHaveProperty('currentStep') }) it('should render the rail track when indeterminate', () => { const wrapper = mount(ProgressBar, { props: { indeterminate: true } }) expect(wrapper.find('.mint-progress__bar--indeterminate').exists()).toBe(true) }) })