Compare commits

1 Commits
Author SHA1 Message Date
jakob.scheid 99ae2725cd test(settings): refactor switch component test
Added and used getWrapper function to switch component test to mount the
component and avoid repeating code.
2026-07-28 12:51:32 +02:00
@@ -35,7 +35,16 @@ const getWrapper = function getWrapper ({ i18n = 'switch1', translations = {} }
describe('Switch', () => { describe('Switch', () => {
test('shows value from store', async () => { test('shows value from store', async () => {
const wrapper = getWrapper(); const wrapper = mountComponent(Switch, {
attrs: {
setting: {
name: 'switch',
i18n: 'switch1',
type: 'bool'
},
path: 'switch'
}
});
const store = useSettingsStore(); const store = useSettingsStore();
store.set('switch', true); store.set('switch', true);