feat: enhance tutorial functionality by disabling inputs and buttons during active steps
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m12s

This commit is contained in:
2026-07-21 14:53:31 -04:00
parent f7b00fc7c4
commit 541bed3a8a
18 changed files with 418 additions and 59 deletions
@@ -0,0 +1,26 @@
import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'
import FloatingActionButton from '../FloatingActionButton.vue'
describe('FloatingActionButton', () => {
it('emits click when enabled and clicked', async () => {
const wrapper = mount(FloatingActionButton, {
props: { ariaLabel: 'Add Child', disabled: false },
})
await wrapper.find('button').trigger('click')
expect(wrapper.emitted('click')).toHaveLength(1)
})
it('is disabled and does not emit click when disabled prop is true', async () => {
const wrapper = mount(FloatingActionButton, {
props: { ariaLabel: 'Add Child', disabled: true },
})
const button = wrapper.find('button')
expect((button.element as HTMLButtonElement).disabled).toBe(true)
await button.trigger('click')
expect(wrapper.emitted('click')).toBeUndefined()
})
})